Langsung ke konten
Skillpedia
Keamanan7.7k Β· #13107

vuln-scan

Fungsinya

Skill ini membaca kode sumber proyek dan mencari kelemahan keamanan dalam beberapa area fokus. Skill ini tidak membangun atau menjalankan kode. Skill ini ditujukan untuk peninjau keamanan yang menginginkan tinjauan awal atas sebuah basis kode.

Kapan dipakai

  • βœ“Saat Anda menginginkan tinjauan statis atas basis kode untuk masalah keamanan sebelum menjalankan tes apa pun.
  • βœ“Saat Anda menginginkan temuan dalam format yang dapat diteruskan untuk triase.
  • βœ“Saat Anda perlu memfokuskan tinjauan pada satu atau beberapa area risiko tertentu.

Link skill

https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/vuln-scan/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/anthropics/defending-code-reference-harness/blob/main/.claude/skills/vuln-scan/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

β€œBisakah Anda memindai kode proyek saya untuk masalah keamanan dan mendaftar hal berisiko yang Anda temukan?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent membagi tinjauan menjadi area fokus, membaca kode untuk setiap area, dan menulis temuan ke file JSON serta ringkasan yang mudah dibaca.

Konten teknis (SKILL.md asli)

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

/vuln-scan

Static vulnerability review of a source tree. Produces VULN-FINDINGS.json (+ a human-readable .md) that /triage ingests directly.

This skill does not execute code. It reads source and reasons about it. For execution-verified findings (ASAN crashes, reproducing PoCs), point the user at vuln-pipeline run <target> β€” see README Step 2.

Tool fallbacks. Prefer the dedicated Glob and Grep tools. Some sessions do not provision them β€” allowed-tools is a permission filter, not a loader, so listing them here does not make them appear. When Glob/Grep are unavailable, fall back to the read-only Bash commands whitelisted above: rg --files <scope> / ls -R for enumeration, rg -n / grep -rn for search, wc / head / file for sniffing. These are the ONLY permitted Bash commands; do not write helper scripts or pipe target content into a shell interpreter.

Arguments

  • <target-dir> (required) β€” directory to scan. Relative or absolute.
  • --focus <area> β€” scan only this focus area (repeatable). Skips recon.
  • --single β€” no subagent fan-out; one sequential pass. Use on tiny targets or when debugging the prompt.
  • --extra <file> β€” append the contents of <file> to the review brief (after the category list). Use to add org-specific vulnerability classes, compliance checks, or stack-specific patterns. Plain text; same shape as the category blocks below.
  • --no-score β€” skip the Step 3b confidence pass (saves a round of subagents). Findings keep the scanner's self-reported confidence only.

Step 1 β€” Scope

  1. Resolve <target-dir>. If it doesn't exist or has no source files, stop with an error.
  2. Look for <target-dir>/THREAT_MODEL.md. If present, parse its section 3 "Entry points & trust boundaries" table and section 4 "Threats" table for focus areas and threat classes. This is the preferred scoping input.
  3. If no THREAT_MODEL.md and no --focus: do a quick recon β€” list the source tree, read entry points and dispatch code, and propose 3-10 focus areas using the pattern <subsystem> (<function/file>) β€” <key operations>. Same shape as harness/prompts/recon_prompt.py.
  4. If --focus was given, use exactly those.

Tell the user the focus areas you'll scan and the source-file count before fanning out.

Step 2 β€” Fan out

Unless --single, spawn one Task subagent per focus area in parallel. Cap at 10 concurrent. Each subagent gets the review brief below with its focus area filled in. On tiny targets (<15 source files), fall through to --single automatically.

Review brief (per subagent)

You are conducting authorized static security review of source code. Your
focus area: **{focus_area}**. Other agents cover other areas; duplication
is wasted effort.

TARGET: {target_dir}
TRUST BOUNDARY: {from THREAT_MODEL.md section 3, or "untrusted input β†’ process memory"}

TASK: read the source in your focus area and identify candidate
vulnerabilities. This is static review β€” do NOT build, run, or probe
anything. Reason from the code.

REPORTING BAR: report anything with a plausible exploit path. Skip style
concerns, best-practice gaps, and purely theoretical issues with no attack
story at all β€” but if you're unsure whether something is real, REPORT IT
with a low confidence score rather than dropping it. A downstream triage
step does the rigorous verification; your job is to not miss things.

WHAT TO LOOK FOR:

  MEMORY SAFETY (C/C++ and unsafe/FFI blocks) β€” HIGH VALUE:
  - heap-buffer-overflow / stack-buffer-overflow / global-buffer-overflow
  - heap-use-after-free / double-free
  - integer overflow feeding an allocation or index
  - format-string bugs
  - unbounded recursion or allocation driven by untrusted size fields

  INJECTION & CODE EXECUTION β€” HIGH VALUE:
  - SQL / command / LDAP / XPath / NoSQL / template injection
  - path traversal in file operations
  - unsafe deserialization (pickle, YAML, native), eval injection
  - XSS (reflected, stored, DOM-based) β€” but see React/Angular note below

  AUTH, CRYPTO, DATA β€” HIGH VALUE:
  - authentication or authorization bypass, privilege escalation
  - TOCTOU on a security check
  - hardcoded secrets, weak crypto, broken cert validation
  - sensitive data (secrets, PII) in logs or error responses

  LOW VALUE β€” note briefly, keep looking:
  - null-pointer deref at small fixed offsets with no attacker control
  - assertion failures / clean error returns (correct handling, not a bug)

DO NOT RE
Pertanyaan umum

Apakah ini menjalankan kode saya?

Tidak. Skill ini hanya membaca file sumber dan menalar tentangnya.

Bisakah saya menambahkan pemeriksaan sendiri?

Bisa. Anda dapat menambahkan aturan atau area fokus tambahan dari file teks.

Apa yang terjadi dengan hasilnya?

Hasil disimpan dalam bentuk yang dapat dibaca langkah triase berikutnya.

Detail

Deskripsi asli dari pembuat

Static source-code vulnerability scan. Reads a target directory (and THREAT_MODEL.md if present), spawns parallel review subagents per focus area, and writes VULN-FINDINGS.json + .md for /triage to consume. Read-only β€” no building, running, or network. For execution-verified crashes, use vuln-pipeline instead. Use when asked to "scan for vulns", "review this code for security issues", "find bugs in <dir>", or as the step between /threat-model and /triage.

repo: anthropics/defending-code-reference-harness

Popularitas

Bintang GitHub
7.7k
Peringkat
#13107
Lisensi
β€”
Diperbarui
6/8/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa