Cargo health · Security
Git dependency pinned by branch or tag
rust_doctor::cargo::unpinned_git_dependency
Set rev to the full 40-character commit SHA intended by the project.
- Category
- Security
- Default level
- warn
- Tier
- P1
- Producer
- Cargo health
- Diff scope
- line
Not a defect when
The tag lives in a repository the team controls where tags are immutable by policy, and Cargo.lock is committed, so the resolved commit is already fixed for every build.
What it reads
Cargo.toml, Cargo.lock and .cargo/config.toml.
Tier
Serious: worth interrupting other work for.
The tier bounds how severe a rule may be; its category bounds the tier.Diff scope
The changed line itself.
What--scope contextual looks at to decide whether a change caused the finding.Change it
Turn it off, or make it blocking, without touching the code it flags:
rust-doctor --rule rust_doctor::cargo::unpinned_git_dependency=off .
rust-doctor --rule rust_doctor::cargo::unpinned_git_dependency=error .