You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bb16cf8
Browse filesBrowse the repository at this point in the historyBrowse files
**Tested:** main `045d7ec` (unchanged), latest release v4.0.0. Linux sandbox: npm 8.19.4 and 10.9.4 on Node 22.22, npm 12.2.0 on Node 24.21. I wrote a fresh Python mock of the public patch proxy (`SOCKET_PROXY_URL` + `--patch-server-url`; routes `/patch/batch`, `/patch/by-package`, `/patch/view`, `/patch/blob`, `/patch/package`, plus a hosted `ms-2.1.3.tgz`).
4
+
5
+
## Re-triage
6
+
Main hasn't moved and no human has commented on #302, so I skipped re-triage.
7
+
8
+
## Cells (Linux)
9
+
-**Baseline hosted cycle, npm 10.9.4: pass.**
10
+
-**#812 variants:**`replace-registry-host=always` in the **user**`.npmrc` fails: cold-cache `npm ci` gives E404 and the scan says nothing. A **warm cache hides it** (`npm ci` succeeds patched). A hostname value that isn't the hosted origin passes. I commented on #812.
11
+
-**Hosted → vendored takeover with a bundled copy plus a root registry copy of the same `name@version`: fail, filed #828** (npm 8.19.4 v2, 10.9.4 v3 twice, 12.2.0 v3). The takeover skips the upstream restore (no `vendor_takeover_reverted_redirect`), the vendor ledger records the hosted URL as `original`, `.npmrc``allow-remote=all` stays, and `vendor --revert` lands back on hosted. Hosted `rollback` / `remove` refuse the pin (`patched_ref_unattributable`) with a remedy ("re-run scan --mode hosted") that loops. The control (no bundled copy) passes: restore note, `.npmrc` deleted.
12
+
-**Vendored with a bundled copy (from a hosted start): pass.** The skip warning, `npm ci` patches the root copy, and `vex` refuses `patched_ref_unattributable`.
- Commented on **#812** (user-config scope, warm-cache masking).
17
+
18
+
## False positives ruled out
19
+
- The first user-config `replace-registry-host` attempt "passed" because the sandbox sets `NPM_CONFIG_USERCONFIG=/root/.npmrc`, so `$HOME/.npmrc` wasn't read. Once I pointed `NPM_CONFIG_USERCONFIG` at it, it reproduced.
20
+
- The first `npm ci` "passed" because of a warm cache. Use `--cache <fresh dir>` for #812 checks.
21
+
-`vex -o` is `--org`, not output (`-O`). That was a harness typo.
22
+
- v4.0.0 has no like-for-like cell for #828 (its hosted `rollback` needs `.socket/manifest.json`), so it isn't bisected.
23
+
24
+
## Probe branches
25
+
None. Still paused, and the 10 stale branches are still there.
26
+
27
+
## Next
28
+
1.#828 follow-ups: `get --mode vendored` takeover (same code path?), the real-world `npm` bundle (`ansi-regex`) shape, and a dual lock where only one lock carries the bundle.
29
+
2. Other `ContestedWiring` shapes reaching the takeover silently, e.g. a #798 stale twin: does `scan --mode vendored` skip the restore there too?
Copy file name to clipboardExpand all lines: state/npm.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
[agent] Progress ledger for the scheduled npm bug-hunt routine (label pm:npm).
2
2
3
-
Last updated: 2026-10-05 (run 18 with a ledger), main `045d7ec` (re-run 2026-10-05T00Z, unchanged; v5 + the #324/#326/#359/#403/#434/#454/#490/#516/#541 fixes and #570 API timeouts; the binary still reports 4.0.0), latest release v4.0.0 (previous v3.3.0, both from npm `@socketsecurity/socket-patch`). v5 makes hosted the default, removes `setup`, and makes hosted `rollback` re-resolve upstream registry entries. Cells marked (v4) were last verified on `f6b7fb9`.
3
+
Last updated: 2026-10-05T06Z (run 19 with a ledger), main `045d7ec` (re-run 2026-10-05T06Z, unchanged; v5 + the #324/#326/#359/#403/#434/#454/#490/#516/#541 fixes and #570 API timeouts; the binary still reports 4.0.0), latest release v4.0.0 (previous v3.3.0, both from npm `@socketsecurity/socket-patch`). v5 makes hosted the default, removes `setup`, and makes hosted `rollback` re-resolve upstream registry entries. Cells marked (v4) were last verified on `f6b7fb9`.
4
4
5
5
## Coverage matrix
6
6
@@ -13,7 +13,7 @@ Cells are "pass", "fail #N" or "untested". Every cell uses a real npm install. H
13
13
| Linux | 8.19.4 | fail #356 (v4). #403 / #516 closed by fixes | fail #432, **#588** (same-lock unwired copy), **#665**, **#688**. pass: alias takeover (with the #432 warning), cycle + `--omit=dev`, workspaces, takeovers, rescan no-op | pass: `peer: true` lock-entry cycle, nested v2 cycle, shrinkwrap-only, workspaces, takeovers, rescan no-op, `overrides` (flat, alias, nested). fail #432 (alias mirror, npm 6 consumer), #490 (override over a git spec; closed by #491, not re-checked), **#588** (`--no-verify`), **#753** (`hasShrinkwrap` nested copy) | pass: all four (custom prefix) |
14
14
| Linux | 9.2.0 / 9.9.4 | pass: 9.2.0 `install-links=true``file:` dir dep cycle; `-g` (v4); Node 18 cycle | pass: 9.2.0 `install-links``file:` dep cycle, cycle + `--omit=dev` (main), Node 18 cycle | pass: 9.2.0 `install-links``file:` dep cycle, cycle (alias, nested, dev), Node 18 cycle. fail **#753**| pass (v4) |
15
15
| Linux | 10.9.9 | pass: plain cycle (alias still #356) | pass: cycle, `overrides` + `file:` dependent | pass: cycle, `overrides`, shrinkwrapped `file:` tarball dep | untested |
16
-
| Linux | 10.8.2 (Node 18) / 10.9.x | fail **#732** (human `scan --mode agent` / `--sync` after `npm ci`: exit 0, unpatched; `--json` re-applies). pass: Node 18 cycle. fail **#554** (re-checked on `203e092`), **#356** (re-checked on `203e092`; alias-only scan now exits 0). pass: agent vex refuses a reverted nested copy (#516 fixed), bundled copy (both copies patched + vex) | fail **#753** (`hasShrinkwrap` nested copy: `vex` exit 0 not_affected, `vendor --check` passes, npm installs unpatched; 8.19.4 too). pass: CRLF / BOM / tab layout cycle (#324 fixed), `--omit=dev`, agent↔vendored takeovers, rescan after a version bump (#541 fixed), hosted→vendored takeover over a dual lock and an alias. fail **#588** (same-lock unwired copy), **#665** (`npm uninstall` of a vendored dep: rollback exit 1 forever), **#688** (`file:` dir named like the package: refused, and the takeover un-hosts), **#687** (a failed eject rewrites every root file), **#798** (stale package-lock twin without the entry: lockfile-only `vex` attests), #725 (`vendor --check` ignores wiring). pass: `peer: true` lock entry | pass: `peer: true` and `devOptional` lock entries (`--omit=peer/dev/optional`), cycles (plain, alias, nested), `file:` dependency's own dependency (`install-links` true / false), self-referential `file:.` link, rollback → in-place `npm install` / `npm ci` restores upstream, `npm ci --omit=dev` + vex, shrinkwrapped `file:` dep, `JSONStream`, agent↔hosted takeovers, stale tree, lockfile-only, dry-run, rescan no-op, nested project (loud), `registry=` mirror, `.npmrc` variants, `overrides` (incl. `$ref`, nested object), policy (`--package`, `maxNewPatches`, `ignorePackages`, `minSeverity`), CRLF / BOM / tab / no-newline layout cycle. fail **#798** (stale twin), #325 (in-run `--vex` only, reopened), **#588** (`--no-verify` only; default `vex` refuses), **#753** (`hasShrinkwrap` nested copy: `npm ci` unpatched, lockfile-only `vex` attests) | pass: all four, `--global-prefix`, `SOCKET_GLOBAL`, `--mode hosted` refused. fail #464 (report-only hint has no `-g`) |
16
+
| Linux | 10.8.2 (Node 18) / 10.9.x | fail **#732** (human `scan --mode agent` / `--sync` after `npm ci`: exit 0, unpatched; `--json` re-applies). pass: Node 18 cycle. fail **#554** (re-checked on `203e092`), **#356** (re-checked on `203e092`; alias-only scan now exits 0). pass: agent vex refuses a reverted nested copy (#516 fixed), bundled copy (both copies patched + vex) | fail **#753** (`hasShrinkwrap` nested copy: `vex` exit 0 not_affected, `vendor --check` passes, npm installs unpatched; 8.19.4 too). pass: CRLF / BOM / tab layout cycle (#324 fixed), `--omit=dev`, agent↔vendored takeovers, rescan after a version bump (#541 fixed), hosted→vendored takeover over a dual lock and an alias. fail **#588** (same-lock unwired copy), **#665** (`npm uninstall` of a vendored dep: rollback exit 1 forever), **#688** (`file:` dir named like the package: refused, and the takeover un-hosts), **#687** (a failed eject rewrites every root file), **#798** (stale package-lock twin without the entry: lockfile-only `vex` attests), #725 (`vendor --check` ignores wiring). pass: `peer: true` lock entry. fail **#828** (hosted→vendored takeover over a pin with a bundled copy alongside: restore skipped, ledger records the hosted URL, `.npmrc` kept, revert lands on hosted; 8.19.4 / 12.2.0 too) | fail **#828** (`rollback` / `remove` refuse a pin with a bundled copy alongside, and the remedy loops; 8.19.4 / 12.2.0 too). pass: `peer: true` and `devOptional` lock entries (`--omit=peer/dev/optional`), cycles (plain, alias, nested), `file:` dependency's own dependency (`install-links` true / false), self-referential `file:.` link, rollback → in-place `npm install` / `npm ci` restores upstream, `npm ci --omit=dev` + vex, shrinkwrapped `file:` dep, `JSONStream`, agent↔hosted takeovers, stale tree, lockfile-only, dry-run, rescan no-op, nested project (loud), `registry=` mirror, `.npmrc` variants, `overrides` (incl. `$ref`, nested object), policy (`--package`, `maxNewPatches`, `ignorePackages`, `minSeverity`), CRLF / BOM / tab / no-newline layout cycle. fail **#798** (stale twin), #325 (in-run `--vex` only, reopened), **#588** (`--no-verify` only; default `vex` refuses), **#753** (`hasShrinkwrap` nested copy: `npm ci` unpatched, lockfile-only `vex` attests) | pass: all four, `--global-prefix`, `SOCKET_GLOBAL`, `--mode hosted` refused. fail #464 (report-only hint has no `-g`) |
@@ -24,7 +24,7 @@ Cells are "pass", "fail #N" or "untested". Every cell uses a real npm install. H
24
24
25
25
## npm config that rewrites hosted pins (#812)
26
26
27
-
`replace-registry-host=always` (npm ≥ 8) rewrites the hosted pin's origin to the configured registry, so `npm ci` / `npm install` fail E404. The hosted scan exits 0 with no warning. **fail #812** on Linux npm 8.19.4 / 10.9.4 / 12.2.0 (project `.npmrc`and env). Vendored isn't affected; npm 6 / 7 don't have the setting.
27
+
`replace-registry-host=always` (npm ≥ 8) rewrites the hosted pin's origin to the configured registry, so `npm ci` / `npm install` fail E404. The hosted scan exits 0 with no warning. **fail #812** on Linux npm 8.19.4 / 10.9.4 / 12.2.0 (project `.npmrc`, env, and user `.npmrc` via `NPM_CONFIG_USERCONFIG`). A warm npm cache masks it; test with `npm ci --cache <fresh>`. A hostname value that isn't the hosted origin passes. Vendored isn't affected; npm 6 / 7 don't have the setting.
28
28
29
29
Other 2026-10-05 passes (Linux): prerelease version (`ms@3.0.0-canary.1`) hosted / vendored / agent cycles (npm 10.9.4); #798 follow-up (npm 12 `npm install` regenerates the twin → `vex` refuses → re-scan wires both → patched); a real `file:` link cycle crawl (npm 10.9.4).
30
30
@@ -34,7 +34,8 @@ Agent mode follows a `node_modules` link into a workspace member, a `file:` dir
34
34
35
35
## Backlog
36
36
37
-
-**#812 variants:**`replace-registry-host=always` in `~/.npmrc` / global npmrc; a hostname value; a `registry=` mirror + `always`. macOS / Windows once probe branches are allowed again.
37
+
-**#828 follow-ups:**`get --mode vendored` takeover; the real `npm` bundle (`ansi-regex`) shape; a dual lock where only one lock carries the bundle; other `ContestedWiring` shapes (#798 stale twin) reaching the vendored takeover silently.
38
+
-**#812 variants:** global npmrc; a `registry=` mirror + `always`. macOS / Windows once probe branches are allowed again. (User `.npmrc` and hostname value done 2026-10-05T06Z.)
- (#753 follow-ups done 2026-10-04T12Z: npm 12 `npm install` pass, workspace member same as #753 on 10/11 and pass on 12, agent mode pass, hosted→vendored takeover on npm 12 pass.)
40
41
- (Bun handover done 2026-10-04T12Z: after hosted `rollback` / `vendor --revert`, `npm install` and `npm ci` restore upstream bytes on npm 7/10/11/12.)
@@ -107,4 +108,6 @@ Agent mode follows a `node_modules` link into a workspace member, a `file:` dir
107
108
-`rollback` / `remove` delete a user-authored project `.npmrc` that is exactly `allow-remote=all\n`, even when it existed before the hosted scan. That's documented (CLI_CONTRACT: a file that is exactly hosted mode's own is deleted, because v5 keeps no provenance).
108
109
- npm 12.2.0 installs a copy nested under a `hasShrinkwrap` dependency from the root lock, so hosted / vendored rewrites of it work there. #753 covers npm 6–11 only.
109
110
- A dual lock whose shrinkwrap lacks the package and whose package-lock twin has it: lockfile-only discovery reads the shrinkwrap, so `scan` finds nothing and writes nothing (loud; no claim made).
111
+
- The sandbox sets `NPM_CONFIG_USERCONFIG=/root/.npmrc`, so a scratch `$HOME/.npmrc` is ignored unless you repoint that variable (a harness artifact).
112
+
-`vex -o` is `--org`; the output flag is `-O` / `--output`.
110
113
-`vendor --check` verifying only the artifact (not the lock wiring) for npm is tracked in #725 (generic root cause, draft fix #730). Don't re-file it per npm shape.
0 commit comments