fix: stop ignoring the tracked Cargo.lock, unblinding the deps scanner (#108) - #110
fix: stop ignoring the tracked Cargo.lock, unblinding the deps scanner (#108)#110bdelanghe wants to merge 1 commit into
Conversation
#108) .gitignore listed Cargo.lock under "Global build artifacts". The file is tracked, so git exempts it and the rule is inert — git status clean, nothing visibly wrong. osv-scanner matches .gitignore patterns directly without modelling that exemption, so it skipped the repo's only lockfile and reported "0 Extract calls / No package sources found". With --allow-no-lockfiles that became exit 0: a hard-fail lane, green, having scanned nothing. Removed from all three places, since editing the file alone would be undone by the next `gen-config`: - .gitignore itself - generate_full_gitignore()'s template - the --minimal ignorable_patterns list, which produced the current file Deliberately NOT regenerating via `xtask gen-config`. The checked-in .gitignore contains sections that appear in neither generator (Trunk, hooksmith events, .direnv, .config), so a regeneration would drop content nobody asked to lose. The three edits are equivalent for the one line at issue and leave the rest untouched. THE FIRST HONEST SCAN WILL BE RED. Queried against OSV: 25 of the 535 packages carry advisories, incl. wasmtime 18.0.4 (28) and git2 0.18.3 (4). That is the point of the change — the advisories were already there, only the reporting was wrong — but the remediation is a separate project, not this diff. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112uYAfDFCMvNu9ShenfYcr
|
The unblinding is confirmed by the scanner's own counters. Before (2026-08-04 scheduled run on Now, on this branch: Same tree, same walk, one extra One correction to the PR body: it says ~68 advisories, from my own OSV API query. The scanner reports 47 — the difference is alias merging ( Every other check on this PR is green, including Remediation is deliberately not in this diff, for the reason in the PR body: 47 accepted-risk decisions belong to a maintainer, and Generated by Claude Code |
|
Superseded by #111 — closing this. #111 is a strict superset: I diffed the two, and every change here is present there.
#111's approach to the advisories is better than the one I deferred to a follow-up. I treated the Worth recording why there were two PRs at all, since this repo's org already has the pattern documented: two sessions worked #108 concurrently, opened #110 at 13:0x and #111 at 13:28, and neither held a lease. This is the front-desk-scheduler #143/#145/#146 shape exactly — the Two observations from this branch that #111 reached independently and that are worth keeping visible:
No action needed on #111 from my side. Closing this one so there's a single PR against #108. Generated by Claude Code |
|
Closing this in favour of #111, which is a superset — but the duplication is my fault, not a defect in this PR, and this one was first. You opened at 13:10Z; I opened #111 at 13:28Z. I never claimed #108 before starting. That is the exact failure Why #111 rather than this one, on the merits only: it carries the same three-site fix, plus it removes the unused Two things you got that I did not, both carried into #111:
Your §"deliberately no Sorry for the wasted afternoon. Generated by Claude Code |
…hem (#111) Closes #108. Discharges #89, #91 and #109. Remainder tracked in #112. The deps lane had never scanned this repo. .gitignore listed the TRACKED Cargo.lock — inert for git, which exempts tracked files, but osv-scanner applies the pattern literally and skipped the only lockfile, so --allow-no-lockfiles turned "scanned nothing" into a pass. Removed from .gitignore and from both generator sites so gen-config cannot put it back. before: 0 Extract calls, "No package sources found", GREEN after: 1 Extract call, 446 packages scanned, RED on 11 real findings Cleared 42 advisories on the way. #91/#109 are discharged by DELETION, not by bump: nothing imports wasmtime — crates/xtask is the only member that declares it and only ever shells out to a wasmtime binary — so dropping two .workspace lines removes 90 packages. Bumping would not have terminated anywhere useful (24.0.7 still carries 7 advisories; 47.0.3 is the first clean release and needs Rust 1.94 against a 1.88 pin). A prediction in the original PR body was wrong and the scan is what caught it: clearing the known 35 did not leave the lane green, because only 5 of 446 packages had been queried. A third commit then cleared the 7 reachable by cargo update alone. Deliberately no osv-scanner.toml. The 7 unmaintained-crate findings are the documented case for [[IgnoredVulns]], but that is an accepted-risk judgement for a maintainer, not a rider on a scanner fix; the other 4 are fixable and suppressing those would recreate exactly what this ends. All in #112. Supersedes #110, which fixed the same issue 18 minutes earlier and was duplicated because #108 was never claimed before work started. Two findings from it carried here: the @Checksum header is a hardcoded literal copied verbatim rather than computed (recomputing gives c08f83bd; no offset yields e902a214), and `gen-config --overwrite` would DROP the Trunk, hooksmith events, .direnv and .config sections, which exist in the file but in neither generator — so regenerating is not a safe way to apply this fix. cargo check --workspace --locked --all-targets passes.
Closes #108.
What
.gitignorelistedCargo.lockunder "Global build artifacts". The file is tracked, so git exempts it — the rule is inert for git,git statusis clean, nothing looks wrong. osv-scanner matches.gitignorepatterns directly without modelling that exemption, so it skipped the repo's only lockfile (0 Extract calls,No package sources found), and--allow-no-lockfilesturned that into exit 0. A hard-fail lane, green, having scanned nothing.Removed from three places, since editing the file alone would be undone by the next
gen-config:.gitignoreitselfgenerate_full_gitignore()'s template--minimalignorable_patternslist, which produced the current fileVerified the divergence closes:
git check-ignore --no-index -v Cargo.lockreported.gitignore:7before and reports nothing after, withgit ls-files Cargo.lockstill listing it.cargo check -p xtaskpasses.This is what the issue predicted ("expect the first honest scan to surface whatever else is in the remaining ~225 packages"), so it should not be a surprise, but it is bigger than the two packages #107 cleared. Measured against the OSV API for all 535 packages on this branch:
wasmtimewasmtime-wasigit2wasmtime-jit-debugbytes1.10.1,cap-primitives2.0.2,lru0.12.5,rand0.8.5,slab0.4.10,time0.3.41,tracing-subscriber0.3.19anyhow1.0.98,backoff0.4.0,bincode1.3.3,cap-std2.0.2,crossbeam-epoch0.9.18,derivative2.2.0,event-listener5.4.1,fxhash0.2.1,instant0.1.13,mach0.3.2,number_prefix0.4.0,paste1.0.15,rustls-pemfile1.0.4 + 2.2.0Deliberately no
osv-scanner.tomlin this PR. Writing ~68[[IgnoredVulns]]entries to get back to green would recreate the exact failure this fixes — a reassuring green over an unexamined graph — and those are 68 accepted-risk decisions that belong to a maintainer, not to the diff that merely stopped lying about them. The advisories were already present; only the reporting was wrong. Remediation (starting with the wasmtime 18.0.4 line, which is a major upgrade rather than a relock) is a separate project.mainhas no required status checks, so a reddepslane surfaces this without blocking merges.Two notes for the maintainer
Not deliberately regenerating via
xtask gen-config. The issue's fix step says "regenerate and update the@checksumheader", but the checked-in.gitignorecontains sections that appear in neither generator (Trunk, hooksmith events,.direnv,.config) — a regeneration would drop content nobody asked to lose. The three edits are equivalent for the one line at issue and leave the rest untouched.The
@checksum: e902a214header does not check anything. It is a hardcoded string literal in both generator sites, copied into the output verbatim rather than computed from content. Recomputing it the waychecksum.rswould givesc08f83bdfor the file as it stood before this PR, and no plausible header offset producese902a214. So it was already stale, and nothing went red over it. I have left it alone rather than "fixing" a value whose semantics I could not verify — but a checksum that cannot fail is the same shape as a scan that cannot fail, and probably wants its own issue.🤖 Generated with Claude Code
https://claude.ai/code/session_0112uYAfDFCMvNu9ShenfYcr
Generated by Claude Code