Skip to content

fix(core): path dep escaping the repo made cargo metadata fail, taking 11 checks down - #5

Merged
h4x0r merged 3 commits into
mainfrom
fix/forensicnomicon-path-escapes-repo
Aug 4, 2026
Merged

fix(core): path dep escaping the repo made cargo metadata fail, taking 11 checks down#5
h4x0r merged 3 commits into
mainfrom
fix/forensicnomicon-path-escapes-repo

Conversation

@h4x0r

@h4x0r h4x0r commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What was wrong

11 checks are red on main — Clippy, Format, Test, MSRV, Docs, Coverage,
cargo-deny, Cargo Vet, the nightly fuzz smoke and both release-plz jobs. None
of them is a lint, test, advisory or audit failure. None of them ran. They all
died in the same place:

error: failed to load manifest for workspace member
  /home/runner/work/peripheral-forensic/peripheral-forensic/core
  failed to load manifest for dependency `forensicnomicon-core`
  No such file or directory (os error 2)

core/Cargo.toml reached outside the repository:

forensicnomicon-core = { version = "1.4", path = "../../../knowledge/forensicnomicon/crates/core" }

CI clones this repo alone, so that sibling directory does not exist.

The fix

forensicnomicon-core 1.5.0 is published and already satisfies the 1.4
caret, so dropping path needs no version change. Cargo.lock now records
source = "registry+https://github.com/rust-lang/crates.io-index".

Fleet context

A sweep of 454 manifests across 92 repos found 324 path dependencies, of which
3 escape their repository — and all three sit on one chain:

repo escaping dependency status
issen usb-forensic fixed in SecurityRonin/issen#15
peripheral-forensic forensicnomicon-core this PR
usb-forensic peripheral-core blocked, see below

usb-forensic cannot be fixed the same way yet. Its manifest says "switch to
the pure registry version = "0.9" once peripheral-core publishes the
reader"
, and peripheral-core tops out at 0.8.1 on crates.io. Building
usb-forensic against the published 0.8.1 fails with unresolved import peripheral_core::shellbag — the local core/src/lib.rs declares pub mod shellbag and the published crate does not, under the same version number
0.8.1
. So this repo carries unreleased API that was never version-bumped.

Merging this PR lets peripheral-forensic's release pipeline run again, which is
the prerequisite for publishing a peripheral-core that contains shellbag;
only then can usb-forensic come off its path dependency. That ordering is
ADR-0006 bottom-up release order.

Verification

  • cargo check --workspace --all-targets — compiles
  • cargo fmt --all -- --check — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace — 75 passed, 0 failed

… repo

`core/Cargo.toml` declared `forensicnomicon-core = { version = "1.4", path =
"../../../knowledge/forensicnomicon/crates/core" }`. That path leaves this
repository and lands in the sibling `components/knowledge/forensicnomicon`.
CI clones peripheral-forensic alone, so the directory is absent and manifest
loading fails before any check begins:

    error: failed to load manifest for workspace member
      /home/runner/work/peripheral-forensic/peripheral-forensic/core
      failed to load manifest for dependency `forensicnomicon-core`
      No such file or directory (os error 2)

That single failure is why 11 checks are red at once -- Clippy, Format, Test,
MSRV, Docs, Coverage, cargo-deny, Cargo Vet, the fuzz smoke and both
release-plz jobs. None of them is a lint, test, advisory or audit failure;
none of them ran.

It is invisible locally because the whole fleet is checked out side by side
and the path resolves. forensicnomicon-core 1.5.0 is published and satisfies
the existing `1.4` caret, so dropping `path` needs no version change:
Cargo.lock now records `source = "registry+https://github.com/rust-lang/crates.io-index"`.

Verified: `cargo check --workspace --all-targets` compiles, `cargo fmt --all
-- --check` and `cargo clippy --workspace --all-targets -- -D warnings` are
clean, `cargo test --workspace` passes 75 tests with 0 failures.
@socket-security

socket-security Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedforensicnomicon-core@​1.3.0 ⏵ 1.5.010010093100100

View full report

h4x0r added 2 commits August 3, 2026 00:56
Cargo Vet could not resolve the graph while `cargo metadata` was broken, so
it reported failure without checking a crate. Now that it runs it names two
unvetted dependencies.

forensicnomicon-core is mine: it was first-party while it was a path
dependency, and taking it from the registry creates a real vetting
obligation. shellitem was pre-existing and merely invisible.

Both are ours, published to crates.io by h4x0r, so both take ADR-0018
mechanism 2 -- `cargo vet trust`, not an `[[exemptions]]` entry. A trust
record binds to the publisher identity rather than a version, so it does not
go stale on the next release.

`cargo vet --locked` -- CI's exact invocation, which forbids refreshing the
publisher cache -- now succeeds.
The 100% line gate could not run while `cargo metadata` was broken. With it
running again it names ten uncovered production lines, none annotated
`// cov:unreachable`: `DeviceConnection::vendor_name` and `product_name` in
core/src/lib.rs, and two branches in core/src/usb_ids.rs -- the `continue`
that skips a two-tab interface line, and `parse_id_line`'s rejection when the
id is not followed by two spaces.

Tests only; no production code changes. Both files now report 100% line
coverage locally.

Writing the separator test turned up a small deviation worth recording rather
than quietly fixing. `parse_id_line`'s doc says the id must be followed by
"exactly two spaces", but the check reads positions 4..6 only, so a third
space is accepted and survives as a leading space in the name -- `trim_end`
does not touch the front. No real usb.ids line reaches it, since the format
uses exactly two spaces throughout. `a_wider_separator_is_accepted_and_keeps_
the_surplus_in_the_name` asserts the current behaviour so that changing it is
a visible decision instead of a silent one.
@h4x0r
h4x0r marked this pull request as ready for review August 4, 2026 04:01
@h4x0r
h4x0r merged commit c7de132 into main Aug 4, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant