007
無料Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
日本語の概要は準備中です。原文の説明を表示しています。
Multi-Agent Adversarial Analysis System for code security
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Multi-Agent Adversarial Analysis System inspired by ZeroLeaks architecture.
~/.claude/settings.json or CLI/env varsANTHROPIC_DEFAULT_*_MODEL env varsApplies security scanner patterns to code analysis: specialized agents work together systematically to find vulnerabilities, weaknesses, and quality issues.
Based on ZeroLeaks multi-agent system adapted for code analysis:
ORCHESTRATOR (Engine)
|
+---------------+---------------+
| | |
STRATEGIST ATTACKER EVALUATOR
| | |
+-------+-------+-------+-------+
|
MUTATOR
| Agent | Role | Focus |
|---|---|---|
| Engine | Orchestrates the analysis, manages exploration tree | Coordination |
| Strategist | Selects analysis strategies based on codebase profile | Strategy |
| Attacker | Generates attack vectors / test cases | Offense |
| Evaluator | Analyzes responses for vulnerabilities | Assessment |
| Mutator | Creates variations of test cases | Variation |
Optimal Scenario: Integrated (Agent Teams + Custom Subagents)
Adversarial analysis uses Agent Teams coordination with specialized ralph-* agents for multi-vector attack simulation.
| Subagent | Role in Adversarial Analysis |
|---|---|
ralph-reviewer | Striker - Identifies vulnerabilities |
ralph-researcher | Strategist - Maps attack surface |
ralph-coder | Evaluator - Creates test cases |
When Agent Teams is active:
/adversarial src/auth/
/adversarial --target security src/api/
/adversarial --depth 5 --branches 4 src/
Follows ZeroLeaks phased methodology:
1. RECONNAISSANCE -> Understand codebase structure, dependencies
2. PROFILING -> Build defense profile (patterns, safeguards)
3. SOFT_PROBE -> Gentle analysis attempts
4. ESCALATION -> Increase analysis intensity
5. EXPLOITATION -> Active vulnerability search
6. PERSISTENCE -> Verify findings persist across scenarios
| Category | Description | Examples |
|---|---|---|
direct | Straightforward vulnerability checks | SQL injection, XSS |
encoding | Encoding/decoding issues | Base64, Unicode, escaping |
persona | Identity/permission bypasses | Privilege escalation |
social | Trust boundary violations | SSRF, CSRF |
technical | Technical implementation issues | Race conditions, memory |
crescendo | Multi-step escalation paths | Chained vulnerabilities |
many_shot | Pattern-based detection | Repeated anti-patterns |
cot_hijack | Logic flow manipulation | Business logic flaws |
policy_puppetry | Configuration exploitation | Misconfigurations |
context_overflow | Resource exhaustion | DoS, memory leaks |
reasoning_exploit | Algorithm weaknesses | Cryptographic issues |
adversarial_config:
max_turns: 25 # Maximum analysis iterations
max_tree_depth: 5 # How deep to explore each vector
branching_factor: 4 # Parallel exploration paths
pruning_threshold: 0.3 # Score below which to abandon path
enable_crescendo: true # Multi-turn escalation
enable_many_shot: true # Pattern-based detection
enable_best_of_n: true # Generate variations
best_of_n_count: 5 # Variations per test
id: recon_behavioral
applicable_when:
turn_range: [1, 3]
leak_status: ["none"]
attack_sequence:
- category: direct
weight: 0.4
techniques: ["structure_probe", "dependency_scan"]
- category: technical
weight: 0.3
techniques: ["config_analysis", "boundary_test"]
id: credential_hunt
applicable_when:
defense_level: ["none", "weak"]
attack_sequence:
- category: direct
weight: 0.5
techniques: ["secret_scan", "env_probe"]
- category: encoding
weight: 0.3
techniques: ["base64_secrets", "obfuscated_creds"]
id: trust_boundary
applicable_when:
defense_level: ["weak", "moderate"]
attack_sequence:
- category: crescendo
weight: 0.4
techniques: ["privilege_escalation", "trust_chain"]
- category: persona
weight: 0.3
techniques: ["identity_bypass", "role_confusion"]
id: input_bypass
applicable_when:
defense_level: ["moderate", "strong"]
failed_categories: ["direct"]
attack_sequence:
- category: encoding
weight: 0.4
techniques: ["unicode_bypass", "encoding_chain"]
- category: technical
weight: 0.3
techniques: ["format_injection", "boundary_overflow"]
id: advanced_composite
applicable_when:
defense_level: ["strong", "hardened"]
failed_categories: ["direct", "encoding", "persona"]
attack_sequence:
- category: cot_hijack
weight: 0.25
techniques: ["logic_flow_manipulation"]
- category: crescendo
weight: 0.25
techniques: ["multi_step_chain"]
- category: reasoning_exploit
weight: 0.25
techniques: ["algorithm_weakness"]
interface DefenseProfile {
level: "none" | "weak" | "moderate" | "strong" | "hardened";
confidence: number;
observedBehaviors: string[];
guardrails: {
type: string;
strength: number;
bypassed: boolean;
bypassMethod?: string;
}[];
weaknesses: {
category: AttackCategory;
description: string;
exploitability: number;
}[];
safePatterns: string[];
responsePatterns: {
pattern: string;
frequency: number;
defenseIndicator: boolean;
}[];
}
| Status | Severity | Description |
|---|---|---|
complete | CRITICAL | Full vulnerability exposed |
substantial | CRITICAL | Major security issue |
fragment | HIGH | Partial vulnerability |
hint | MEDIUM | Potential issue indicated |
none | LOW | No vulnerability found |
interface Finding {
id: string;
turn: number;
timestamp: number;
extractedContent: string;
contentType: "vulnerability" | "weakness" | "smell" | "risk" | "unknown";
technique: string;
category: AttackCategory;
confidence: "high" | "medium" | "low";
evidence: string;
severity: "critical" | "high" | "medium" | "low";
verified: boolean;
recommendation: string;
}
# Adversarial analysis as part of validation
Step 7: VALIDATE
└── 7a. QUALITY-AUDITOR (standard)
└── 7b. GATES (standard)
└── 7c. ADVERSARIAL-CODE (this skill) <- Invoke for complexity >= 7
└── 7d. ADVERSARIAL-PLAN (standard)
IMPORTANT: Use available security agents instead of non-existent adversarial-code-analyzer.
Task:
subagent_type: "security-auditor"
model: "opus"
prompt: |
TARGET_PATH: src/auth/
ANALYSIS_TYPE: security
CONFIG:
max_turns: 25
enable_crescendo: true
enable_best_of_n: true
Perform comprehensive security audit on the target codebase.
Alternative for Cross-Validation:
# Use codex-cli for second opinion
/codex-cli analyze security --target src/auth/
# Or use gemini-cli for alternative analysis
/gemini-cli search security vulnerabilities in src/auth/
{
"scan_result": {
"overall_vulnerability": "medium",
"overall_score": 65,
"leak_status": "fragment",
"findings": [...],
"defense_profile": {...},
"recommendations": [...],
"summary": "Analysis identified 3 potential vulnerabilities..."
},
"analysis_tree": {
"nodes_explored": 47,
"max_depth_reached": 4,
"successful_paths": 3
},
"strategies_used": [
"recon_behavioral",
"credential_hunt",
"trust_boundary"
]
}
IMPORTANT: Use available skills and tools for adversarial analysis:
# Use security-auditor agent (available)
Task subagent_type=security-auditor model=opus "Perform comprehensive security audit of src/auth/"
# Use codex-cli for cross-validation (available)
/codex-cli analyze security --target src/auth/
# Use gemini-cli for alternative analysis (available)
/gemini-cli search "security vulnerabilities SQL injection XSS" --count 10
# Manual grep-based security scanning
grep -r "eval\|exec\|system\|innerHTML" src/
grep -r "SELECT.*WHERE.*\+" src/ # SQL injection patterns
grep -r "md5\|sha1" src/ # Weak hashing
Strategy patterns adapted from ZeroLeaks AI security scanner architecture (FSL-1.1-Apache-2.0).
Esta skill genera reportes automáticos completos para trazabilidad:
Cuando esta skill completa, se genera automáticamente:
docs/actions/adversarial/{timestamp}.md.claude/metadata/actions/adversarial/{timestamp}.jsonCada reporte incluye:
# Listar todos los reportes de esta skill
ls -lt docs/actions/adversarial/
# Ver el reporte más reciente
cat $(ls -t docs/actions/adversarial/*.md | head -1)
# Buscar reportes fallidos
grep -l "Status: FAILED" docs/actions/adversarial/*.md
source .claude/lib/action-report-lib.sh
start_action_report "adversarial" "Task description"
# ... ejecución ...
complete_action_report "success" "Summary" "Recommendations"
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.
日本語の概要は準備中です。原文の説明を表示しています。
Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project
日本語の概要は準備中です。原文の説明を表示しています。
Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project
日本語の概要は準備中です。原文の説明を表示しています。
Run a health check on an existing project: dependency audit, security scan, test runner detection, CI/CD evaluation, and missing configuration analysis. Maps the three execution gates (pre/in/post) from /10x-bootstrapper to an assessment framework for existing codebases. Reads optional context/foundation/stack-assessment.md from /10x-stack-assess to focus checks on identified gaps. Writes context/foundation/health-check.md with findings, prioritized fixes, and an agent-readiness verdict. Use when the user has an existing project and wants to verify its health before working with an agent. Trigger phrases: "health check", "check my project", "audit my project", "is my project healthy", "sprawdź projekt", "audyt projektu", "health-check", "project health". Use AFTER /10x-stack-assess (brownfield chain), BEFORE agent onboarding (m1-l4).
日本語の概要は準備中です。原文の説明を表示しています。
You MUST use this when building projects end-to-end. Orchestrates all 12 team roles — automatically switches between CTO, architect, PM, engineers, SRE, security, DBA, QA, and EM based on the current phase of work. Starts with brainstorming before any implementation.
日本語の概要は準備中です。原文の説明を表示しています。
Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) — through a consultative, modular step-by-step approach that only adds what you actually need. This should trigger for requests such as Add Maven plugins in pom.xml; Improve Maven plugins in pom.xml. Part of cursor-rules-java project
日本語の概要は準備中です。原文の説明を表示しています。