rust-security

Audit Rust projects for dependency vulnerabilities and unsafe FFI patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/awfixers-stuff/opencode-config --skill rust-security-awfixers-stuff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-security
Source: https://github.com/awfixers-stuff/opencode-config/tree/main/skills/rust-security
Command: npx skills add https://github.com/awfixers-stuff/opencode-config --skill rust-security-awfixers-stuff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide actionable guidance to discover and remediate dependency vulnerabilities, enforce policy, and eliminate unsafe patterns in Rust codebases so teams can reduce supply chain and memory-safety risk.

Core Features & Use Cases

  • Dependency auditing: Run cargo-audit to find CVEs and integrate JSON outputs into CI pipelines.
  • Policy enforcement: Configure cargo-deny to enforce license, advisory, ban, and source policies in automated checks.
  • Advisory and soundness checks: Use the RUSTSEC advisory database, Miri for undefined behavior detection, and fuzzing to find security-critical bugs.
  • Safe FFI guidance: Review and apply memory-safe patterns at language boundaries to avoid pointer, lifetime, and buffer risks.
  • Use Case: Security engineer adds cargo-deny to CI and runs cargo-audit and fuzzing together with Miri to triage and fix a transitive dependency CVE.

Quick Start

Use the rust-security instructions to run a cargo-audit scan, enforce deny.toml policies with cargo-deny, and produce CI-friendly reports for the current repository.

Frequently Asked Questions about rust-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Rust dependencies for known vulnerabilities using cargo-audit?

To audit Rust dependencies for vulnerabilities, run cargo-audit against your Cargo.lock file to discover known CVEs from the RUSTSEC advisory database. The scan produces CI-friendly JSON reports that security reviewers can integrate directly into automated pipelines for triage and remediation.

What is the best way to enforce license and advisory policies in a Rust CI pipeline?

The best way to enforce license and advisory policies in a Rust CI pipeline is by configuring cargo-deny with a deny.toml file. This tool automatically checks dependencies against ban, source, and advisory policies, failing the build if violations are detected and ensuring supply chain compliance.

How does Miri detect undefined behavior in Rust codebases?

Miri detects undefined behavior in Rust codebases by executing programs on the nightly toolchain to catch memory safety and invalid pointer issues at runtime. It acts as an interpreter that identifies violations of Rust's safety guarantees, helping eliminate critical bugs before deployment.

Can I review unsafe FFI patterns to prevent pointer and lifetime risks in Rust?

Yes, you can review unsafe FFI patterns to prevent pointer, lifetime, and buffer risks at language boundaries. Applying memory-safe patterns during FFI reviews mitigates vulnerabilities where Rust interacts with external C code, ensuring that cross-language data transfers remain secure.

Do I need a nightly Rust toolchain to run Miri checks for undefined behavior?

Yes, you need a nightly Rust toolchain to run Miri checks for undefined behavior. The Skill requires access to the nightly toolchain and the ability to run cargo tooling to execute these soundness checks, producing machine-readable outputs for CI integration.

How do I integrate fuzzing with cargo-audit to triage transitive dependency CVEs?

To integrate fuzzing with cargo-audit for triaging transitive dependency CVEs, run both tools together within your CI pipeline. Combine cargo-audit's vulnerability reports with fuzzing inputs to expose memory bugs and confirm exploitability, producing actionable remediation guidance.