c-review
Fungsinya
Menjalankan tinjauan keamanan pada program C dan C++ native, mencari kerusakan memori, overflow integer, kondisi balapan, dan kesalahan serupa. Skill ini untuk developer dan auditor yang bekerja pada daemon, layanan, dan perangkat lunak desktop.
Kapan dipakai
- βSaat auditor meninjau aplikasi C atau C++ native untuk masalah keamanan memori.
- βSaat developer memeriksa daemon atau layanan Windows untuk overflow integer atau kondisi balapan.
- βSaat tim membutuhkan tinjauan keamanan kode C atau C++ yang berjalan di user space.
Link skill
https://github.com/trailofbits/skills/blob/main/plugins/c-review/skills/c-review/SKILL.mdSalin 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
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTinjau layanan jaringan C++ saya untuk bug memori dan overflow integer yang bisa dimanfaatkan penyerang jarak jauh.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini menanyakan model ancaman, seperti penyerang jarak jauh atau lokal, serta cakupan dan tingkat keparahan yang harus dilaporkan. Setelah itu skill ini meninjau kode dengan pekerja terpisah dan mengembalikan satu laporan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
C/C++ Security Review
Resolve four parameters, make one Workflow call, return the report. The workflow owns
concurrency, retries and result collection.
Use for: native C/C++ userspace β memory safety, integer overflow, races, type confusion, Linux/macOS daemons, Windows services.
Not for: kernel drivers or modules; managed languages (Java, C#, Python, Go, Rust); embedded or bare-metal code with no libc.
Phase 0 β Parameters
Parse any free text on the invocation line (flamenco only, high severity only, use haiku) and pre-fill what it implies. Then make one AskUserQuestion call for
whatever is still unresolved. Never silently default a required parameter.
| Parameter | Values | Inferring it from the invocation |
|---|---|---|
threat_model |
REMOTE / LOCAL_UNPRIVILEGED / BOTH |
"remote", "network", "attacker" β REMOTE; "local", "unprivileged" β LOCAL_UNPRIVILEGED; otherwise ask |
worker_model |
haiku / sonnet / opus / inherit |
An explicit model name. Otherwise ask. inherit uses the session model |
severity_filter |
all / medium / high |
"all", "every", "noisy" β all; "medium and above" β medium; "high only" β high; otherwise ask |
scope_subpath |
repo-relative directory, optional | "X only", "just audit X/" β the matching subdirectory, fuzzy-matched against top-level dirs. Absent β .. Ambiguous β ask |
Two scopes stay separate for the whole run:
finding_scope_root=scope_subpath(default.) β a finding must live inside it, and it is the tree the unit list is generated from.context_roots=.β read freely to establish callers, build flags and reachability. Narrow it tofinding_scope_rootonly if the user explicitly forbids wider reading, and say that reachability confidence drops when you do.
Phase 1 β Resolve paths
Resolve this plugin's directory from this SKILL.md's installed location to an absolute
plugin_root: it holds workflows/c-review.js,
agents/c-review-worker.md, and
scripts/assemble_findings.py. Print that path; stop if
any is missing. Do not search caches or the audited repository for another plugin copy.
# The workflow cannot call Date.now(), so the timestamp is made here.
output_dir="$(pwd)/.c-review-results/$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$output_dir"; echo "$output_dir"
# A Workflow script has no filesystem APIs, and `assemble_findings.py` resolves `--scope`
# against ITS OWN cwd. Resolve it once here and pass BOTH spellings, or the workflow strips
# `src/` from a finding's path while the assembler strips `/repo/src/`, and the two disagree
# about which findings are duplicates of each other.
scope_abs="$(cd "${scope_subpath:-.}" && pwd)" || echo "scope_subpath does not exist"
echo "$scope_abs"
uv must be on PATH: Detect runs the unit enumerator and Assemble runs
assemble_findings.py. If uv is missing, say so and stop β the whole review is
partitioned from that unit list.
Phase 2 β Run the workflow
Invoking this skill is the opt-in to multi-agent orchestration β call Workflow
without asking again. A review of a real codebase also runs past any default workflow
size guideline; that guideline is advisory and this is the case it exempts. Do not
shrink the fan-out to fit it, and do not substitute hand-spawned Agent calls.
One Workflow call. scriptPath takes the absolute path resolved in Phase 1; args
must be a real JSON object, not a JSON-encoded string.
Workflow({
scriptPath: "<plugin_root>/workflows/c-review.js",
args: {
outputDir: "<output_dir>",
pluginRoot: "<plugin_root>",
threatModel: "REMOTE",
severityFilter: "all",
findingScopeRoot: "expat/lib",
findingScopeRootAbs: "/abs/path/to/repo/expat/lib",
contextRoots: ".",
workerModel: "sonnet"
}
})
findingScopeRootAbs is the scope_abs from Phase 1 and is not optional in practice:
omitted, the workflow tells the assembler no absolute root is known and a finding filed as
/repo/expat/lib/xmlparse.c stops merging with the same bug filed as xmlparse.c.
Six further arguments are optional. Omitted, each takes its default; passed with the wrong TYPE, the workflow throws with the field name rather than defaulting. Pass them only when the user asks or when running an evaluation:
| Argument | Default | What i
Pertanyaan umum
Apa yang tidak tercakup?
Driver kernel, bahasa terkelola seperti Java, Python, Go, dan Rust, serta kode bare-metal tanpa pustaka C berada di luar cakupan.
Apakah skill ini bertanya dulu sebelum berjalan?
Ya. Skill ini menanyakan setiap pengaturan yang tidak bisa disimpulkan, seperti model ancaman atau filter tingkat keparahan, alih-alih menebak.
Bisakah hanya memeriksa satu folder?
Bisa. Anda bisa membatasi tinjauan ke subfolder proyek.
Detail
Deskripsi asli dari pembuat
Performs comprehensive C/C++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C/C++ applications, reviewing daemons or services for memory safety, or hunting integer overflow / use-after-free / race conditions in userspace code.
repo: trailofbits/skills
Popularitas
- Bintang GitHub
- 8.0k
- Peringkat
- #12667
- Lisensi
- CC-BY-SA-4.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
audit-context-building
8.0kMembantu agent Anda mempelajari basis kode yang belum dikenal sebelum tinjauan keamanan, dengan memetakan apa yang diasumsikan, dijamin, dan bergantung pada setiap fungsi.
algorand-vulnerability-scanner
8.0kMembantu agent Anda memindai smart contract Algorand, yang ditulis dalam TEAL atau PyTeal, untuk 11 masalah keamanan umum seperti serangan rekeying dan biaya yang tidak diperiksa.
audit-prep-assistant
8.0kMembantu agent Anda menyiapkan basis kode untuk tinjauan keamanan dari luar, dengan analisis statis, cakupan tes, pembersihan kode mati, dan dokumentasi yang jelas.
cairo-vulnerability-scanner
8.0kMembantu agent Anda memindai smart contract Cairo di StarkNet untuk 6 masalah serius, termasuk overflow aritmetika, pesan lintas lapisan yang berisiko, dan replay tanda tangan.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.