Adversarial review

From baekenough/oh-my-customcode · View interactive version

Adversarial review is an AI agent skill from the GitHub repository baekenough/oh-my-customcode. Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

How to use this skill

Skill file

Adversarial Code Review

Review code from an attacker's perspective using STRIDE + OWASP frameworks.

4-Phase Review Process

Phase 1: Trust Boundary Analysis

Identify where trust transitions occur:

Output: [TRUST-BOUNDARY] findings with location, threat type, and current validation level.

Phase 2: Attack Surface Mapping

Map all entry points and exposure:

Output: [ATTACK-SURFACE] table with endpoint, exposure level, and mitigation status.

Phase 3: Business Logic Review

Analyze logic flaws that static analysis misses:

Output: [LOGIC-FLAW] findings with exploitation scenario and impact.

Phase 4: Defense Evaluation

Assess existing defense mechanisms:

Output: [DEFENSE-GAP] findings with recommendation.

Output Format

For each finding:

[CATEGORY] Severity: HIGH|MEDIUM|LOW
Location: file:line
Finding: Description
Attack: How an attacker would exploit this
Fix: Recommended remediation

Depth Modes

Integration

Action-Space Legality (AutoHarness Pattern)

CRG Integration (Optional Token-Efficiency)

공격 표면 분석에 crg-integration 스킬을 우선 호출하여 트러스트 boundary를 빠르게 매핑한다:

| Phase | CRG Tool | Purpose |

|-------|----------|---------|

| Attack surface | get_impact_radius | 보안 변경의 영향 추적 (recall-우선) |

| Caller analysis | query_graph | 신뢰 boundary 함수의 모든 caller 추적 |

| Diff focus | get_minimal_context | 보안 변경의 최소 review unit |

| Regression detect | detect_changes | 보안 의미 변경 감지 |

Fallback (CRG 미설치 시)

CRG MCP 미연결 시 sec-codeql-expert + grep 조합으로 fallback. CRG의 recall-우선 특성 보완 위해 sec-codeql-expert (precision-우선)와 병행 권장.

R013 Ecomode 정합

대규모 변경 PR (>50 lines) 또는 context >= 60% 시 CRG 호출 권장.

Refs: #1171 (CRG 통합), #1180 (본 cross-ref 추가)

Permission Mode

Pass mode: "bypassPermissions" on Agent calls for compatibility: it is required on CC < 2.1.212 (the per-call default, acceptEdits, overrides agent frontmatter permissionMode) and ignored on 2.1.212+, where subagents inherit the parent session's permission mode (adjustable via agent frontmatter permissionMode). Verify the effective mode before unattended runs: see R010 "Universal bypassPermissions".

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.