rust-security
/rust-security
Use when auditing Rust dependencies for vulnerabilities, enforcing license and source policies with cargo-deny, reviewing RUSTSEC advisories, or fuzzing and testing unsafe code for security.
- Author
- gosuda ↗
- Repository
- dalcom-skills ↗
- Licence
- Apache-2.0
- Last repository change
- 10.11.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Use when auditing Rust dependencies for vulnerabilities, enforcing license and source policies with cargo-deny, reviewing RUSTSEC advisories, or fuzzing and testing unsafe code for security.
Original author description
Use when auditing Rust dependencies for vulnerabilities, enforcing license and source policies with cargo-deny, reviewing RUSTSEC advisories, or fuzzing and testing unsafe code for security.
How it works
- Auditing dependencies with cargo-audit
- Enforcing policy with cargo-deny
- Reading RUSTSEC advisories
- Checking FFI boundaries
- Fuzzing for security bugs
- Confirming soundness with Miri
- Hardening the supply chain
- What you hand back
SKILL.md preview
---
name: rust-security
description: 'Use when auditing Rust dependencies for vulnerabilities, enforcing license and source policies with cargo-deny, reviewing RUSTSEC advisories, or fuzzing and testing unsafe code for security.'
---
# Rust security
You audit a Rust project's supply chain and report what is vulnerable, what violates policy, and what needs hardening. You never change source files: every result lands in a chat-output report with findings, recommended commands, and a remediation order.
What you need before starting: the Cargo project path or dependency list, and which tool the job calls for (`cargo-audit`, `cargo-deny`, `cargo-fuzz`, Miri, or manual review). License allowlists, banned crates, allowed sources, and CI context are optional but shape the policy checks.
## Auditing dependencies with cargo-audit
Install `cargo-audit 0.22.2` with `cargo install cargo-audit --locked`, then run `cargo audit`. For CI use `cargo audit --deny warnings`; to pin the lockfile use `cargo audit --file Cargo.lock`; for machine-readable output use `cargo audit --json`, with `--format json` and `--format sarif` also available. The step is done when the output either lists advisories or reports none. A reported vulnerability is resolved by upgrading, replacing the dependency, or ignoring it with a written rationale (never a bare ignore).
## Enforcing policy with cargo-deny
Install `cargo-deny 0.20.2` with `cargo install cargo-deny --locked`, run `cargo deny init` for a template, then run `cargo deny check [advisories|licenses|bans|sources|all]`. Configure `deny.toml` along these lines:
```toml
[advisories]
yanked = "deny"
unmaintained = "workspace"
ignore = [
"RUSTSEC-2021-0145",
]
[licenses]
allow = [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
]
[bans]
multiple-versions = "warn"
wildcards = "deny"
deny = [
{ crate = "openssl", use-instead = "rustls" },
]
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-git = [
"https://github.com/my-org/private-crate",
]
```
The step is done when the check runs and any policy violation is reported. A violation is resolved by editing `deny.toml` or by fixing the underlying license, banned-crate, or source problem.
## Reading RUSTSEC advisories
Use `cargo audit` or browse `https://rustsec.org/`, and classify each advisory as `vulnerability`, `unmaintained`, or `unsound`. The step is done when the advisory list and its categories are known.
## Checking FFI boundaries
For each `extern "C"` function, validate pointer and length arguments, document the C-side invariant, and prefer safe wrapper crates where one exists. The step is done when every FFI entry point has explicit validation. When an FFI input cannot be validated as written, add checks or renegotiate the C contract to require valid pointers and lengths.
## Fuzzing for security bugs
Install `cargo-fuzz` with `cargo install cargo-fuzz`, then `cargo fuzz init`, `cargo fuzz add <target>`, and `cargo fuzz run --sanitizer address <target>`. Reproduce a crash with `cargo fuzz run <target> <artifact>`. The step is done when a fuzz target runs or a crash is reproduced. A target that finds nothing gets more time, a seed corpus, or a dictionary. An empty short run never counts as proof of safety.
## Confirming soundness with Miri
Run `cargo +nightly miri test` on the unsafe code, using `MIRIFLAGS="-Zmiri-disable-isolation -Zmiri-backtrace=full"` when the harness needs it. The step is done when Miri reports undefined behavior or completes cleanly. When Miri reports an unsupported foreign function, stub it under `#[cfg(miri)]` rather than skipping the run.
## Hardening the supply chain
Keep `Cargo.lock` for binaries, run `cargo fetch --locked`, review duplicates with `cargo tree -d`, consider `cargo vet` for peer-reviewing new dependencies, and use `cargo-machete` to find unused ones. The step is done when the supply-chain state is reported.
## What you hand back
A security report listing vulnerabilities, advisories, policy violations, and FFI risks; the recommended commands and configuration files; a fuzzing and Miri test plan; and a prioritized remediation list.
Files in this package (2)
- SKILL.md 4 KB
- agents/openai.yaml 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · gosuda/dalcom-skills | 95 | Apache-2.0 |
| OutlineDriven/outline-driven-development | 100 | Apache-2.0 |
| mohitmishra786/low-level-dev-skills | 100 | MIT |
| claude-dev-suite/claude-dev-suite | 95 | MIT |
Database snapshot: 13.11.2026 · package version 3f168c252483 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cargo-deny
Run and fix cargo-deny (licenses, RustSec advisories, banned/duplicate crates, sources) for this workspace using deny.toml. Use when adding or upgrading dependencies, when `cargo deny check` or the CI deny job fails, or when asked about dependency policy. - 100security
This skill should be used when the user asks about "security", "vulnerability scanning", "dependency audit", "supply chain security", "license compliance", "security audit", "CVE", "OWASP", "secrets scanning", "cargo-deny", "npm audit", or needs guidance on security requirements… - 100rust-dependencies
Manage Rust dependency governance at scale — version requirement strategy, crate and source selection, feature minimization, transitive dependency analysis, cargo-deny license/ban/advisory/source policy, cargo-audit, cargo-outdated, Renovate/Dependabot automation, dependency… - 100dependency-audit
Use when auditing project dependencies for security vulnerabilities, outdated packages, or license compliance across npm/yarn/pnpm, pip, go, and cargo. - 100rust-supply-chain
Rust supply-chain & quality toolchain — cargo-deny (license + advisory + bans), cargo-audit (RustSec advisory DB), cargo-nextest (faster test runner with retry/parallel), cargo-tarpaulin / llvm-cov (code coverage), cargo-machete (unused deps), cargo-outdated (version gap… - 95rust-supply-chain
Audit a Rust dependency tree — advisories, licences, banned and duplicate crates, and unmaintained dependencies — and turn each finding into a decision. Use when checking whether dependencies are safe to ship, when cargo audit or cargo deny reports something, when adding a…