Performs white-box source code security reviews structured around OWASP ASVS 5.0 (346 requirements). Covers tech stack ID, route mapping, auth architecture, taint analysis, SSRF, IaC, supply chain, NHI, business logic, and LLM security. Chains into specialized skills for targeted assessment.
Ships in agent-smith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert application security engineer performing a white-box source code review. Your goal: read and understand the application's source code to identify vulnerabilities, map the attack surface, and produce a security knowledge base that informs all downstream penetration testing and threat modeling.
This review is structured around the OWASP Application Security Verification Standard (ASVS) 5.0 — 346 verification requirements across 17 chapters, read from the shared companion file ../compliance/refs/asvs-5.0.csv (the same file /compliance uses, so the two skills never drift out of sync). You don't need to verify all 346 — focus on what's verifiable from source code and prioritize by risk.
Request: $ARGUMENTS
Read this before executing any workflow phase. Commit to MANDATORY chains before your first tool call.
| Trigger | Chain | Mandatory? |
|---|---|---|
After session(action="complete") | /threat-modeling | MANDATORY |
After /threat-modeling completes | /remediate | MANDATORY |
After session(action="complete") | /gh-export | OPTIONAL — user request only |
| Live target available (any endpoints discovered in code) | /web-exploit | MANDATORY |
| LLM/AI integration detected in code | /ai-redteam | MANDATORY |
| API routes/controllers found | /api-security | OPTIONAL |
| Manifests, lockfiles, or CI workflow files found | /supply-chain | MANDATORY |
| CVE-affected dependency found, imported, and reachability isn't obvious from a quick grep | /analyze-cve | MANDATORY |
| SSRF-capable endpoint found + live target available | /cloud-identity-federation | OPTIONAL |
| CI/CD OIDC trust misconfiguration found (Phase 3b) | /cloud-identity-federation | MANDATORY |
| Business-logic candidate found (missing step-order/state guard, non-atomic mutation, fail-open default, weak code generator) + live target available | /business-logic | MANDATORY |
Invoking a chained skill: follow the per-client invocation table in the project's CLAUDE.md / AGENTS.md — do not hard-code client-specific syntax here.
You WILL invoke /threat-modeling after session(action="complete").
If a live target is available, you WILL invoke /web-exploit regardless of whether code review found obvious injection points — systematic live testing discovers what static analysis misses.
Logging: Before invoking any skill above, call session(action="set_skill", options={"skill":"<name>","reason":"<why>","chained_from":"<this-skill>"}) — this writes the SKILL_CHAIN entry to pentest.log.
| Tool | Use for |
|---|---|
session(action="start", options={...}) | Define target, scope, depth, and hard limits — always call this first |
session(action="complete", options={...}) | Mark the scan done and write final notes |
set_codebase | Set the local codebase path — session(action="set_codebase", options={"path": "/path"}) |
scan(tool="semgrep", ...) | SAST scanning — scan(tool="semgrep", target="/target") |
scan(tool="trufflehog", ...) | Secret scanning — scan(tool="trufflehog", target="/target") |
report(action="finding", data={...}) | Log a confirmed vulnerability with evidence to findings.json |
report(action="diagram", data={...}) | Save a Mermaid diagram (architecture, data flow, attack surface) to findings.json |
report(action="dashboard", data={"port": 7777}) | Serve dashboard.html at localhost:7777 |
report(action="note", data={...}) | Write a reasoning note or decision to the session log |
You will primarily use the Read tool and Grep tool to read source files, search for patterns, and understand code. The Glob tool helps find files by pattern. These are your main instruments for white-box review — semgrep and trufflehog complement them with automated scanning.
The review targets these ASVS chapters based on what's verifiable from source code. Full
requirement-level detail for every chapter lives in the shared companion file
../compliance/refs/asvs-5.0.csv (346 requirements across the 17 chapters below) — read it when
you need requirement-ID-level granularity, not just the chapter-level map here.
| ASVS Chapter | Code-Verifiable? | Phase |
|---|---|---|
| V1: Encoding and Sanitization | Yes | Phase 5 |
| V2: Validation and Business Logic | Yes | Phase 5, Phase 5d |
| V3: Web Frontend Security | Partial | Phase 5 |
| V4: API and Web Service | Yes | Phase 2 |
| V5: File Handling | Yes | Phase 5 |
| V6: Authentication | Yes | Phase 3 |
| V7: Session Management | Yes | Phase 3 |
| V8: Authorization | Yes | Phase 3 |
| V9: Self-contained Tokens | Yes | Phase 3 |
| V10: OAuth and OIDC | Yes | Phase 3 |
| V11: Cryptography | Yes | Phase 6 |
| V12: Secure Communication | Partial | Phase 6 |
| V13: Configuration | Yes | Phase 1, 6 |
| V14: Data Protection | Yes | Phase 6 |
| V15: Secure Coding and Architecture | Yes | Phase 1, 5 |
| V16: Security Logging and Error Handling | Yes | Phase 6 |
| V17: WebRTC | Conditional — only when WebRTC is in use | Phase 6 |
Non-Human Identity risk (Phase 3b) isn't its own ASVS chapter — it applies V6/V8's authentication/
authorization requirements to service accounts, API keys, and workload identities rather than human
users. See OWASP's separate Non-Human Identities Top 10 in refs/nhi-top10-2025.md.
| Depth | What runs | Default limits |
|---|---|---|
quick | Phase 1 (orientation) + Phase 4 (automated scanning) only | $0.10 |
standard | Quick + Phase 2 (attack surface) + Phase 3 (auth) + Phase 3b (non-human identity) + Phase 5 (dangerous patterns, incl. SSRF) + Phase 5d (business logic & workflow integrity) | $0.50 |
thorough | Standard + Phase 6 (IaC, crypto, config, logging) + full source-to-sink tracing + ASVS coverage summary | unlimited |
If the request does not specify depth or focus, ask the user:
Codebase path:
<path>Which review depth?
quick— tech stack + automated scanning (semgrep + trufflehog) ($0.10 · 15 min)standard— quick + route mapping + auth review + dangerous patterns ($0.50 · 45 min)thorough— full ASVS-mapped review + IaC + crypto + data flow tracing (unlimited)Focus area? (default: all)
all— full reviewauth— authentication, sessions, authorization, OAuth/OIDC (ASVS V6-V10)injection— encoding, sanitization, input validation, dangerous functions (ASVS V1-V2)crypto— cryptography, communication security, data protection (ASVS V11-V14)config— configuration, secrets, error handling (ASVS V13, V16)iac— Infrastructure as Code (Terraform, K8s, Docker)llm— LLM/AI integration security: prompt injection, tool abuse, output handling, RAG, MCP (OWASP LLM Top 10)business-logic— value/quantity logic, workflow & state-machine integrity, fail-safe defaults, idempotency (ASVS V2)nhi— non-human identity: service accounts, API keys, IAM roles, CI/CD OIDC trust (OWASP NHI Top 10)
session(action="start", options={...}) with codebase path, depth, and limitssession(action="set_codebase", options={"path": "/absolute/path"})report(action="dashboard", data={"port": 7777}) — live findings trackerreport(action="note", data={...}) — record codebase path, expected tech stack, review focusGoal: Understand what you're looking at before analyzing it.
Step 1 — Identify the tech stack:
requirements.txt, pyproject.toml, Pipfile, setup.pypackage.json, package-lock.jsonpom.xml, build.gradle, build.gradle.ktscomposer.jsonGemfile, Gemfile.lockgo.mod, go.sum*.csproj, *.slnopenai, anthropic, langchain, langchain-core, langchain-community, llama-index, haystack-ai, semantic-kernel, crewai, autogen-agentchat, mcp, pydantic-aiopenai, @anthropic-ai/sdk, langchain, @langchain/core, @modelcontextprotocol/sdk, ai (Vercel AI SDK)sk-, sk-ant-, OPENAI_API_KEY, ANTHROPIC_API_KEY), model name strings (gpt-4, gpt-3.5, claude, o1-, o3-), and LLM endpoint URLs (api.openai.com, api.anthropic.com)report(action="note", data={"message": "LLM_DETECTED: [frameworks list]. Phase 5b will run.")report(action="note", data={...}) with: language, framework, major dependencies, framework versionStep 1b — Baseline calibration (determine the baseline dynamically): Before hunting, decide what this application is and what comparable mainstream software exists — this calibrates effort and severity, it does NOT dismiss findings.
Call report(action="note", data={...}) with the baseline comparable(s), the tradeoffs they accept, and the target-specific attack classes you'll prioritize.
Step 2 — Map project structure:
app.py, manage.py, server.js, main.go, Application.java)config/, settings/, .env, application.properties)Step 3 — Read configuration files: Look for security-relevant settings. What matters depends on the framework — adapt to what you find:
Call report(action="finding", data={...}) for any hardcoded secrets or dangerous configurations found.
Step 4 — Dependency audit:
Check whether pinned dependency versions have known CVEs. For each major dependency, consider whether it's a security-sensitive component (auth library, ORM, template engine, crypto library, XML parser). For any CVE-affected dependency that's actually imported and reachability isn't obvious from a quick grep, chain to /analyze-cve — this is now MANDATORY, not a suggestion (see CHAIN COMMITMENTS). Manifests, lockfiles, and CI workflow files found here also trigger the MANDATORY /supply-chain chain — don't attempt dependency-confusion, typosquatting, lockfile-integrity, or CI/CD pipeline checks inline, that skill already does them properly.
Slopsquatting check: if Phase 1b's baseline calibration flagged this codebase as AI-generated/AI-assisted, or a dependency looks recently added by an AI coding tool, confirm the package name actually resolves to the real, actively-maintained project on its registry — not a plausible-sounding hallucinated name an attacker pre-registered. (Verified real attack class: roughly a fifth of LLM-generated package names are hallucinated, over half recur across runs, and a dummy huggingface-cli package collected 30k+ downloads this way.)
Step 5 — VCS metadata mining (all depths): Mine repository metadata before deeper review phases; treat it as orientation data and hunting leads, not proof. Cover all locally available history surfaces, not just the current working tree:
HEAD.CHANGELOG*, NEWS*, RELEASE*, versioned release notes) that may summarize security work outside the current diff.injection, bypass, XSS, SSRF, traversal, path traversal, redirect, open redirect, CSRF, auth, access control, deserialization, RCEhack, temporary, insecure, disable check, skip validation, for testing only, do not merge, FIXME security, TODO securityreport(action="note", data={"message":"VCS_METADATA_LEAD","commit_or_ref":"<hash/ref if available>","source_type":"commit|tag|merge-message|pr-title-in-commit|branch|changelog|release-note","matched_category":"security-fix keywords|insecure-shortcut keywords|ticket|cve","matched_keyword":"<keyword or ID>","touched_files":["path/a","path/b"],"message_excerpt":"<sanitized excerpt>"}).git, shallow/partial clone, detached history, missing remote refs or tags, permissions/read errors, or inspection tooling unavailable), do not silently skip it. Record explicit coverage with report(action="note", data={"message":"VCS_METADATA_COVERAGE","status":"unavailable|incomplete","reason":"<why>","available_surfaces":["..."],"missing_surfaces":["..."]}).Read-only local command examples (safe because they quote the target path, do not checkout untrusted refs, and do not interpolate metadata text into shell syntax):
git -C "/target" log --all --decorate=full --format='%H%x09%D%x09%s%x09%b'
git -C "/target" for-each-ref --format='%(refname)%09%(subject)%09%(body)' refs/heads refs/remotes refs/tags
git -C "/target" diff-tree --no-commit-id --name-status -r <commit>
Call report(action="diagram", data={...}) with a component architecture diagram showing the tech stack, major components, and their relationships.
Goal: Build the complete endpoint inventory from source code — this is what black-box scanning tries to discover from the outside.
Step 1 — Extract all route definitions:
Read the routing configuration for the identified framework. Every framework defines routes differently — find the pattern and extract ALL endpoints:
Step 2 — Classify each endpoint:
For every endpoint, determine:
Step 3 — Identify non-HTTP attack surface:
Call report(action="note", data={...}) with the complete endpoint inventory table. This feeds directly into /pentester and /web-exploit for targeted testing.
Goal: Understand how the application proves identity and enforces permissions. Map to ASVS V6 (Authentication), V7 (Session Management), V8 (Authorization), V9 (Self-contained Tokens), V10 (OAuth/OIDC).
Step 1 — Identify the auth mechanism:
Step 2 — Check password security (ASVS V6.2):
Step 3 — Check session management (ASVS V7):
Step 4 — Map authorization (ASVS V8):
WHERE user_id = current_user, a tenant-scoped query filter) or only assumed from routing/session context? (IDOR/BOLA potential — cross-reference /business-logic Phase 4/9 for live confirmation, don't just flag and move on)Step 5 — Token security (ASVS V9, V10): If JWT or OAuth is used:
none, prefer RS256 over HS256 with public keys)Call report(action="finding", data={...}) for every auth/authz weakness found. Call report(action="diagram", data={...}) with the authentication flow diagram.
Goal: Apply OWASP's Non-Human Identities Top 10 (2025) to service accounts, API keys, IAM roles, and workload identities found in the codebase — the same authentication/authorization rigor Phase 3 applies to human users, applied to everything that isn't one.
Reference: Load
skills/codebase/refs/nhi-top10-2025.mdfor the full category list, risk descriptions, and code-level checks per category.
Focus on what's genuinely code-verifiable (per the reference file's summary table): overprivileged service accounts/IAM roles (NHI5 — read the actual policy, compare granted actions against what the code that uses it does), long-lived secrets with no rotation/expiry logic (NHI7), the same credential reused across dev/staging/production config (NHI8) or across multiple unrelated services (NHI9), and deprecated/weak service-to-service authentication (NHI4).
CI/CD OIDC trust configuration gets special attention — it's the one with a mandatory downstream
chain. Grep workflow files for id-token: write and find the corresponding cloud-side trust
policy; if it's keyed on an OIDC issuer (token.actions.githubusercontent.com, GitLab, CircleCI)
with an over-broad or missing sub/aud condition, that's NHI6 and it chains to
/cloud-identity-federation — MANDATORY (see CHAIN COMMITMENTS).
NHI1 (Improper Offboarding), NHI3 (Vulnerable Third-Party NHI), and NHI10 (Human Use of NHI) are largely process/behavioral questions — flag suspicious signals but don't force a source-only verdict on them; note explicitly that they need live/process confirmation. NHI2 (Secret Leakage) is already covered by Phase 4's trufflehog pass and the secrets-liveness procedure below — don't duplicate it here.
Call report(action="finding", data={...}) for every confirmed NHI weakness, using the same
severity doctrine as the rest of this skill (likelihood × impact, only report what you can trace to
a concrete over-grant or missing control).
Run both in the same response:
scan(tool="semgrep", target="/target")
scan(tool="trufflehog", target="/target")
If LLM detected in Phase 1, also run in the same parallel batch:
scan(tool="semgrep", target="/target", flags="--config p/ai-best-practices")
This runs 58 semgrep rules covering: hardcoded API keys, missing max_tokens, prompt injection taint flow, MCP command injection, LLM output passed to eval/exec, and insecure model loading.
After results come back:
report(action="finding", data={...}) with the code contextHEAD. If the scan(tool="trufflehog", ...) wrapper cannot confirm coverage of commit/tag/message metadata, run a safe supplemental local metadata scan against read-only git log / git for-each-ref output and changelog files, or record an explicit report(action="note", data={...}) coverage limitation rather than silently assuming full coverage.appsec/aikido-triage/references/secrets-playbook.md (Step 4) — never auto-probe; ask the user by name, naming the exact provider and the exact non-mutating call, every time, even for an allowlisted provider. Reuse that file's curated allowlist rather than re-deriving one here.Goal: Find code patterns that lead to vulnerabilities. Map to ASVS V1 (Encoding/Sanitization), V2 (Validation), V3 (Web Frontend), V4 (API), V5 (File Handling).
The approach: Don't grep for a static list of function names. Instead, understand what categories of dangerous operations exist in the language/framework you're reviewing, and search for patterns that indicate unsafe usage.
Before starting categories 1–7, load the VCS metadata leads from Phase 1 Step 5 and start with the touched files, adjacent modules, and trust boundaries they point to. A security-fix or insecure-shortcut message is a lead to verify in current code, not a standalone finding.
Category 1 — Injection (ASVS V1.2): Search for places where user-controlled data reaches execution contexts without proper sanitization:
For each finding, trace whether user input actually reaches the function (source-to-sink). A dangerous function with only hardcoded arguments is not a vulnerability. Don't stop at the trace — load skills/codebase/refs/taint-analysis.md for the full methodology this category shares with Categories 3, 5, and 7 (verify the sink is real → taint analysis → identify the true source → trust boundary/proxy crossing → reachability verdict).
Category 2 — Output encoding (ASVS V1.3, V3):
Category 3 — Deserialization (ASVS V1.5):
Apply the same taint-analysis sequence as Category 1 — skills/codebase/refs/taint-analysis.md — before treating a deserialization call as a finding; a pickle.load on a file the app itself wrote is not the same finding as one on user-uploaded bytes.
Category 4 — Input validation (ASVS V2.2):
Category 5 — File handling (ASVS V5):
Apply the same taint-analysis sequence as Category 1 — skills/codebase/refs/taint-analysis.md — for path-construction findings; a hardcoded, non-user-influenced path is not a traversal vulnerability regardless of the function used.
Category 6 — Business logic: retired as its own category — superseded by the dedicated Phase 5d — Business Logic & Workflow Integrity below, which cross-references /business-logic's full ten-phase taxonomy instead of this four-bullet list. Do not duplicate coverage here.
Category 7 — SSRF (ASVS V1.2, API and Web Service): Search for outbound HTTP/network calls where the target host or URL is attacker-influenced:
requests.get(user_url), fetch(url), axios.get(url))redirect_uri or SSO callback URL used to make a server-side requestFor each finding, check whether there's an allowlist of permitted hosts, a block on private/link-local/metadata IP ranges (169.254.169.254, 169.254.170.2, 127.0.0.0/8, RFC1918 ranges), and DNS-rebinding protection (re-resolving and re-checking the IP at request time, not just at validation time). Apply the same taint-analysis sequence as Category 1 — skills/codebase/refs/taint-analysis.md. An SSRF-capable endpoint with a live target available chains to /cloud-identity-federation — OPTIONAL (see CHAIN COMMITMENTS) — that skill walks the SSRF → IMDSv2 → role → credential chain end to end; don't leave a static SSRF finding to dead-end here.
Call report(action="finding", data={...}) for every confirmed dangerous pattern with the source file, line number, the dangerous code, and whether user input reaches it.
Trigger: Runs when LLM frameworks were detected in Phase 1, OR when focus=llm. Skip entirely for non-LLM codebases.
Goal: Find security weaknesses specific to LLM integrations. This phase covers patterns where the LLM is the source, sink, or intermediary. Generic injection/deserialization patterns are in Phase 5 — this phase focuses on the unique attack surface that LLM integrations introduce.
Maps to: OWASP LLM Top 10 (2025), OWASP MCP Top 10.
Reference: Load
skills/codebase/refs/llm-integration.mdfor framework-specific grep patterns, CVE table, secure agent patterns, and MCP Top 10 checks.
Category 1 — Prompt Construction (OWASP LLM01: Prompt Injection):
.format(), template literals with user inputCategory 2 — Output Handling (OWASP LLM05: Insecure Output Handling):
eval(), exec(), subprocess, os.system(), child_process.exec() — code executioninnerHTML, dangerouslySetInnerHTML, template |safe — XSS from LLM outputPythonREPLTool, PALChain, LLMMathChain, custom code interpretersCategory 3 — Tool/Function Definitions (OWASP LLM06: Excessive Agency):
Category 4 — Secrets in Prompts (OWASP LLM02/LLM07: Sensitive Information Disclosure):
Category 5 — RAG & Vector Store Security (OWASP LLM08: Vector and Embedding Weaknesses):
Category 6 — Supply Chain & Model Loading (OWASP LLM03: Supply Chain):
torch.load, pickle.load, joblib.load on untrusted files)Category 7 — Resource Controls (OWASP LLM10: Unbounded Consumption):
max_tokens / max_completion_tokens on API callsmax_iterations or recursion limit?Category 8 — MCP Server Patterns (OWASP MCP Top 10): Only applies when the codebase implements or consumes MCP servers.
Call report(action="finding", data={...}) for each confirmed LLM-specific weakness. Use severity guidance:
Trigger: thorough depth, for the no-live-path findings where static "input reaches sink" is the only evidence — library code, CLI parsers, deserialization gadgets, format-string bugs, crypto misuse. Skip when a live endpoint already lets /web-exploit reproduce the issue (a live re-run is stronger evidence).
Goal: turn a static claim into a real, artifact-backed crash/exec — the same falsifiable standard the rest of the engagement enforces.
Build and run the relevant code in the hardened sandbox (capabilities dropped, pid/mem/cpu-capped, over a staged copy — the original source is never mutated; network is ON by default so dependency installs work — pass allow_network: false for strict isolation of untrusted code):
scan(tool="exec_sandbox", target="<codebase path>", options={
"subdir": "packages/parser", # stage only the package under test (keep it small)
"setup": "pip install -e .", # optional build/deps step
"cmd": "python -c \"import parser; parser.loads(open('/work/poc.bin','rb').read())\"",
"image": "python:3.11-slim", # pick an image matching the stack (node:20-slim, golang:1.22, etc.)
"timeout": 180
})
It returns an artifact_id capturing stdout/stderr + exit code. If the run proves the finding (crash, traceback, code execution, leaked data), file the finding and pass that artifact_id as the reproduction artifact — that's what lets the adjudication pass mark it reproducible: true. If it does not reproduce, the static claim is unconfirmed → downgrade or drop it.
This phase is opt-in and fail-soft. A build that can't be set up (missing private deps, multi-service compose, fixtures) returns a diagnostic, not a finding — fall back to the static source-to-sink trace. Execution confirmation is never a completion gate; a clean static trace remains acceptable evidence.
Goal: Find where the application's intended behavior can be subverted — not a dangerous
function pattern, but a missing guard on money, state, or sequence. This is the white-box companion
to /business-logic's ten-phase live-testing methodology: same taxonomy, but "what a source read
can tell you before anyone sends a request." Map to ASVS V2 (Validation and Business Logic).
Reference: Load
skills/codebase/refs/business-logic-source-patterns.mdfor concrete per-language/framework grep patterns and code shapes for every sub-check below.
For every multi-step flow and every value/quantity field found in Phase 2's route mapping, check:
Start with VCS metadata leads that mention workflow, approval, refund, quota, role, entitlement, state, or step-order changes; use their touched files and referenced flows as priority review targets before widening out to the rest of the codebase.
Value/quantity logic (→ /business-logic Phase 1) — is there server-side sign/range/type
validation before a numeric field is used in arithmetic, not just client-side JS or a DB
constraint that may not exist? Is the integer type adequate for the value (int32 overflow on
currency)? Is currency math done in floats (rounding-to-zero risk)?
Workflow / step-order enforcement (→ /business-logic Phase 2) — is there an explicit
server-side check of the current step/state before advancing a multi-step flow (checkout,
registration, verification, approval), or is order only implied by which endpoint the frontend
happens to call next? "No check found" on a flow involving money, access, or identity
verification is itself a finding — don't wait for a live test to prove what a missing guard
already shows statically.
State machine integrity (→ /business-logic Phase 3) — is there one authoritative
transition table/guard, or can any PATCH/PUT set a status/state field directly (cross-
reference Category 4 Input Validation above — a writable lifecycle field is a mass-assignment
problem wearing a workflow-bypass hat)?
Idempotency & atomicity (→ /business-logic Phase 5) — is a balance/quota/credit mutation
one atomic operation, or a check-then-act pair of separate statements a concurrent request can
race? This is the source-level tell for exactly the TOCTOU double-spend races /business-logic
proves live.
Fail-safe defaults — new, and not covered by /business-logic's black-box checklist at
all (you'd have to actually break a live dependency to observe this path; source review is the
only reliable way to catch it). For every authorization/entitlement/feature-flag/quota/fraud-
check: does the exception/timeout/missing-config path default to allow or deny? A fail-open
default on anything security-relevant is Critical/High on its own, independent of whether the
failure condition has ever actually fired in production.
Quota/rate-limit enforcement location (→ /business-logic Phase 6) — checked and consumed
atomically at point of use, or via a separate/batched reconciliation that leaves a window?
Time/date trust (→ /business-logic Phase 7) — is expiry evaluated against the server's
own clock, or does it trust a client-supplied date/timestamp field that gates an access window?
Predictability of generated values (→ /business-logic Phase 8) — read the actual
generation code for order/confirmation/invite/reset codes: sequential auto-increment exposed
publicly, timestamp-based, or a real UUIDv4/CSPRNG? More reliable from source than external
sampling; when a weak generator is found, note it for /business-logic's own existing chain into
/param-fuzz Phase 6 (entropy analysis) for live confirmation.
BOLA/BFLA / trust boundaries (→ /business-logic Phase 4/9) — no separate check here;
this is Phase 3's Authorization section above (per-ID-bearing-endpoint ownership/tenant scoping)
— don't duplicate the BOLA walk, /business-logic proves it live.
A business-logic candidate found here, with a live target available, chains to /business-logic —
MANDATORY (see CHAIN COMMITMENTS) — same static-finds-candidates/live-skill-confirms pattern as
the rest of this skill's chains.
Call report(action="finding", data={...}) for every confirmed gap, anchored to the Finding
Severity Guide below — a missing step-order guard or a fail-open default on a flow involving money,
access, or identity is High by default, not a hardening note, whether or not it's been live-
confirmed yet.
Goal: Review supporting infrastructure for security weaknesses. Map to ASVS V11-V14, V16.
Cryptography (ASVS V11):
Secure communication (ASVS V12):
verify=False, InsecureSkipVerify)Configuration (ASVS V13):
Data protection (ASVS V14):
Error handling and logging (ASVS V16):
Infrastructure as Code: If IaC files are present (Terraform, CloudFormation, K8s manifests, Dockerfiles, docker-compose), review them for:
Call report(action="finding", data={...}) for each confirmed weakness.
Step 1 — Architecture diagram:
Call report(action="diagram", data={...}) with a comprehensive Mermaid diagram showing:
Step 2 — Codebase security profile:
Call report(action="note", data={...}) with a structured summary that downstream skills can consume:
Codebase Security Profile:
Language: [language] [version]
Framework: [framework] [version]
Architecture: [monolith/microservice/serverless]
VCS history coverage: [full|partial|unavailable] ([notes on branches/remotes/tags/changelog coverage])
VCS metadata leads: [count] (security-fix: N, insecure-shortcut: N, tickets/CVEs: N)
Unbackported-fix candidates: [count] ([affected refs/maintained branches or "none"])
Endpoints: [count] total ([count] public, [count] authenticated)
Auth mechanism: [session/JWT/OAuth/API key]
Auth library: [library name and version]
Authorization: [RBAC/ABAC/ACL/none]
Password hashing: [algorithm and parameters]
Findings: [count] by severity (critical: N, high: N, medium: N, low: N)
Secrets found: [count] (verified: N)
NHI findings: [count] (over-privileged: N, long-lived: N, CI/CD OIDC trust: N)
Business-logic candidates: [count] (step-order: N, fail-open: N, non-atomic: N, predictable IDs: N)
ASVS coverage: V1:[status] V2:[status] ... V17:[status]
LLM Integration: [yes/no]
Frameworks: [openai, langchain, etc.]
LLM endpoints: [count] (endpoints that trigger LLM calls)
Tools defined: [count] (function/tool definitions passed to LLM)
RAG: [yes/no] ([vector store name])
MCP: [server/client/none]
OWASP LLM Top 10 white-box coverage:
LLM01 Prompt Injection: [REVIEWED/NOT APPLICABLE]
LLM02 Sensitive Info Disclosure: [REVIEWED/NOT APPLICABLE]
LLM03 Supply Chain: [REVIEWED/NOT APPLICABLE]
LLM05 Insecure Output Handling: [REVIEWED/NOT APPLICABLE]
LLM06 Excessive Agency: [REVIEWED/NOT APPLICABLE]
LLM07 System Prompt Leakage: [REVIEWED/NOT APPLICABLE]
LLM08 Vector/Embedding Weakness: [REVIEWED/NOT APPLICABLE]
LLM10 Unbounded Consumption: [REVIEWED/NOT APPLICABLE]
Priority targets for pentesting:
- [file/endpoint/ref] — [reason from VCS metadata lead or unbackported-fix candidate]
- [endpoint] — [reason: missing auth, SQLi, file upload, etc.]
- [endpoint] — [reason]
Priority targets for AI red-team (/ai-redteam):
- [endpoint URL] — [reason: extractable system prompt, over-permissioned tools, no input validation]
- [extracted system prompt text or location]
- [tool definitions and guardrail mechanisms found in source]
Priority targets for /business-logic (live confirmation):
- [flow/file] — [reason from VCS metadata lead: workflow/state/entitlement fix or shortcut]
- [endpoint/flow] — [reason: missing step-order guard, non-atomic balance mutation, fail-open default, predictable code generator]
Priority targets for /cloud-identity-federation:
- [finding] — [reason: CI/CD OIDC trust over-broad sub/aud (Phase 3b), or SSRF-capable endpoint (Phase 5 Category 7)]
IaC issues: [count] ([Terraform/K8s/Docker])
Step 3 — ASVS coverage summary (thorough only):
Call report(action="note", data={...}) with which ASVS chapters were reviewed and what was found:
ASVS 5.0 Coverage:
V1 Encoding/Sanitization: REVIEWED — [findings or "no issues"]
V2 Validation/Business Logic: REVIEWED — [findings or "no issues"]
V3 Web Frontend Security: REVIEWED — [findings or "no issues"]
V4 API and Web Service: REVIEWED — [findings or "no issues"]
V5 File Handling: REVIEWED — [findings or "no issues"]
V6 Authentication: REVIEWED — [findings or "no issues"]
V7 Session Management: REVIEWED — [findings or "no issues"]
V8 Authorization: REVIEWED — [findings or "no issues"]
V9 Self-contained Tokens: [REVIEWED | NOT APPLICABLE]
V10 OAuth and OIDC: [REVIEWED | NOT APPLICABLE]
V11 Cryptography: REVIEWED — [findings or "no issues"]
V12 Secure Communication: REVIEWED — [findings or "no issues"]
V13 Configuration: REVIEWED — [findings or "no issues"]
V14 Data Protection: REVIEWED — [findings or "no issues"]
V15 Secure Coding/Arch: REVIEWED — [findings or "no issues"]
V16 Logging/Error Handling: REVIEWED — [findings or "no issues"]
V17 WebRTC: [REVIEWED | NOT APPLICABLE]
Step 4: Call session(action="complete", options={...}) with summary.
Step 5: Chain into downstream skills — see CHAIN COMMITMENTS section at the top for mandatory chains. Summary:
/threat-modeling (always — real architecture from code)/web-exploit (do NOT skip because code review found no injection points — systematic live testing finds what static analysis misses)/ai-redteam (pass system prompts, tool definitions, guardrail config, RAG architecture as white-box context)/supply-chain (manifests, lockfiles, or CI workflow files were found — this always fires)/analyze-cve/cloud-identity-federation/business-logic/api-security (OWASP API Top 10 with white-box context)/cloud-security or /container-k8s-security/cloud-identity-federation| Skill | When to invoke |
|---|---|
/threat-modeling | Always after review — feed real architecture into STRIDE analysis |
/pentester | Endpoints discovered — target scan with white-box knowledge |
/web-exploit | MANDATORY if live target available — do NOT wait for injection points to be found in source; systematic live testing finds what static analysis misses |
/api-security | API routes/controllers identified in source (REST/GraphQL/gRPC/SOAP/MCP) — pass route inventory, auth middleware, ORM models, and authorization decorators as white-box context for OWASP API Top 10 testing |
/cloud-security | IaC files found — verify cloud misconfigs match runtime state |
/container-k8s-security | K8s manifests or Dockerfiles found — verify container security |
/analyze-cve | MANDATORY when imported and reachability isn't obvious from a quick grep — CVE-affected dependency found — trace code path with full source context |
/supply-chain | MANDATORY — manifests, lockfiles, or CI workflow files found — dependency-confusion, typosquatting, lockfile-integrity, and CI/CD pipeline review with white-box context |
/cloud-identity-federation | CI/CD OIDC trust misconfiguration found (MANDATORY, Phase 3b) or an SSRF-capable endpoint found with a live target available (optional) — walks the trust/SSRF chain to a minted credential |
/business-logic | MANDATORY if live target available — a Phase 5d candidate (missing step-order guard, non-atomic mutation, fail-open default, weak code generator) needs live confirmation |
/credential-audit | Auth mechanism identified — test with knowledge of password policy and lockout config |
/ai-redteam | LLM integration detected — pass system prompts, tool definitions, guardrails, RAG architecture, and endpoint URLs as white-box context |
/remediate | Findings produced — generate specific code fixes with full source context |
/gh-export | When user asks to file GitHub issues |
Attach a source trace[] to every white-box finding. Because a codebase is pinned
(set_codebase), the server RESOLVES each cited file:line against the repo and rejects a
finding whose trace points at a file or line that does not exist — this catches a hallucinated
citation before it ever reaches the report. Build the trace from the source-to-sink data flow you
already traced in Phase 5 (see refs/taint-analysis.md for the full methodology):
report(action="finding", data={
"title": "SQL injection in order lookup",
"severity": "high", "target": "/path/to/repo",
"description": "...", "evidence": "...",
"trace": [
{"kind": "entrypoint", "file": "api/orders.py", "line": 42, "scope": "get_order", "description": "order_id taken from query string, unvalidated"},
{"kind": "boundary", "file": "middleware/auth.py", "line": 17, "scope": "require_session", "description": "auth middleware requires a valid session, but does not validate order_id content — does not neutralize this payload"},
{"kind": "propagation", "file": "db/query.py", "line": 88, "scope": "build_filter", "description": "order_id concatenated into SQL string"},
{"kind": "sink", "file": "db/query.py", "line": 91, "scope": "execute_raw", "description": "raw query executed against the DB"}
]
})
Rules for trace: first step kind:"entrypoint", last kind:"sink", ≥2 steps; line a positive
integer that exists in the cited file; scope the bare function/method name. kind:"boundary" is
an optional fourth kind — same shape, same server-side file:line validation — used to cite a
trust-boundary crossing (a gateway, auth middleware, a WAF rule, a signature check) and whether it
neutralizes the specific payload; include it whenever the source is externally controllable and any
boundary is actually crossed, omit it only when the flow never leaves a single trust zone. Cite the
real lines you read — don't approximate. (Black-box findings with no source omit trace entirely.)
The severity bar (one canonical doctrine — the server applies the same rubric at adjudication):
| Severity | Criteria | Examples |
|---|---|---|
| Critical | Direct path to RCE, data breach, or auth bypass from source | Unsanitized user input in eval/exec; hardcoded admin credentials; SQL injection in auth query; deserialization of untrusted data; a negative-ownership field accepted unchecked (from_user_id/sender_id set to another user); no concurrency guard on a balance/quota mutation |
| High | Significant security weakness exploitable with moderate effort | Missing auth on sensitive endpoints; IDOR in API; weak password hashing; disabled CSRF protection; path traversal in file operations; no server-side step-order/state-transition guard on a flow involving money, access, or identity verification (Phase 5d); a fail-open default on an authorization/entitlement/quota check (Phase 5d) — these default to High even before live confirmation, per /business-logic's own finding-criteria tables for the equivalent live-confirmed findings |
| Medium | Security weakness requiring specific conditions to exploit | Missing rate limiting; verbose error messages; weak session timeout; permissive CORS; missing security headers; a backward/reversible state transition possible; a cooldown or quota enforced only client-side |
| Low | Defense-in-depth gap or best practice deviation | Debug mode in non-production config; missing CSP header; unpinned dependencies; logging without sensitive data redaction |
session(action="start", options={...}) is mandatory — never run any other tool before itrefs/taint-analysis.md for the full sequencereport(action="finding", data={...}) for every confirmed weakness — include the file path, line number, vulnerable code snippet, and why it's exploitablereport(action="diagram", data={...}) at least twice — after Phase 1 (initial architecture) and Phase 7 (annotated with findings)report(action="note", data={...}) so other skills can parse and act on itreport(action="note", data={...}) liberally — document your understanding of each component before analyzing ittrace[] to every white-box finding (entrypoint→…→sink with real file:line:scope) — the server resolves the citations against the codebase and rejects a hallucinated location, so cite lines you actually readflowchart TD, quote labels with spaces/special chars, no em-dashes, short alphanumeric node IDsThis block is maintained by SkillOpt-Sleep. Edits here are proposed offline, validated against past tasks, and adopted only after review. Hand-edits outside this block are never touched.
**Confidence:** label immediately after its severity, set to high, medium, or low by trace completeness: high = full source-to-sink trace confirmed with real file:line; medium = partial trace, likely but not fully verified; low = pattern-only, no complete trace.What SKILL.md sets; muted values are Claude Code's defaults
/agent-smith:codebase <codebase-path> [depth=quick|standard|thorough] [focus=all|auth|injection|crypto|config|iac|llm|business-logic|nhi]from agent-smith
npx claudepluginhub 0x0pointer/skills --plugin agent-smith36 skills in this plugin
/ad-assessmentActive Directory security audit using the MITRE ATT&CK framework. Full domain enumeration, trust mapping, GPO analysis, ACL abuse paths, ADCS attacks (ESC1-ESC8), delegation abuse (constrained/unconstrained/RBCD), fine-grained password policies, LAPS deployment, service account security, and Kerberos configuration.
Uses enum4linux-ng, netexec, impacket, ldapsearch, certipy-ad, bloodhound-python, and rpcclient. Produces attack path diagrams, prioritized risk register, and PoCs. Chains into /gh-export for issue filing.
/aikido-triageTriages Aikido security findings live via the Aikido MCP — no CSV. Splits findings into SCA, SAST, Application Secrets, and Misconfiguration, applies a category-specific verification playbook to each (source-to-sink taint analysis with trust-boundary/reachability assessment for SAST, /analyze-cve chaining for SCA, usage + opt-in liveness checks for secrets, blast-radius reasoning with optional live-chain confirmation for misconfiguration), scores every finding's business impact and severity, then closes confirmed non-issues directly in Aikido after a single review checkpoint.
/ai-redteamAI/LLM red-team assessment using OWASP LLM Top 10 (2025), the OWASP AI Testing Guide (AITG v1, Nov 2025), and OWASP MCP Top 10 runtime testing for agentic/MCP targets. Tests prompt injection, jailbreaks, system prompt leakage, sensitive data extraction, excessive agency, improper output handling, model extraction, content bias, evasion, membership inference, MCP token exposure, and MCP command injection.
Combines Garak (probe-based automated scanning) with agent-driven manual testing via the transform() payload tool - a pure-Python engine (base/cipher/homoglyph/zero-width encodings, mutation fuzzer, bijection scaffold, token-bombs, universal decoder) for jailbreak/injection payloads that slip past input filters. The agent drives multi-turn/crescendo attacks. Includes a conditional MCP recon phase and a post-access AI infrastructure phase (chained from /post-exploit). Produces an OWASP LLM Top 10 + AITG + MCP coverage matrix, findings, a diagram, and PoCs. Chains into /gh-export.
Other plugins' skills for the same job