본문으로 건너뛰기
cccskills
무료GitHub에 공개

adversarial-review

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

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

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

AWS patterns from Well-Architected Framework

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

baekenough의 스킬 모두 보기

이 스킬의 문제 신고