/predicate:security-auditfrom predicate
Phased risk-centric security assessment framework for auditing code vulnerabilities, SQL injection, access control, and buffer overflows using taint analysis and threat modeling.
Ships in predicate. 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; scripts run unread.
A structured, risk-centric framework for software security assessment. Designed for iterative human engagement with explicit checkpoints at each phase.
Adversarial path anchor. This lens is invoked on the Verification Dual's adversarial path (rules.md §2 Invariant 1): when no deterministic evaluator can close a security-correctness condition, context-free agents using this protocol supply the decorrelated review. See skills/refine/SKILL.md AUDIT §"Sibling Skills Consultation" for the wiring point.
Core Principle: The goal is not to maximize bug count, but to identify business risk, architectural flaws, and exploitable logic errors.
Before beginning, internalize these cognitive framings:
Risk > Findings: A bug is only a finding if it poses risk to business logic or data integrity. Context determines severity.
Adversarial Mindset: Analyze every input, endpoint, and public function assuming a capable adversary is attempting to subvert the system.
Taint Analysis Model: For every potential vulnerability, trace:
eval(), HTML render, shell)Assurance Spectrum:
Objective: Define boundaries and establish the security context before analyzing code.
package.json, Cargo.toml, go.mod, requirements.txt)Establish the security context before analyzing code. Identify and document:
Checkpoint: Present scope and trust model. Await user approval before proceeding.
Objective: Establish security baseline through breadth-first automated analysis.
Search for high-entropy strings and credential patterns:
AWS_ACCESS_KEY, AZURE_, GCP_Bearer , Authorization:-----BEGIN)Search for risky function calls:
| Language | Dangerous Patterns |
|---|---|
| Python | eval(), exec(), subprocess.call(shell=True), os.system() |
| JavaScript | eval(), Function(), innerHTML, dangerouslySetInnerHTML |
| Go | os/exec without validation, template.HTML() |
| Rust | unsafe, .unwrap() in library paths, raw pointer manipulation |
| C/C++ | strcpy, sprintf, gets, system(), raw malloc |
| SQL | String concatenation in queries, missing parameterization |
DEBUG=False, no dev endpoints)0.0.0.0 in production)Checkpoint: Present baseline findings. Await acknowledgment before deep review.
Objective: Deep analysis of logic, access control, and architectural patterns that tools miss.
Coherence Strategy: Analyze ONE component at a time. Present findings. Await acknowledgment before proceeding.
IDOR Trace Pattern:
API Endpoint → Extract resource_id from request
→ Verify current_user owns/can_access resource_id
→ If not verified: VULNERABILITY
../ exploitation)pickle, yaml.load() on user input)Apply state machine analysis:
For each component, produce:
## Audit: [Component Name]
### Attack Surface
- Entry points: [list]
- Data handled: [list]
### Findings
| Category | Rating | Notes |
|:---------|:-------|:------|
| AuthN/AuthZ | PASS/WARN/FAIL | — |
| Input Validation | PASS/WARN/FAIL | — |
| Crypto | N/A/PASS/WARN/FAIL | — |
| Error Handling | PASS/WARN/FAIL | — |
### Vulnerabilities
1. **[SEVERITY]** Brief description — Location
### Questions for User
1. [Clarifying question if needed]
Checkpoint: Present findings for this component. Await acknowledgment before next component.
Trigger: Apply ONLY to crown jewels—smart contracts, cryptographic primitives, safety-critical logic.
Define mathematical properties that must always hold:
total_supply == sum(all_balances)user_balance >= 0session.expires_at > now() implies session.validCheckpoint: Present formal verification scope and findings.
Objective: Produce actionable, prioritized findings.
| Level | Definition | Example |
|---|---|---|
| Critical | Immediate exploitation possible; complete compromise | RCE, auth bypass, SQLi with admin access |
| High | Significant impact; exploitation requires minimal effort | Stored XSS, privilege escalation, IDOR on sensitive data |
| Medium | Moderate impact or requires specific conditions | CSRF, information disclosure, weak crypto |
| Low | Minor impact; defense in depth issue | Missing headers, verbose errors, weak rate limiting |
# Security Audit Report: [Project Name]
## Executive Summary
- **Overall Risk:** [Critical / High / Medium / Low]
- **Summary:** [3-4 sentences, non-technical]
- **Priority Action:** [Single most important fix]
## Threat Model
- **Attack Surface:** [Entry points]
- **Crown Jewels:** [What's at risk]
- **Trust Boundaries:** [Where validation is critical]
## Findings
### [ID-001] [Vulnerability Name]
- **Severity:** Critical/High/Medium/Low
- **Location:** `file:line`
- **Description:** [Technical explanation]
- **Impact:** [Business consequence]
- **Proof of Concept:**
> [Steps or payload to trigger]
- **Remediation:**
- _Root Cause:_ [Why this happened]
- _Fix:_ [Specific code change]
### [ID-002] ... (repeat)
## False Positives
- [Pattern investigated, determined safe, explanation]
## Recommendations (Systemic)
1. [Process or architectural improvement]
Cross-reference all findings against these controls:
During Phase 0 (Scope), identify the tech stack and leverage the appropriate section of the unified security-audit skill (skills/security-audit/SKILL.md). These provide specialized checklists and vulnerability patterns.
Apply Web3 section if:
Apply Embedded section if:
Apply Web section if:
Note: Multiple sections may apply. A Web3 project with a backend API might require auditing against both Web3 and Web sections of the
security-auditskill.
This protocol enforces iterative human engagement. Never skip checkpoints. If findings accumulate beyond trackable scope, pause and summarize before continuing.
The goal is not a comprehensive bug list, but accurate risk assessment that enables informed remediation decisions.
This section provides domain-specific security checklists and threat models to guide code audits across different platforms, referencing the target stack identified in Phase 0.
.raw() with unvalidated user input).innerHTML, dangerouslySetInnerHTML) are avoided.realpath) to prevent directory traversal (../).argon2, bcrypt, or scrypt. Plaintext passwords never stored or logged.HttpOnly, Secure, and SameSite flags; sessions invalidated on logout.http/https, internal IP ranges blocked, DNS rebinding prevented, and redirects limited.*) origin prohibited on credentialed endpoints.strcpy, sprintf, gets) replaced with safe alternatives (strncpy, snprintf, fgets); stack protection enabled.free(); no dangling references to stack variables.ReentrancyGuard / nonReentrant modifiers.SafeMath library); bounds checks on user inputs.You can run automated checks using the script located in scripts/run_audit.py. It automatically detects project files in the target path and runs the corresponding security audit tools (providing setup commands for missing tools):
bandit.slither.cargo clippy (denying warnings) and cargo audit.govulncheck.npm audit, yarn audit, or pnpm audit.python3 skills/security-audit/scripts/run_audit.py <path-to-audit-target>
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nrdxp/predicate --plugin predicate35 skills in this plugin
/ai-auditSOP for auditing AI-generated code.
Trigger when:
- Reviewing, refactoring, or cleaning up AI-generated code to prevent regressions or hallucinated APIs.
- Prompt contains: /ai-audit, code audit, AI cleanup, common flaws.
/api-auditProtocol for auditing API surface coherence and type safety.
Trigger when:
- Evaluating API designs, interface type safety, or design elegance.
- Prompt contains: /api-audit, API surface, API coherence, type safety.
/boundaryNormative sufficiency conditions for Initial Boundary Conditions (IBCs)
and the SOP for the cheap-tier boundary refinement loop (/boundary).
Trigger when:
- Crafting, auditing, or refining a prompt/IBC destined for an expensive
(architect-class) model or an autonomous worker dispatch.
- Evaluating whether a task frame is sufficient to bound an agent walk.
- Prompt contains: /boundary, IBC, initial boundary condition, boundary
contract, sufficiency conditions, worker prompt, prompt refinement.
Other plugins' skills for the same job