Methodology for finding bugs, security vulnerabilities, and code issues in branches/PRs. Use when reviewing changes, conducting security reviews, or auditing code.
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Methodology for finding bugs, security vulnerabilities, and code issues in branches/PRs. Use when reviewing changes, conducting security reviews, or auditing code.
Find Bugs
Systematic approach to find bugs, security vulnerabilities, and code quality issues.
When to Use
Reviewing pull requests
Conducting security reviews
Auditing code changes before deploy
Finding bugs in feature branches
Phase 1: Input Gathering
Get the Full Diff
# Get diff against main branch
git diff $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')...HEAD
# Or specific branch
git diff main...HEAD
# List changed files
git diff --name-only main...HEAD
Understand Context
What problem is being solved?
What files were changed?
Is there a related issue/ticket?
What's the expected behavior?
Phase 2: Attack Surface Mapping
For each changed file, identify:
Category
What to Find
User Inputs
Request params, body, headers, URL components
Database Queries
Eloquent, raw queries, whereRaw
Auth Checks
Middleware, $this->authorize(), @can
Session/State
Session writes, cache operations
External Calls
HTTP clients, API calls, webhooks
File Operations
Uploads, downloads, path handling
Laravel-Specific Patterns to Flag
// Flag these for review:
{!! $variable !!} // Raw output - XSS risk
DB::raw($userInput) // Raw SQL - injection risk$request->all() // Mass assignment riskStorage::path($userInput) // Path traversal risk
Phase 3: Security Checklist
Check EVERY item for EVERY changed file:
Injection
No raw queries with user input
No DB::raw() with concatenated variables
No whereRaw() without bindings
No exec(), shell_exec(), system() with user input
XSS
All user output uses {{ }} not {!! !!}
If {!! !!} used, content is sanitized
JSON output properly encoded
Authentication
Protected routes have auth middleware
Sensitive actions require reauthentication if needed
**File:Line** - Brief description
**Severity:** Critical | High | Medium | Low
**Problem:** What's wrong
**Evidence:** Why this is real (not already fixed, no test, etc.)
**Fix:** Concrete suggestion
**Reference:** OWASP, Laravel docs, etc.
Example Finding
**app/Http/Controllers/PostController.php:45** - SQL Injection
**Severity:** Critical
**Problem:** User input concatenated into raw query
```php
$posts = DB::select("SELECT * FROM posts WHERE title LIKE '%{$request->search}%'");
Evidence: No sanitization, no parameterization
Fix: Use bindings
$posts = DB::select(
"SELECT * FROM posts WHERE title LIKE ?",
['%' . $request->search . '%']
);