fix(supply-chain): re-sync Cargo.lock to unblock the vet gate, and trust ewf's publisher - #5
Draft
h4x0r wants to merge 2 commits into
Draft
fix(supply-chain): re-sync Cargo.lock to unblock the vet gate, and trust ewf's publisher#5h4x0r wants to merge 2 commits into
h4x0r wants to merge 2 commits into
Conversation
`cargo metadata --locked` has been failing outright:
error: cannot update the lock file ... because --locked was passed to
prevent this
`cargo vet` shells out to `cargo metadata --locked`, so the vet gate has not
been running at all — it aborts before it evaluates a single crate. `cargo
deny` is in the same position.
Root cause is PR #3 (ba519d9, "scope OpenDAL backends to evidence-transfer
targets"). It cut 72 lines from Cargo.toml, dropping the cloud/object-store
backends and their feature closure, but never regenerated Cargo.lock. The lock
has carried the pre-#3 dependency graph ever since.
This is a re-resolution, not an update. Cargo keeps every pin the manifest can
still reach and drops the ones it cannot, so the new lock is a strict subset of
the old one:
- 150 (name, version) pairs removed, ZERO added
- no version moved forward anywhere; the only entries in the 16 packages that
"changed" are duplicate OLD majors falling away once their sole consumer
left (rand 0.7.3, http 0.2.12, hyper 0.14.32, tower 0.4.13, prost 0.12.6
and 0.13.5, bindgen, memmap2 0.5.10)
- whole trees gone with their roots: axum, compio, cacache, bson,
etcd-client, hickory-resolver, librocksdb-sys, bindgen
Because nothing is added and nothing moves forward, this cannot introduce a new
major, cannot raise the MSRV, and cannot bring in a licence `cargo deny` has
not already seen.
The 7 `+name =` lines in the diff are relocations, not additions — packages
re-emitted at a new offset after their neighbours were deleted.
No honest RED commit exists for this: the failure is a tooling abort, not a
behaviour a test can assert. The before/after `cargo vet` and `cargo deny`
output stands as the verification instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…red it
`[policy.ewf] audit-as-crates-io = false` declared the crates.io crate `ewf`
first-party. That is ADR-0018 case 1, and case 1 means "ours, AND a workspace
member". `ewf` is ours but it is not a member here — blazehash pulls it from
the registry like any other dependency. The policy told cargo-vet to skip
auditing it on the strength of a claim that was not true.
The fleet's common defect is the opposite one: 79 repos exempt their OWN crates
and understate their posture. This entry overstated it, which is the direction
that actually costs something — a compromised or substituted `ewf` release
would have walked through the gate unexamined.
ADR-0018's decision tree takes the first mechanism that applies. `ewf` is ours
and comes from crates.io, so that is case 2, `cargo vet trust`:
$ cargo vet trust ewf h4x0r --criteria safe-to-deploy
Verified against the registry before trusting — `ewf` has exactly one owner and
every published version is theirs:
owners: h4x0r | Albert Hui | user
0.4.7 .. 0.2.x -> published_by: h4x0r
The resulting `[[trusted.ewf]]` records the real claim: we trust this publisher
for safe-to-deploy, bounded to their user-id and a dated window. It does not
assert a human read the source, which is what a `certify` record would have
claimed and what `audit-as-crates-io = false` implied.
`[[exemptions.ewf]] version = "0.2.3"` went too — cargo-vet removed it itself
once the trust entry superseded it. Case 2 outranks case 4, so keeping both
would have left the weaker mechanism carrying a load it no longer bears.
The `imports.lock` churn is fallout from the lock re-sync in the parent commit:
`cexpr`'s publisher record drops out because `bindgen` left the graph, and one
upstream mozilla entry lost an inline comment on re-fetch.
Before (with the stale lock): vet aborts, `cargo metadata` cannot run
After: Vetting Succeeded
(170 fully audited, 5 partially, 628 exempted)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two commits, both supply-chain hygiene. The second is unverifiable without the first, which is why they share a PR — but they are separate commits and read independently.
1.
Cargo.lockre-sync — the vet gate has not been running at allcargo vetshells out tocargo metadata --locked, and that has been failing outright:So the gate aborts before it evaluates a single crate. It has not been catching anything.
Root cause: PR #3 (
ba519d9, scope OpenDAL backends to evidence-transfer targets). It cut 72 lines fromCargo.toml, dropping the cloud/object-store backends and their feature closure, and never regeneratedCargo.lock. The lock has carried the pre-#3 dependency graph ever since.This is a re-resolution, not an update
No
cargo updatewas run. Cargo keeps every pin the manifest can still reach and drops the ones it cannot. Measured on the(name, version)pair sets:The new lock is a strict subset of the old one — verified set-theoretically, not by reading the diff.
Nothing moved forward. The 16 packages that appear to have "changed" each lost a duplicate older major once its only consumer left the graph:
rand0.7.3 ·http0.2.12 ·hyper0.14.32 ·tower0.4.13 ·prost0.12.6 and 0.13.5 ·memmap20.5.10 ·wasi0.9.0 ·rand_core0.5.1 ·sync_wrapper0.1.2 ·http-body0.4.6 ·tokio-rustls0.24.1 ·memoffset0.7.1One inversion worth naming explicitly:
windows0.62.2 was dropped and 0.52.0 retained — again because the 0.62 consumer left, not because anything downgraded.Whole trees gone with their roots:
axum,compio,cacache,bson,etcd-client,hickory-resolver,librocksdb-sys,bindgen.Because nothing is added and nothing advances, this cannot introduce a new major, cannot raise the MSRV, and cannot bring in a licence
cargo denyhas not already seen.The 7
+name =lines in the diff are relocations, not additions — packages re-emitted at a new offset after their neighbours were deleted.2.
ewf— trust the publisher instead of claiming we authored itsupply-chain/config.tomlcarried:That is ADR-0018 case 1, which means "ours and a workspace member".
ewfis ours but it is not a member here — blazehash pulls it from crates.io like any other dependency. The policy told cargo-vet to skip auditing it on the strength of a claim that was not true.The fleet's common defect is the opposite one: repos exempt their own crates and understate their posture. This entry overstated it, which is the direction that costs something — a compromised or substituted
ewfrelease would have walked through the gate unexamined.Verified against the registry before trusting.
ewfhas exactly one owner and every published version is theirs:So this is ADR-0018 case 2:
yielding a claim that is actually true — we trust this publisher, bounded to their user-id and a dated window:
It does not assert a human read the source. That is what a
certifyrecord would claim, and whataudit-as-crates-io = falseimplied.cargo-vet removed the now-redundant
[[exemptions.ewf]] 0.2.3itself — case 2 outranks case 4, and keeping both would leave the weaker mechanism carrying a load it no longer bears.The
imports.lockchurn is fallout from commit 1:cexpr's publisher record drops out becausebindgenleft the graph, and one upstream mozilla entry lost an inline comment on re-fetch.Verification
No honest RED commit exists for either change — the failure is a tooling abort, not a behaviour a test can assert. Before/after output stands in its place:
cargo buildcargo testcargo clippy --all-targets -- -D warningscargo fmt --checkcargo vetcargo deny checkKnown red this PR does not fix
cargo deny checkfails, and fails identically on pristineorigin/main— reproduced on a detached worktree at366a799:The lock re-sync cannot have introduced it — the new graph is a strict subset of the old. Closing it means moving off
yara-x0.9.0, which pins wasmtime 25.x. That is a dependency decision, not a drive-by, so it is flagged rather than attempted here.Follow-ups deliberately not bundled
cargo vetwarning about unnecessary exemptions: 786 entries before, 629 aftercargo vet prune. It is a WARN,cargo vet --lockedstill exits 0, nothing blocks. Left out to keep this diff readable.ewfis caret-trapped.Cargo.toml:112pinsewf = { version = "0.2", optional = true }; the lock sits at 0.2.3 while the registry is at 0.4.7 (2026-07-25) — a layer-1 freshness trapcargo updatecannot cross. Widening it adds packages and would destroy the "strict subset, nothing added" property that makes commit 1 safe to review at a glance. It wants its own PR, plus a check that 0.2 -> 0.4 is API-compatible.ImageFormat::detectdispatches on file extension (src/forensic_image/mod.rs:19-37) where the fleet standard is content-sniffing. That is an ADR-0011 architectural call, reported not attempted.🤖 Generated with Claude Code