GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix yarn berry exec:/git copies escaping VEX (#1630) by mikolalysenko · Pull Request #1644 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Fixes #1630

Root cause

berry_copy_ref (crates/socket-patch-core/src/formats/yarn/copy.rs) read a yarn berry lock entry as a "copy under another dependency name" only when its reference was file:, portal:, link: or started with http. An exec: generator entry, and a git entry whose remote isn't http(s) (git+ssh://, ssh://, git://, git@host:), returned None, so:

  • lockfile discovery (vex/discover/yarn.rs berry_block) skipped it silently, and the wired ref was attested not_affected;
  • the hosted engine's redirect_copy_unpatched warning, which is fed by discovery, never named it;
  • the vendored backend's other_name_copies never named it (vendor_copy_unpatched).

Fix

exec: and non-http git references are now read as copies whose package can't be read, like a non-registry url: possibly any package at the lock's version. That contests a wiring of the same version (patched_ref_unattributable), and both scans name the copy. exec: paths share the file:/portal:/link: selector and locator= parsing.

Tests (per issue)

  • Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630, parsing: formats::yarn::copy::tests::issue_1630_exec_and_git_refs_are_unread_copies
  • Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630, VEX discovery: vex::discover::yarn::tests::issue_1630_exec_and_git_copies_contest_a_vendored_ref (control: the same copy at 2.0.0 doesn't contest)
  • Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630, vendored scan: vendor::yarn_berry_lock::tests::issue_939_other_name_copies_are_named gained exec: and git+ssh: cases
  • Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630, hosted scan: hosted_memory_engine::issue_1630_berry_exec_and_git_copies_are_named (control at 2.0.0). It fails on main's core (redirect_copy_unpatched missing) and passes with the fix.

Commands run locally on d96f49a: cargo fmt --all -- --check ✅, cargo clippy --workspace --all-features -- -D warnings ✅, cargo test -p socket-patch-core --all-features --lib 6567 passed / 4 failed, cargo test -p socket-patch-cli --all-features --lib --test hosted_memory_engine ✅, all yarn CLI test binaries (non-ignored) ✅. The 4 core failures are chmod-based permission tests (copy_tree relax loop, vlt_heal unremovable lock, poetry/requirements wire-failure rollback) that can't fail a write when run as root, as this sandbox does. They don't touch yarn. A full cargo test --workspace ran out of the sandbox's disk, so CI covers the docker/e2e suites.

Code review (/code-review high) and what was not changed

  • Fixed: duplicated exec: parsing, now shared with the file:/portal:/link: cascade; stale doc comments listing the copy kinds.
  • Not changed, follow-up: yarn classic git dependencies under another name. classic_block records them as pkg:npm/<dep-name>@<version> rather than as an unidentified copy, and other_name_copies filters classic git out. Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630 is berry-only, so this PR doesn't widen to classic. The docs now say the git case is berry-only.
  • Not changed: making berry_copy_ref fail-closed for unknown protocols (plugin resolvers). That is a policy change beyond Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630.
  • Not changed: a git/exec: entry under the patched package's own name now contests in VEX but isn't named by vendored other_name_copies (same-name filter). That already happens for same-name file:/url entries on main, and VEX failing closed is the safe side.

https://claude.ai/code/session_01BgnkbqbEMV3JkJWHCPzG6E


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Start fix for #1630
7363d33
Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 20, 2026
Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched #1630
Closed
@claude
Name yarn exec: and git copies as unpatched
c332a70
A yarn berry dependency built by an exec: script, or cloned from a git
remote that isn't http(s), installs a package under the dependency
name the depender gave it. The lock records only its version, not
which package it is, and socket-patch skipped these entries entirely.
So when such a copy held the patched name@version, hosted and vendored
scans said nothing, and vex attested the package not_affected while
node_modules shipped the unpatched copy.

These entries are now read as copies whose package can't be known,
like a non-registry URL tarball: possibly any package at their lock
version. vex withholds a wiring of that version in the same lock
(patched_ref_unattributable), and both scans name the copy
(redirect_copy_unpatched / vendor_copy_unpatched).

Fixes #1630

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 20, 2026
Swarm health manager log #1382
Open
Claude (claude) added 2 commits October 20, 2026 22:38
@claude
Test hosted scan names yarn exec:/git copies
0174931
The hosted scan now warns (redirect_copy_unpatched) when a yarn berry
lock installs an exec: script or a git+ssh remote under another
dependency name at the pinned version. Before the fix the scan
reported a clean success while node_modules/lp2 stayed unpatched.
A copy at another version is not named.

Assisted-by: Claude Code:claude-opus-5-5
@claude
Share berry exec: path parsing; fix copy docs
d96f49a
An exec: reference now goes through the same selector and binding
parsing as file:, portal: and link:, so a later fix to that parsing
reaches all four. Doc comments that list which lock entries count as
copies now include exec: scripts and git remotes, and the user docs
say the git case is berry-only.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 20, 2026 23:15
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 20, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d96f49a. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 21, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Ready for review at d96f49a.

  • CI: 86/86 settled on the head, 36 success, 50 skipped, no failures.
  • Bugbot: reviewed d96f49a, no findings. No open review threads.
  • Mergeable, no CHANGELOG.md change.
  • Reviewers: the PR description lists three deliberate non-changes (yarn classic git copies, fail-closed for unknown protocols, same-name git/exec: entries); those are the calls worth a second opinion.

Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) enabled auto-merge October 21, 2026 00:56
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Final review brief

What it does. Yarn berry lock entries that install a package under another dependency name from an exec: script or a non-http git remote (git+ssh:, ssh:, git:, git@host:) were ignored, so VEX could attest a vendored ref not_affected while node_modules/<alias> still got unpatched bytes. These are now read as copies whose package can't be known (like a non-registry URL): they contest a same-version wiring in VEX, and both the hosted and vendored scans name them.

Risk: low. Additive parsing in one function plus two new enum variants; the change fails closed (more VEX contests, more warnings), never fewer. exec:/git copies are never read from disk (read_path is None), and git URLs go through redact_url before they're printed.

Look here

  • berry_copy_ref new git/exec: arms
  • VEX discovery now pushes any copy ref from the non-file/non-http branch (file:/http are handled earlier at L535, so they aren't double-counted)
  • VEX test with a 2.0.0 control
  • Hosted scan test

Verified

  • Read the full diff (7 files, +260/-47). patch:-wrapped and workspace: refs still return None. exec: resolutions (exec:./gen.js#./gen.js::hash=…&locator=…) resolve relative to the locator= workspace.
  • Ran locally on d96f49a: cargo test -p socket-patch-core --lib -- issue_1630 issue_939_other_name_copies, 3/3 passed.
  • CI: 86/86 settled (36 success, 50 skipped by path filters). Cursor Bugbot: success, no findings. No open review threads. CHANGELOG.md untouched. Mergeable.

Changes I made: none.

Open questions: none blocking. The description lists three deliberate non-changes: yarn classic git copies, fail-closed for unknown protocols, and same-name git/exec: entries not being named in the vendored scan. Each is a fair follow-up, not a blocker.

Auto-merge (squash) is armed, so approving sends this straight to the merge queue.


Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Oct 22, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 22, 2026
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 22, 2026
Depot runners lost mid-job evicted 2 merge-queue entries in 27h #1660
Open
Merged via the queue into main with commit 7e9a9fd Oct 22, 2026
86 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-yarn-berry-exec-git-copies branch October 22, 2026 19:31
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 22, 2026
CI perf (settings): 90-min merge-queue check timeout let one stuck check freeze main for 77 min #1670
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Yarn berry ignores an exec: copy of the patched package under another dependency name, so hosted and vendored scans succeed and VEX attests not_affected while that copy installs unpatched

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Tanmay182003 @claude
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.