Agent skill · Security

rust-review

Performs comprehensive Rust security review for safe/unsafe boundary issues, memory safety in unsafe blocks, concurrency hazards, panic-induced DoS, FFI safety, and async runtime mistakes. Use when auditing Rust crates, services, or libraries — particularly those with `unsafe`, FFI, or concurrent code.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codecan modify filesCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill rust-review --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 43 KB
Bundled scripts: none
Allowed tools: AgentAskUserQuestionSendMessageTaskCreateTaskUpdateTaskListReadWriteBash
Path: plugins/rust-review/skills/rust-review/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Performs comprehensive Rust security review for safe/unsafe boundary issues, memory safety in unsafe blocks, concurrency hazards, panic-induced DoS, FFI safety, and async runtime mistakes. Use when auditing Rust crates, services, or libraries — particularly those with unsafe, FFI, or concurrent code.

How it works

  • Runs in the main conversation and coordinates subagents (rust-review-worker, rust-review-dedup-judge, rust-review-fp-judge).
  • Uses a Task ledger for retries; workers and judges use tool sets declared in their frontmatter. Findings are exchanged via markdown-with-YAML files in a shared output directory.
  • Phase 0 collects parameters (threat_model, worker_model, severity_filter, scope_subpath). If needed, asks the user a single AskUserQuestion for unresolved parameters.
  • Phase 1 runs prerequisites to determine flags (has_unsafe, has_ffi, has_concurrency, has_async, has_packed_repr, has_fs_io) by probing the finding scope with Bash-based searches and regexes. It aborts if no Rust files exist in the finding scope.
  • Phase 2 creates an absolute output_dir (defaulting to a timestamped path) and ensures findings/ and coverage/ subdirectories exist.
  • Phase 3 skim-read context (READ-access to README and manifest files) and write context.md with YAML frontmatter, preparing the audit context for workers.
  • Phase 4 deploys the worker Prompts and Phase 5 collects findings; Phase 6 de-dup and Phase 8 report generation occur via the dedup-judge and fp-judge subagents, with SARIF output.
  • The skill enforces that only allowed tools are used and that path/command references are treated as explicit instructions for the agent workflow.

When to use it

Use for Rust applications or libraries requiring security auditing around unsafe boundaries, memory safety in unsafe blocks, concurrency hazards, panic-induced DoS, FFI safety, and async-runtime mistakes.

What it can touch

The skill coordinates with agents and Bash-based probes to discover Rust code patterns and manifests. It relies on the following tools being available to subagents: Agent, AskUserQuestion, SendMessage, TaskCreate, TaskUpdate, TaskList, Read, Write, Bash.

Caveats

  • Aborts if no Rust files are found in the finding scope during prerequisites.
  • The workflow expects external scripts and paths (e.g., ${RUST_REVIEW_PLUGIN_ROOT}/scripts/...) to render plans and findings; misconfiguration can lead to failures.
  • The process is described as multi-phase with multiple subagents; results depend on successful coordination and correct tool availability.
From the SKILL.md

# Rust Security Review Runs in the main conversation (invoke via `/rust-review:rust-review`). Orchestrator owns the `Task*` ledger as bookkeeping for retries; workers and judges have no Task tools. Workers and judges are named plugin subagents (`rust-review:rust-review-worker`, `rust-review:rust-review-dedup-judge`, `rust-review:rust-review-fp-judge`); tool sets are declared in `plugins/rust-review/agents/*.md`. Findings are exchanged via markdown-with-YAML files in a shared output directory. ## When to Use Rust application/library security review: safe/unsafe boundary auditing, memory safety in `unsafe` blocks, concurrency hazards, panic-induced DoS on servers, FFI safety, async-runtime mistakes. ## When NOT to Use - Pure-C / pure-C++ codebases — use `c-review` instead. - Smart contracts (Solana programs / NEAR contracts / Ink!) — use `solana-vulnerability-scanner` or the contract-specific skill. - Kernel-mode Rust drivers without userspace allocator — coverage is incomplete; flag as advisory only. - Secrets/key memory hygiene (zeroization, `Zeroize`/`ZeroizeOnDrop`/`secrecy` usage, lingering stack/heap copies) — use the `zeroize-audit` skill; rust-review does not cover memory zer

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Subagents
  4. Architecture
  5. Rationalizations to Reject
  6. Orchestration Workflow
  7. Phase 0: Parameter Collection
  8. Phase 1: Prerequisites
  9. Phase 2: Output Directory
  10. Phase 3: Codebase Context
  11. Phase 4: Build Run Plan (deterministic)
  12. Phase 5: Create Bookkeeping Tasks (orchestrator-internal)
  13. Phase 6: Spawn workers (optional cache-primer first, then M in parallel)
  14. Phase 7: Wait for Workers and Classify Outcomes
Commands it runs
Rust source presence (precondition)
find "${finding_scope_root:-.}" -name '*.rs' -print -quit
has_unsafe
grep -rlE '\bunsafe\s+(extern|fn|impl|trait)\b|\bunsafe\s*\{' --include='*.rs' "${finding_scope_root:-.}" | head -1
has_ffi
has_concurrency
has_async
grep -rlE '\basync\s+(fn|move|\{)|\.await\b|tokio::|async_std::|futures::' --include='*.rs' "${finding_scope_root:-.}" | head -1
has_packed_repr (outer #[repr(...packed...)] and inner #![repr(...packed...)])
grep -rlE '#!?\[repr\([^]]*packed' --include='*.rs' "${finding_scope_root:-.}" | head -1
More from skills
All skills →
About this skill
What does the rust-review skill do?

Performs comprehensive Rust security review for safe/unsafe boundary issues, memory safety in unsafe blocks, concurrency hazards, panic-induced DoS, FFI safety, and async runtime mistakes. Use when auditing Rust crates, services, or libraries — particularly those with `unsafe`, FFI, or concurrent code.

How do I install it?

Run `npx skills add trailofbits/skills --skill rust-review --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going