rust-security
Skill1 starsChanged 40 days agoMITView on GitHub
Rust security review — dependencies for known vulnerabilities (cargo-audit/RUSTSEC), licenses and supply chain (cargo-deny), unsafe surface (cargo-geiger), and code patterns (semgrep). Approve only when every tool ran locally clean; a tool that did not run caps it at Warning, a red CI check blocks, a green one only informs. Use when security-reviewing a Rust project, vetting dependencies, checking for vulnerable crates or license issues, or setting up a security gate. Triggers: CVE, RUSTSEC, cargo-audit, cargo-deny, cargo-geiger, semgrep.
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Dankosik/cargo-modernizetheir own version, first seen Nov 29, 2026
- mohitmishra786/low-level-dev-skillstheir own version, first seen Nov 15, 2026
- po4yka/rust-skillstheir own version, first seen Nov 2, 2026
- adxptived/Rust-Skillstheir own version, first seen Oct 17, 2026
- JSBtechnologies/rustkbtheir own version, first seen Oct 11, 2026
Used with
Projects with it also use rust-debugging.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DankosikSkillrust-debugging
Causality. Use for an uncertain Rust CLI defect, panic, hang, incorrect output, resource leak, or platform-dependent failure.
Also in 3 projects that use this
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- mohitmishra786/low-level-dev-skills★ 303same name
- po4yka/rust-skills★ 7same name
- adxptived/Rust-Skills★ 1same name
- Dankosik/cargo-modernize★ 0same name
- JSBtechnologies/rustkb★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- addressing-findingsSkill
- auditSkill
- codebase-onboardingSkill
- codex-reviewSkill
- compatibilitySkill
- debuggingSkill
- developSkill
- distributed-racesSkill
- memorySkill
- nix-dev-envSkill
- nix-flakesSkill
- nixosSkill
- nix-packagingSkill
- nix-reviewSkill
- refactoringSkill
- retroSkill
- review-initSkill
- review-rulesSkill
- rust-architecture-reviewSkill
- rust-architectureSkill
- rust-cliSkill
- rust-cloud-nativeSkill
- rust-concurrencySkill
- rust-ecosystemSkill
- rust-embeddedSkill
- rust-errorsSkill
- rust-fintechSkill
- rust-idiomsSkill
- rust-macrosSkill
- rust-mlSkill
- rust-navigationSkill
- rust-ownershipSkill
- rust-performanceSkill
- rust-pluginsSkill
- rust-reviewSkill
- rust-testingSkill
- rust-traitsSkill
- rust-unsafeSkill
- rust-webSkill
- specsSkill
- sql-reviewSkill
The file
Files
Rust Security
The security pass over a Rust project: vet what you depend on, measure your unsafe surface, and
scan code for dangerous patterns. The craft:rust-security-scanner agent runs this and reports; this
skill is the rubric. Tool usage and config are in tools.md.
When to Use
- Security review of a Rust project or PR
- Vetting dependencies (vulnerabilities, licenses, supply chain)
- Setting up a security gate in CI
- Auditing the
unsafefootprint
Threat areas and tools
| Area | What goes wrong | Tool |
| Vulnerable deps | a dependency has a known CVE/RUSTSEC advisory | cargo audit |
| Supply chain & policy | bad license, yanked/duplicate/banned crate, untrusted source | cargo deny |
| Unsafe surface | how much unsafe you and your deps pull in | cargo geiger |
| Code patterns / taint | injection, hardcoded secrets, banned APIs, tainted input → sink | semgrep (+ clippy) |
| App-level (in the diff) | SQL/command injection, path traversal, unbounded deserialization, secrets in source | rust-review (CRITICAL — Safety) |
These are complementary: cargo audit/deny look at what you depend on, geiger at unsafe
exposure, semgrep/clippy at your code. Run all of them.
Severity & verdict
Same shape as rust-review:
| Verdict | When |
| Block ⛔ | a vulnerable dep with a known exploit/fix available; a real injection/secret/taint finding; a denied license; a red CI audit/deny check, even when no tool ran locally |
| Warning ⚠️ | advisories with no fix yet (mitigate/track), unmaintained-crate warnings, high unsafe surface; a partial scan — a tool not installed, timed out or broken locally (name each one) |
| Approve ✅ | every tool (cargo audit, cargo deny, cargo geiger, semgrep) ran locally and came out clean, no high-confidence code findings |
CI informs, never certifies: a red CI check that runs a tool blocks, a green one is reported
(CI green for <check>) but never stands in for a tool that did not run here — that tool's signal
stays unknown, so the verdict is at most Warning, never Approve.
Report each finding as severity · source(tool) · what · why exploitable · fix/mitigation.
Triage — signal vs noise
- RUSTSEC advisory with a fixed version → bump it; that's the easy win.
- Advisory with no fix → assess reachability (do you call the affected path?), pin/patch, or replace the crate; if truly unreachable, document an allow with an expiry, don't ignore silently.
- Unmaintained crate (RUSTSEC-…-unmaintained) → warning, plan a migration; not an emergency.
- semgrep finding → confirm the source is actually attacker-controlled and reaches the sink before calling it real (taint can over-report); adversarially verify like any review finding.
unsafein a dependency →geigercounts it; high counts warrant reading the crate's safety story, not automatic rejection.
Custom rules are the point of semgrep
clippy/audit catch the known; semgrep encodes your rules — banned APIs, "never log this type", "don't build SQL with format!", taint from request body to a command. That's its edge over the Rust-native tools (which it complements, not replaces). Examples in tools.md.
Handling secrets in memory
Scanning for hardcoded secrets (above) is only half the job — secrets that legitimately live in
memory (API keys, tokens, passwords loaded from env) must not leak via Debug/logs, linger
in memory, or land in core dumps/swap. Wrap them in secrecy:
[dependencies]
secrecy = "0.10"use secrecy::{SecretString, ExposeSecret};
struct Config { api_key: SecretString } // Debug is redacted (no secret bytes printed)
let key = SecretString::from(std::env::var("API_KEY")?);
client.authenticate(key.expose_secret()); // .expose_secret() is the only way out — greppableSecretBox<T>/SecretStringgive a redactedDebug(a secret can't accidentally end up in a log line or error) and zeroize the memory on drop (viazeroize, so it doesn't linger).expose_secret()is the single, searchable point where the raw value is accessed — easy to audit and to lint.- Load secrets straight into a
SecretStringat the config boundary (→rust-cloud-native/rust-cliconfig); never put a rawStringsecret on a struct that derivesDebug/Serialize.
zeroize (zeroize = "1") is the lower-level primitive if you need to scrub a buffer (keys,
decrypted plaintext) without the secrecy wrapper.
Boundaries
- Reviewing the diff's code for correctness + safety smells →
rust-review(this skill is the tooling/supply-chain layer; they share the verdict vocabulary). - Soundness of your own
unsafe(invariants, UB) →rust-unsafe; verify it with thecraft:rust-miriagent. - Dependency freshness/unused (not security) →
rust-ecosystem. - Fuzzing parsers / deserializers / any untrusted-input surface for panics and crashes
(
cargo-fuzz) →rust-testing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

