Skip to content
cccskills
FreePublished on GitHub

adversarial-review

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md4.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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:

  • External input reaching internal logic without validation → Tampering
  • Implicit trust between services → Elevation of Privilege
  • Shared storage without isolation → Information Disclosure
  • Authentication boundaries not clearly marked → Spoofing

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

Phase 2: Attack Surface Mapping

Map all entry points and exposure:

  • Public API endpoints and auth requirements
  • File upload/download paths → Path traversal risk
  • External system calls (URLs, queries) → SSRF/Injection
  • Event handlers and callbacks → Race conditions
  • Error message verbosity → Information Disclosure

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

Phase 3: Business Logic Review

Analyze logic flaws that static analysis misses:

  • State machine violations (skip steps, replay)
  • Authorization != authentication (authn ok but authz missing)
  • Race conditions in multi-step operations
  • Numeric overflow/underflow in financial calculations
  • Default-allow vs default-deny patterns

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

Phase 4: Defense Evaluation

Assess existing defense mechanisms:

  • Input validation completeness (allowlist vs blocklist)
  • Output encoding consistency
  • Rate limiting and abuse prevention
  • Logging coverage for security events
  • Secret management (hardcoded credentials, env leaks)

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

  • quick: Phase 1 + 2 only (trust boundaries + attack surface)
  • thorough: All 4 phases with detailed exploitation scenarios

Integration

  • Complements dev-review (best practices) with attacker perspective
  • Works with sec-codeql-expert for pattern-based + logic-based coverage
  • Can be chained: dev-review → adversarial-review for complete coverage
  • Works with action-validator for action-space legality checking

Action-Space Legality (AutoHarness Pattern)

  • Do agents only call tools within their declared tools frontmatter?
  • Do file operations stay within R002-declared access scope?
  • Are domain boundaries respected (backend agent not editing frontend files)?
  • Could an agent's task contract be tightened without losing functionality?

CRG Integration (Optional Token-Efficiency)

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

PhaseCRG ToolPurpose
Attack surfaceget_impact_radius보안 변경의 영향 추적 (recall-우선)
Caller analysisquery_graph신뢰 boundary 함수의 모든 caller 추적
Diff focusget_minimal_context보안 변경의 최소 review unit
Regression detectdetect_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

When spawning agents via the Agent tool during this skill's execution, always pass mode: "bypassPermissions". The Agent tool default (acceptEdits) overrides agent frontmatter permissionMode, causing permission prompts during unattended execution.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Apache Airflow best practices for DAG authoring, testing, and production deployment

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

AWS patterns from Well-Architected Framework

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

See all skills by baekenough

Report a problem with this skill