|
| 1 | +[agent] 2026-11-26: Bundler (RubyGems) bug-hunt run |
| 2 | + |
| 3 | +**Tested:** main `cfc870f` (27 commits since `e685fb1`, among them the fixes for #2219, #2230, #2231 and #2242, VEX package products (#2243) and `vex --grype-config` (#2252)); 5.1.0 is still the latest release and was built from its tag for one comparison. Linux. Ruby 3.3.6 with Bundler 4.1.1, 4.0.25, 4.0.18 and 2.5.22; Ruby 3.2.6 with Bundler 2.6.9. Newest Bundler is still 4.1.1. |
| 4 | + |
| 5 | +**Harness:** one loopback server in front of five instances of the repo's stand-in (`tests/nokogiri/patch_service.rb`): rack 2.2.8, rake 13.2.1, json 2.9.1 and racc 1.8.1 (ruby platform, the last two with a native extension, racc transitive) and nokogiri 1.18.10 with all 8 prebuilds. Project: `path vendor/bundle`, a range requirement, a group block, a Bundler 4.1 default lock. |
| 6 | + |
| 7 | +**Re-triage** |
| 8 | +- #2242: fixed by c40cc39. The new `rm -rf <gem dir> <gemspec> <archive> && bundle install` clears the old Ruby's tree, `vex` then writes every statement and the re-scan is quiet. Commented and closed. |
| 9 | +- #1109 carries `agent:needs-human`: skipped. |
| 10 | +- Closed by their fixes and re-run here: #2219 (`vex` now names `socket-patch scan`, which replaces the copies) and #2231 (`apply --check`, `apply` and `rollback` name `bundle pristine <gem>`, which works). #2230 was not re-run. |
| 11 | + |
| 12 | +**Cells** |
| 13 | + |
| 14 | +| Cell | Result | |
| 15 | +| --- | --- | |
| 16 | +| Hosted, 4.1.1, 5 gems: scan, frozen install, lock stable, app, deployment clone, `vex`, `pristine`, `outdated`, `update --all`, `check`, `doctor`, `list`, rollback, frozen install, `pristine` | pass: pair byte-exact | |
| 17 | +| Hosted, 4.0.25, 2.5.22, 2.6.9 (Ruby 3.2.6): scan, frozen install, app, `vex`, `pristine`, rollback | pass: pair byte-exact | |
| 18 | +| Agent, 4.1.1, 4.0.25, 2.5.22, 2.6.9: scan, app, frozen install, `vex`, `apply --check`, `pristine`, `apply`, rollback | pass | |
| 19 | +| Vendored, 4.1.1, 4.0.25, 2.5.22: rack and rake vendored, json and racc refused, nokogiri from prebuilds (on 4.1.1 after `bundle lock --remove-platform ruby`), frozen install, deployment clone, `vex`, rollback | pass: pair byte-exact | |
| 20 | +| Vendored, then `get json` / `get racc --mode hosted` (the printed remedy), frozen install, app, `vex`, re-scans, rollback: 4.1.1, 4.0.25, 2.5.22; with `--mode agent` on 4.0.25 | installs, `vex` and rollback pass; every later `scan --mode vendored` exits 1: **fail #2269** | |
| 21 | +| Agent, a gem edited in place: `apply --check`, `apply`, `rollback`, `bundle pristine rack`, `rollback` | pass (#2231 fixed) | |
| 22 | +| Hosted on a second machine that had its gems installed, 4.0.25: `bundle install`, `vex`, the named `scan`, `vex` | pass (#2219 fixed) | |
| 23 | +| Agent with the gem tree of an earlier Ruby in `vendor/bundle`, 4.0.18 | pass: both trees patched, `apply --check` and `vex` agree, rollback restores both | |
| 24 | +| `vex --grype-config`, hosted, 4.1.1: `.grype.yaml` created, removed from the list when a later `vex` has nothing to attest | pass | |
| 25 | + |
| 26 | +**Filed** |
| 27 | +- https://github.com/SocketDev/socket-patch/issues/2269 (`ux`): vendored mode refuses a gem with a native extension and names `--mode hosted` or `--mode agent`. Once the user has patched the gem that way, every `scan --mode vendored` refuses it again with the same remedy, counts it as failed and as "left to patch (40%)" and exits 1, while the app loads the patched code and `vex` attests all five gems. `scan --mode agent` on the same project exits 0 but counts the vendored gems as left to patch. Not a regression: 5.1.0 exits 1 on the same re-scan. Suspect `vendor/gem.rs:653`, `scan/report.rs:568`. |
| 28 | + |
| 29 | +**Commented / closed:** #2242 closed as fixed (https://github.com/SocketDev/socket-patch/issues/2242#issuecomment-7181456843). |
| 30 | + |
| 31 | +**Ruled out** (added to `known-non-bugs/bundler.md`) |
| 32 | +- `vex` names the precompiled nokogiri (installed as `x86_64-linux-gnu`, record `?platform=ruby`) as `pkg:gem/nokogiri@1.18.10` only, without the `name@version-platform` form `docs/usage.md` gives for Grype and Syft. Not filed: the contract takes the forms from the record's `platform` qualifier and open PR #2257 gives each platform gem its own record. First on the backlog to re-check. |
| 33 | +- The empty `.socket/manifest.json` an agent `rollback` leaves, the stale `socket.vex.json` after a rollback, and the "Not hosted" lines of a hosted scan over vendored gems: documented. |
| 34 | + |
| 35 | +**Blocked / not reached:** Grype, Syft and Trivy could not be run (the sandbox refuses downloaded scanners), so the VEX product forms were read, not matched by a scanner. #2230 behind a mirror, #2210 (needs Bazel), `report`, the Rails 8 app, Ruby 3.4 / 4.0 and JRuby. |
0 commit comments