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 Bun/vlt bundled copies left unpatched (#469, #471) by mikolalysenko · Pull Request #472 · SocketDev/socket-patch Conversation
|
| Issue | Test | Red without the fix |
|---|---|---|
| #469 bun.lock hosted | patch::redirect::tests::bun_lock_bundled_entry_is_skipped_with_loud_warning |
✔ |
| #469 bun.lock vendored | vendor::bun_lock::tests::bundled_entry_is_never_rewired |
✔ |
| #469 bun.lock VEX (hosted + vendored, both shapes, other-version control) | vex::discover::bun::tests::bundled_entries_are_never_refs_and_contest_the_same_version |
✔ |
#469 hosted in-run scan --vex |
in_process_redirect::scan_redirect_bun_bundled_copy_is_not_attested_in_run |
✔ |
| #469 bun.lockb codec | vendor::bun_lockb::tests::bundled_edges_flag_their_records (real Bun 1.3.14 fixtures bun-lockb-bundled/{only,both}) |
n/a (new field) |
| #469 bun.lockb hosted | patch::redirect::bun_binary::tests::bundled_records_are_not_redirected_silently |
✔ |
| #469 bun.lockb vendored | vendor::bun_lock::tests::binary_bundled_records_are_never_silently_rewired |
✔ |
| #469 bun.lockb VEX | vex::discover::bun::tests::binary_bundled_records_are_never_attested |
✔ |
| #471 vlt VEX (hosted + vendored, other-version control) | vex::discover::vlt::tests::an_installed_bundled_copy_contests_the_ref |
✔ |
| #471 vlt vendored | vendor::vlt_lock::tests::a_bundled_store_copy_is_reported_not_silently_left_unpatched |
✔ |
| #471 vlt hosted scan (CLI) | in_process_redirect vlt::scan_redirect_vlt_bundled_store_copy_warns |
✔ |
Local results:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test --workspace --all-features --no-fail-fast: all pass except the tests that use chmod to force write failures. This sandbox runs as root, which bypasses them, and they pass on CI's non-root runners.e2e_redirect_bun_build (16), e2e_vendor_bun_build (14) and e2e_bun_lockb (12) pass with --include-ignored against real Bun 1.3.14.bun-lockb-bundled discovery golden is added. The pdm and poetry equivalence goldens are re-blessed because they hash Debug output, which now includes the empty new field; their inputs are unchanged.main is not rustfmt-clean and CI has no fmt check, so this PR leaves untouched files alone. An earlier cargo fmt --all churn was reverted in 4a787fe.redirect_vlt_entry_not_found next to the new redirect_vlt_bundled_instance_skipped, which gives the real reason.🤖 Generated with Claude Code
https://claude.ai/code/session_01RcHrVGj3ZJ2CJQn6LezdCC
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
Bun records a bundleDependencies copy as its own parent/child entry
flagged { "bundled": true } and unpacks it from the parent's
tarball, never reading the entry. Hosted and vendored scans rewired
those entries and reported success, and vex attested not_affected,
while the copy the parent loads stayed unpatched.
Both rewriters now skip a bundled entry with a loud warning (vendored
refuses when it is the only instance), and vex never takes a bundled
entry as a ref: it contests a ref for the same name@version in the
same lock or any other, like npm's inBundle handling (#325).
Refs #469
Assisted-by: Claude Code:claude-opus-5-5
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
bun.lockb marks a bundleDependencies edge with the bundled behavior bit. A record only such edges reach is unpacked from the parent's tarball, so redirecting or vendoring it installed nothing while scan reported success and vex attested not_affected. Bun also shares one record between a regular and a bundled install of the same version, where the bundled copy stays unpatched. The binary codec now flags those records. Hosted and vendored skip a bundled-only record (vendored refuses when nothing else matches), warn when the record is shared, and vex never attests either case. Refs #469 Assisted-by: Claude Code:claude-opus-5-5
vlt unpacks a bundleDependencies copy into its parent's store entry and records no vlt-lock.json node for it, so no hosted or vendored rewire reaches it. vex still attested the patch as not_affected while that copy stayed unpatched. vex now looks for real package directories inside each store package's own node_modules (vlt links real dependencies as symlinks beside the package), and does not attest a ref whose name@version a bundled copy also installs. Vendored warns about such a copy, and when it is the only install it refuses with that reason instead of "run vlt install". Refs #471 Assisted-by: Claude Code:claude-opus-5-5
A hosted scan in a vlt project pinned the regular lock node and reported a clean success while a bundled copy of the same version, unpacked into its parent's store entry, stayed unpatched. The scan now warns redirect_vlt_bundled_instance_skipped and keeps that purl out of the in-run VEX attestation. Refs #471 Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
CodeQL flagged the new bun and vlt bundled-copy diagnostics for printing the patch uuid. They now name only the package, matching the other recent VEX diagnostics. Assisted-by: Claude Code:claude-opus-5-5
The new bun-lockb-bundled fixtures join the VEX discovery golden corpus. The new bundled-copy tests no longer print lock specs or diagnostics that carry patch URLs and uuids (CodeQL), only case numbers and diagnostic codes. 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
A hosted scan --vex treated every confirmed redirect as applied. When Bun shares a record between a regular install and a bundled copy, or bun.lock has both entries, the regular entry is redirected but the bundled copy stays unpatched, and the in-run attestation still said not_affected. The bun rewriters now record the uuids whose bundled instance they skipped, and hosted scan verifies those purls instead of assuming them applied, matching a standalone vex run. Refs #469 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The redirect equivalence goldens hash each RewriteResult. The new bundled_skipped_uuids set is left out of the serde digests while empty, and the two goldens that hash its Debug form (pdm, poetry) are re-blessed: their inputs are unchanged, only the printed struct gained the empty field. 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 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.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
An earlier cargo fmt --all reformatted about 120 files this fix does not touch (main is not rustfmt-clean and CI has no fmt check). Those files are back to main's bytes, and the files this PR changes carry only their real edits on top of main's formatting. 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 4a787fe. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] CI note on head 4a787fe: the only red check is
I'm re-running the failed job once. If it fails again I'll treat it as real and dig in. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Burn-down agent: ready for review at
Slack announcement not sent: no Slack send tool is available to this agent; the next run will retry. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Reviewed No actionable correctness or security regressions found. Bundled Bun entries are excluded from rewiring and attestation, including binary records shared by regular and bundled installs. The vlt installed-store check contests the same package/version, and in-run hosted VEX does not assume those skipped copies were patched. Validation: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Since #472, rewrite_bun_lock called is_bundled_entry(entry) before comparing the entry's spec with the dep. is_bundled_entry JSON-parses the entry's meta object, so a hosted rewrite of N patched deps over a lock of M entries paid N x M serde_json parses where the loop used to do string compares. Callgrind put 62% of bun/hosted instructions there, and bun/hosted and bun/rescan wall time roughly doubled. The vendored path had the same shape: classify_rewritable and bundled_matches in vendor/bun_lock.rs ran the bundled check on every entry before classify, once per target package. Both checks are pure, so evaluate the cheap spec match / classify first and run is_bundled_entry only on an entry that resolves the target. The result is unchanged: a bundled copy is still skipped and reported. A test-only BUNDLED_CHECKS counter (same pattern as lock_fragments' RENDERS) lets regression tests pin the call count: 20 deps over 201 entries made 4020 checks before and 21 now; the vendor scans made 402 and now make at most 4. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
vlt hosted and vendoredvex attests not_affected while a bundled copy of the same name@version in node_modules/.vlt stays unpatched (the #325 fix covers npm locks only)
Bun hosted and vendored rewiring rewrites bundled: true lock entries that Bun never fetches: the bundled copy stays unpatched, scan reports success, and vendored vex attests not_affected
There was an error while loading. Please reload this page.