Repository navigation
Commit d141050
Fix silent hosted pnpm pin beside a file: copy (#1469)
* Start fix for #935
Assisted-by: Claude Code:claude-opus-5-5
* Skip hosted pins a same-lock file: copy shadows
Since #1008, a hosted scan of a pnpm workspace where one member uses
the registry release and another a file: directory or tarball copy of
the same name@version pinned the registry entry and said nothing.
pnpm keeps installing the file: copy unpatched, and vex refuses to
attest the pin, so the scan wrote wiring nothing could vouch for.
#1008 moved such refs into Discovery::shadowed so rollback can still
undo them, and the scan's veto counted them as attributed pins. The
veto now treats a pin seen only as shadowed like contested wiring:
the patch is skipped as redirect_unattributable, naming the file:
entry, and the lock is left as found. Bundled, alias, vlt bundled
and takeover pins keep their exemptions.
Assisted-by: Claude Code:claude-opus-5-5
* Pin and warn instead of vetoing a file: copy
Reviewing the first fix showed that vetoing the whole patch was the
wrong call. npm and yarn classic already pin the registry copy, which
most of the app loads, and warn about the copy they can't reach.
Skipping the patch on pnpm would leave the registry copy vulnerable
too.
So the veto is gone. A hosted scan now pins the registry entry as
before and adds a redirect_copy_unpatched warning that names each
same-lock unpatched copy (a pnpm file: directory or tarball dep)
beside the pin. The warning is left out when the rewriter already
reported that copy. CLI_CONTRACT.md lists the new code.
Assisted-by: Claude Code:claude-opus-5-5
* Keep in-run VEX off pins beside a file: copy
The same hosted run that pinned a pnpm registry entry beside a
file: copy also attested the package not_affected in its own --vex,
although that copy installs unpatched. The engine now records such
pins' uuids with the skipped bundled copies, so the in-run VEX
verifies them instead of assuming them applied.
The redirect_copy_unpatched warning is limited to pnpm locks, where
the rewriter can't see these copies, and is given once per lock and
entry instead of being matched against other warnings' text.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9649595 commit d141050
3 files changed
Lines changed: 253 additions & 3 deletions
File tree
- crates
- socket-patch-cli
- tests
- socket-patch-core/src/hosted
0 commit comments