Langsung ke konten
Skillpedia
Keamanan8.0k ยท #12703

rust-review

Fungsinya

Skill ini meminta agen memeriksa program Rust untuk kelemahan keamanan, terutama di tempat kode keluar dari aturan keamanan Rust. Skill ini untuk developer dan peninjau keamanan yang bekerja pada crate dan layanan Rust.

Kapan dipakai

  • โœ“Saat Anda mengaudit pustaka atau layanan Rust yang memakai kode unsafe.
  • โœ“Saat Anda memeriksa proyek Rust yang berbicara dengan kode C atau antarmuka asing lainnya.
  • โœ“Saat Anda perlu menemukan risiko crash, seperti panic yang bisa dipicu pengguna di server.

Link skill

https://github.com/trailofbits/skills/blob/main/plugins/rust-review/skills/rust-review/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/trailofbits/skills/blob/main/plugins/rust-review/skills/rust-review/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya butuh tinjauan keamanan untuk proyek Rust saya, terutama blok unsafe dan binding C-nya.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agen membagi kode menjadi kelompok dan menyerahkan setiap kelompok ke pekerja yang membaca kode dan menulis temuan. Juri kemudian menghapus duplikat dan memeriksa alarm palsu sebelum daftar akhir dibuat.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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 zeroization.

Subagents

Subagent type Purpose Tool set
rust-review:rust-review-worker Run assigned cluster, write findings Read, Write, Edit, Bash
rust-review:rust-review-dedup-judge Merge duplicates (runs first) Read, Write, Edit, Glob
rust-review:rust-review-fp-judge FP + severity + final reports (runs second) Read, Write, Edit, Bash

Tools come from each agent's frontmatter at spawn time. The orchestrator's Task*/Agent/Bash/etc. come from this skill's allowed-tools. Search-tool / Bash interaction: in current Claude Code, an agent granted Bash is not also granted the dedicated Glob or Grep tools (the calls return No such tool available; the harness expects find/grep/rg via Bash instead). So only the dedup-judge โ€” the one agent that holds no Bash โ€” uses Glob; the worker, fp-judge, and the orchestrator resolve and search paths with Read / Bash find / rg / grep / test -f instead. Because the cluster/finder prompt seeds are written in ripgrep regex syntax (\s, \d, \b), Bash-holding agents must run them with rg. If rg is not installed its call fails loudly (command not found) โ€” fall back to grep -E with POSIX classes (\sโ†’[[:space:]], \dโ†’[[:digit:]], drop \b), never a raw-\s grep whose silent empty becomes a bad cleared. Do not reintroduce Glob/Grep into a Bash-holding agent's protocol.


Architecture

coordinator: write context.md โ†’ build_run_plan.py โ†’ TaskCreate ร— M
          โ†’ spawn primer (foreground) โ†’ spawn M workers (parallel)
          โ†’ classify Phase-7 outcomes + write findings-index.txt
          โ†’ dedup-judge โ†’ fp-judge โ†’ report safety net (SARIF + REPORT.md) โ†’ return REPORT.md

Output directory contains: context.md, plan.json, worker-prompts/, findings/, findings-index.d/ (per-worker shards), findings-index.txt, coverage/ (per-worker coverage-gate files), run-summary.md, dedup-summary.md, fp-summary.md, REPORT.md, REPORT.sarif.

Path convention: every later phase shells out to ${RUST_REVIEW_PLUGIN_ROOT}/scripts/*.py, so resolve that variable first to the plugin directory that contains prompts/clusters/unsafe-boundary.md (and scripts/build_run_plan.py). Try in order, first hit wins:

  1. Native Claude Code โ€” ${CLAUDE_PLUGIN_ROOT}, accepted if Bash: ls "${CLAUDE_PLUGIN_ROOT}/prompts/clusters/unsafe-boundary.md" resolves.
  2. Codex โ€” ${CODEX_PLUGIN_ROOT} (set it the same way if that var is present and resolves the marker).
  3. Fallback search โ€” covers Codex installs under ~/.codex, Claude installs under ~/.claude, and a local checkout / repo run: Bash: find ~/.claude ~/.codex . -path '*/plugins/rust-review/prompts/clusters/unsafe-boundary.md' -print -quit 2>/dev/null. Take the match and strip the trailing /prompts/clusters/unsafe-boundary.md to get the root (the home dirs are searched before . so an installed copy wins over any vendored copy in the audited repo).

Set RUST_REVIEW_PLUGIN_ROOT to the resolved root. If all three fail, abort with a message naming the roots searched โ€” do not enter Phase 4 with an empty variable (every `uv run --no-project "${RUST_REVIEW_PLUGIN_ROOT}/scripts

Pertanyaan umum

Apakah skill ini mencakup kode C atau C++ juga?

Tidak. Untuk proyek C atau C++ murni, skill ini menyarankan alat tinjauan yang berbeda.

Apakah skill ini mencakup cara menghapus rahasia dari memori?

Tidak. Penghapusan rahasia dari memori ditangani oleh skill lain.

Bisakah skill ini meninjau driver kernel?

Hanya sebagai saran. Cakupan untuk Rust mode kernel belum lengkap, sehingga hasilnya ditandai sebagai saran.

Detail

Deskripsi asli dari pembuat

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.

repo: trailofbits/skills

Popularitas

Bintang GitHub
8.0k
Peringkat
#12703
Lisensi
CC-BY-SA-4.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa