/dstack-rust:rust-securityfrom DStack Rust
Audits Rust supply chains with cargo-audit and cargo-deny, reviews RUSTSEC advisories, checks FFI boundaries, and fuzzes unsafe code for security.
Ships in DStack Rust. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
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).
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:
[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.
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.
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.
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.
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.
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.
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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gosuda/dstack-skills --plugin dstack-rust10 skills in this plugin
/cargo-workflowsUse when managing Cargo workspaces, feature flags, build scripts, CI caching, dependency auditing, or Cargo.lock with Rust./idiomatic-rustUse when writing, reviewing, or refactoring Rust code. Routes the task to handbook chapters on idioms, lints, errors, testing, generics, and pointers under the edition 2024 and current-stable pins./rust-async-internalsUse when understanding the Rust Future poll model, Pin and Unpin, tokio scheduling, async stack traces, waker leaks, or select!/join! behavior.Other plugins' skills for the same job