GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix yarn renamed-copy identity fail-open (#1516) by mikolalysenko · Pull Request #1517 · SocketDev/socket-patch Conversation
|
| Issue shape | Test | Red without fix | Green |
|---|---|---|---|
#1516 outside-root file: dir/tarball, left-pad-1.3.0/ tarball root, non-registry URL, absolute path (vex/hosted discovery, hosted and vendored wirings) |
vex::discover::yarn::tests::issue_1516_unread_classic_copies_contest_the_ref |
✗ | ✓ |
| #1516 berry: unidentified copy vs a resolutions-confirmed vendored ref | vex::discover::yarn::tests::issue_1516_unread_berry_copy_contests_a_vendored_ref |
(new path) | ✓ |
| #1516 vendored classic names all three shapes | vendor::yarn_classic_lock::tests::issue_1516_unread_other_name_copies_are_named |
✗ | ✓ |
#1516 unidentified copy alone keeps not_found |
vendor::yarn_classic_lock::tests::issue_1516_unread_copy_alone_is_not_found |
guard | ✓ |
| #1516 tarball any root / path keeping | formats::yarn::copy::tests::{tarball_identity_reads_any_root_directory, classic_refs_split_tarballs_directories_and_urls} |
✗ | ✓ |
#1516 end to end with real yarn 1.22.22 (issue repro: hosted scan + in-run VEX + lock-only vex) |
e2e_redirect_yarn_classic_build::classic_outside_root_copy_under_another_name_is_named_and_not_attested |
✗ (on main: status: success, 1 VEX statement) |
✓ |
Commands run locally:
cargo fmt --all -- --check: okcargo clippy --locked --workspace --all-features -- -D warnings (CI's command): okcargo test --workspace --all-features --lib --bins: all pass except 4 tests outside this diff (copy_tree::relax_loop_must_not_traverse_symlinked_root, vlt_heal::an_unremovable_hidden_lock_keeps_every_store_entry, pypi_poetry::wire_write_failure_…, pypi_requirements::wire_failure_…). Each relies on a read-only directory blocking a write, and this sandbox runs as uid 0. They don't touch yarn code.SOCKET_PATCH_YARN_CLASSIC_E2E_VERSION=1.22.22: e2e_redirect_yarn_classic_build 40/40, e2e_vendor_yarn_classic_build 40/40, e2e_vendor_yarn_classic_dev_flow 36/36.cargo test --workspace (every integration binary) doesn't fit this session's disk allowance (link fails with ENOSPC). CI runs it.npm/, pypi/, gem/ only dispatch to the binary, so nothing to change there./code-review high findingsFixed:
contest_within_locks. It also runs once per run (version index) instead of copies × refs.file:../b was suspected of being read relative to the wrong directory. A reviewer then showed that yarn 1 writes these keys root-relative, and the gate I first added for it dropped real copies, so it has been removed (75d5610).Not changed, with reasons:
not_affected.classic_file_directory skip doesn't fire for outside-root paths: the engine's discovery pass names the copy with redirect_copy_unpatched (asserted by the e2e). Unifying the rewriter's resolver with CopyRef is a refactor beyond this fix.../proj/.socket/… spelling of our own wiring: yarn writes .socket wiring root-relative (file:./.socket/…). A lock that spells it through ../<own-dir> isn't something socket-patch or yarn produces.🤖 Generated with Claude Code
https://claude.ai/code/session_01WyDjcHE4ZNtbUocsBEJvFH
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
A renamed yarn copy from a file: path outside the project, a tarball whose top directory isn't package/, or a non-registry URL was taken for "not this package". The scan then succeeded and VEX attested not_affected while that copy installed unpatched (#1516). Read outside-root copies where yarn installs them from, strip a tarball's first path segment as yarn does, and fail closed: an unreadable copy of the same version is named as a possible copy and blocks attestation of that version from the lock. WIP: tests written, not yet run. Assisted-by: Claude Code:claude-opus-5-5
Describe in docs/ecosystems.md how renamed yarn copies outside the project, tarballs with any top-level directory, and copies whose package can't be read are treated (#1516). Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Match a copy whose package can't be read against the lock's refs once every extractor is done, so berry vendored and resolutions refs pushed after the copies are read are contested too, in one pass. Take a classic file: path that leaves the root as root-relative only when the root package.json declares it: yarn 1 writes a workspace member's "file:../b" relative to that member, so reading it from the root would name the wrong package or block attestation for nothing. Never read an absolute copy path from a lock, which could name any file or a Windows network share; such a copy stays unidentified. Assisted-by: Claude Code:claude-opus-5-5
The CLI builds Discovery with struct update syntax, so a private field broke its build. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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 6289505. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
yarn 1 writes a file: lock key relative to the project root and normalized, whichever package.json declared it: a workspace member's "file:../../../ext/lpdir" locks as "lp2@file:../ext/lpdir", and the root's "file:../ext/lpdir/" loses its trailing slash. The gate that took an outside-root key as the root's own only when the root package.json spelled it exactly dropped both, so the unpatched copy went unwarned and vex attested it again. Drop the gate. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WyDjcHE4ZNtbUocsBEJvFH
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Yarn classic renamed-copy detection (#1489) misses afile: copy outside the project root and a tarball whose root isn't package/, so scans succeed and VEX attests while that copy installs unpatched
There was an error while loading. Please reload this page.