Skill: Security Review
Supplementary Files:
payloads.md — Security review commands, test payloads, and audit scripts organized by OWASP category
test-cases.md — Structured test cases for security review checklists covering secrets, input validation, injection, authentication, and data exposure
guides/ — Deep-dive methodology guides for systematic security auditing
Summary
This skill provides structured review methodology to identify vulnerabilities across OWASP Top 10 categories during penetration testing.
Domain: assessment
Description
Comprehensive security checklist and review patterns for analyzing applications, configurations, and infrastructure. This skill provides structured review methodology to identify vulnerabilities across OWASP Top 10 categories during penetration testing.
Difference from security-bounty-hunter: bounty-hunter focuses on finding single exploitable vulnerabilities for reporting. This skill provides a systematic review framework to audit an entire application or system comprehensively.
Use Cases
- Pre-engagement security review of target application architecture
- Source code audit during white-box penetration testing
- Configuration review of infrastructure (servers, containers, cloud services)
- Security assessment of authentication and authorization mechanisms
- Reviewing third-party integrations and API security
- Post-exploitation analysis of discovered credentials and secrets
Core Tools
| Tool |
Category |
Purpose |
| Semgrep |
SAST |
Multi-language pattern-based code scanning |
| CodeQL |
SAST |
Semantic code analysis (GitHub) |
| Bandit |
SAST (Python) |
Python security lint |
| Snyk Code |
SAST |
Commercial SAST with dependency scan |
| SonarQube |
SAST |
Code quality + security platform |
| Trivy |
Container/FS |
Container, filesystem, and IaC scanning |
| Syft / Grype |
SBOM |
SBOM generation + vulnerability matching |
| detect-secrets |
Secrets |
Pre-commit secret detection (Yelp) |
| gitleaks |
Secrets |
Git history secret scanner |
| semgrep-secret |
Secrets |
Secret detection rules pack for Semgrep |
| checkov / tfsec |
IaC |
Terraform / CloudFormation static analysis |
| eslint-plugin-security |
Lint |
JavaScript/TypeScript security rules |
| CodeSeen / reviewdog |
Review |
Automated PR review integration |
Methodology
Security Review Checklist
1. Secrets Management
Check for:
- Hardcoded API keys, tokens, passwords in source code
- Secrets in configuration files committed to version control
- Default credentials in services and admin panels
- Exposed
.env, .git, backup files on web servers
- Secrets in client-side JavaScript, mobile app bundles
Tools:
# Scan for secrets in code
trufflehog filesystem /path/to/repo
gitleaks detect --source /path/to/repo
# Check for exposed files on web server
curl -s http://target/.env
curl -s http://target/.git/HEAD
curl -s http://target/backup.sql
curl -s http://target/config.yml.bak
2. Input Validation
Check for:
- Missing server-side validation (relying on client-side only)
- Unvalidated file uploads (type, size, content)
- Direct use of user input in queries, commands, or templates
- Missing or weak content-type validation
- Insufficient output encoding
3. Injection Flaws
SQL Injection:
- String concatenation in SQL queries
- ORM misuse (raw queries with user input)
- NoSQL injection (MongoDB operator injection)
Command Injection:
- User input passed to
system(), exec(), os.popen()
- Unsanitized filenames in file operations
- Unsafe deserialization (pickle, YAML, JSON with revivers)
LDAP Injection:
- User input in LDAP filters without escaping
Template Injection:
- User input in template engines (Jinja2, Twig, Freemarker)
4. Authentication & Authorization
Authentication:
- Weak password policies (length, complexity, rotation)
- Missing multi-factor authentication for sensitive operations
- Session management flaws (fixation, hijacking)
- Token storage (localStorage vs httpOnly cookies)
- OAuth/SAML misconfiguration
Authorization:
- Missing role-based access control
- Insecure direct object references (IDOR)
- Missing authorization checks on API endpoints
- Privilege escalation paths
5. Security Headers & Transport
# Verify security headers
curl -sI http://target | grep -i "strict-transport\|content-security\|x-frame\|x-content-type\|x-xss"
# Check TLS configuration
nmap --script ssl-enum-ciphers -p 443 target
sslyze --regular target
6. API Security
Check for:
- Missing rate limiting on API endpoints
- Excessive data in API responses (over-fetching)
- Missing input validation on API parameters
- Improper error handling leaking internal state
- API versioning and deprecation security
7. Dependency Security
# Audit dependencies
npm audit
pip-audit
cargo audit
# Check for known vulnerabilities
snyk test
grype /path/to/image
trivy image target-image:tag
Review Workflow
Step 1: Surface Mapping
- Identify all entry points (web, API, file upload, webhooks)
- Map authentication boundaries
- Identify data flows and storage locations
Step 2: Prioritized Review
- Authentication and session management
- Authorization and access control
- Input validation and injection points
- Secrets and sensitive data handling
- Security headers and transport
- Dependencies and third-party components
Step 3: Evidence Collection
- Document each finding with: location, severity, reproduction steps
- Capture screenshots and HTTP requests/responses
- Map findings to OWASP Top 10 and CWE classifications
Step 4: Report
- Executive summary with risk ratings
- Detailed findings with evidence
- Remediation recommendations prioritized by severity
Severity Classification
| Level |
Criteria |
Action |
| CRITICAL |
Remote code execution, data breach, auth bypass |
Immediate remediation |
| HIGH |
Significant data exposure, privilege escalation |
Remediate before release |
| MEDIUM |
Limited data exposure, misconfiguration |
Plan remediation |
| LOW |
Information leakage, minor misconfiguration |
Address when convenient |
| INFO |
Best practice deviation, no direct exploit |
Document for improvement |
Defense Perspective
- Defense in depth: Each layer should independently prevent unauthorized access
- Least privilege: Grant minimum necessary permissions
- Secure defaults: Default configurations should be secure, not permissive
- Fail closed: Errors should deny access, not grant it
Detection Methods
Security Review Audit
- Code review metrics: Review depth, finding density, false positive rate.
- Architecture review: Threat model coverage (STRIDE, PASTA).
- Penetration test: Coverage of OWASP Top 10, API Top 10, ATT&CK.
SIEM Detection Rules
- Splunk SPL:
index=code:review | stats count by reviewer | where count > 100
- GitHub Advanced Security: CodeQL, secret scanning in PRs.
Defense Evasion Techniques
Operational Security for Reviewers
- Verify findings: Independent reproduction before reporting.
- Provide actionable remediation: Don't just identify problems; suggest fixes.
- Map to MITRE ATT&CK: Standardized framework for cross-org understanding.
Orchestration
ECC Loop Pattern: Sequential Pipeline
surface map → prioritized review → evidence collection → report
Rationale: Security reviews require systematic coverage following a defined checklist order. Each phase builds on the previous one — surface mapping identifies entry points, prioritized review allocates effort by risk, evidence collection captures reproducible findings, and report generation delivers actionable results.
Integration:
repo-scan — codebase classification and attack surface identification (provides input for surface mapping phase)
terminal-ops — evidence capture via curl, nmap, and tool output recording
verification-loop — finding confirmation through independent retesting
Cross-Skill Pipeline:
repo-scan → security-review → verification-loop → chronicle
repo-san classifies the codebase and identifies high-value targets, security-review performs systematic OWASP audit, verification-loop confirms findings independently, chronicle archives the final report.
Quality Gate:
- Pre-condition: Target scope defined with rules of engagement documented
- Post-condition: All OWASP Top 10 categories assessed with findings documented
- Verification: Findings independently confirmed through reproduction and retesting
Report Template
# Security Review Report
*Target: [system/application] | Date: [date] | Scope: [boundaries]*
## Executive Summary
[Overall risk rating and key findings]
## Findings
### [SEVERITY] [Title]
- **CWE**: [CWE-ID]
- **OWASP**: [Category]
- **Location**: [file/endpoint]
- **Description**: [what was found]
- **Evidence**: [reproduction steps]
- **Impact**: [what attacker can achieve]
- **Remediation**: [how to fix]
## Summary Statistics
| Severity | Count |
|----------|-------|
| Critical | N |
| High | N |
| Medium | N |
| Low | N |
| Info | N |
1---2name: security-review3description: Comprehensive security checklist and review patterns for analyzing applications, configurations, and infrastructure. This skill provides structured review methodology to identify vulnerabilities across OWASP Top 10 categories during penetration testing.4---56789# Skill: Security Review1011> **Supplementary Files**:12> - `payloads.md` — Security review commands, test payloads, and audit scripts organized by OWASP category13> - `test-cases.md` — Structured test cases for security review checklists covering secrets, input validation, injection, authentication, and data exposure14> - `guides/` — Deep-dive methodology guides for systematic security auditing1516## Summary1718This skill provides structured review methodology to identify vulnerabilities across OWASP Top 10 categories during penetration testing.1920**Domain**: assessment2122## Description2324Comprehensive security checklist and review patterns for analyzing applications, configurations, and infrastructure. This skill provides structured review methodology to identify vulnerabilities across OWASP Top 10 categories during penetration testing.2526Difference from `security-bounty-hunter`: bounty-hunter focuses on finding single exploitable vulnerabilities for reporting. This skill provides a systematic review framework to audit an entire application or system comprehensively.2728## Use Cases2930- Pre-engagement security review of target application architecture31- Source code audit during white-box penetration testing32- Configuration review of infrastructure (servers, containers, cloud services)33- Security assessment of authentication and authorization mechanisms34- Reviewing third-party integrations and API security35- Post-exploitation analysis of discovered credentials and secrets3637## Core Tools3839| Tool | Category | Purpose |40|------|----------|---------|41| Semgrep | SAST | Multi-language pattern-based code scanning |42| CodeQL | SAST | Semantic code analysis (GitHub) |43| Bandit | SAST (Python) | Python security lint |44| Snyk Code | SAST | Commercial SAST with dependency scan |45| SonarQube | SAST | Code quality + security platform |46| Trivy | Container/FS | Container, filesystem, and IaC scanning |47| Syft / Grype | SBOM | SBOM generation + vulnerability matching |48| detect-secrets | Secrets | Pre-commit secret detection (Yelp) |49| gitleaks | Secrets | Git history secret scanner |50| semgrep-secret | Secrets | Secret detection rules pack for Semgrep |51| checkov / tfsec | IaC | Terraform / CloudFormation static analysis |52| eslint-plugin-security | Lint | JavaScript/TypeScript security rules |53| CodeSeen / reviewdog | Review | Automated PR review integration |5455## Methodology5657### Security Review Checklist5859#### 1. Secrets Management6061**Check for:**62- Hardcoded API keys, tokens, passwords in source code63- Secrets in configuration files committed to version control64- Default credentials in services and admin panels65- Exposed `.env`, `.git`, backup files on web servers66- Secrets in client-side JavaScript, mobile app bundles6768**Tools:**69```bash70# Scan for secrets in code71trufflehog filesystem /path/to/repo72gitleaks detect --source /path/to/repo7374# Check for exposed files on web server75curl -s http://target/.env76curl -s http://target/.git/HEAD77curl -s http://target/backup.sql78curl -s http://target/config.yml.bak79```8081#### 2. Input Validation8283**Check for:**84- Missing server-side validation (relying on client-side only)85- Unvalidated file uploads (type, size, content)86- Direct use of user input in queries, commands, or templates87- Missing or weak content-type validation88- Insufficient output encoding8990#### 3. Injection Flaws9192**SQL Injection:**93- String concatenation in SQL queries94- ORM misuse (raw queries with user input)95- NoSQL injection (MongoDB operator injection)9697**Command Injection:**98- User input passed to `system()`, `exec()`, `os.popen()`99- Unsanitized filenames in file operations100- Unsafe deserialization (pickle, YAML, JSON with revivers)101102**LDAP Injection:**103- User input in LDAP filters without escaping104105**Template Injection:**106- User input in template engines (Jinja2, Twig, Freemarker)107108#### 4. Authentication & Authorization109110**Authentication:**111- Weak password policies (length, complexity, rotation)112- Missing multi-factor authentication for sensitive operations113- Session management flaws (fixation, hijacking)114- Token storage (localStorage vs httpOnly cookies)115- OAuth/SAML misconfiguration116117**Authorization:**118- Missing role-based access control119- Insecure direct object references (IDOR)120- Missing authorization checks on API endpoints121- Privilege escalation paths122123#### 5. Security Headers & Transport124125```bash126# Verify security headers127curl -sI http://target | grep -i "strict-transport\|content-security\|x-frame\|x-content-type\|x-xss"128129# Check TLS configuration130nmap --script ssl-enum-ciphers -p 443 target131sslyze --regular target132```133134#### 6. API Security135136**Check for:**137- Missing rate limiting on API endpoints138- Excessive data in API responses (over-fetching)139- Missing input validation on API parameters140- Improper error handling leaking internal state141- API versioning and deprecation security142143#### 7. Dependency Security144145```bash146# Audit dependencies147npm audit148pip-audit149cargo audit150151# Check for known vulnerabilities152snyk test153grype /path/to/image154trivy image target-image:tag155```156157### Review Workflow158159**Step 1: Surface Mapping**160- Identify all entry points (web, API, file upload, webhooks)161- Map authentication boundaries162- Identify data flows and storage locations163164**Step 2: Prioritized Review**1651. Authentication and session management1662. Authorization and access control1673. Input validation and injection points1684. Secrets and sensitive data handling1695. Security headers and transport1706. Dependencies and third-party components171172**Step 3: Evidence Collection**173- Document each finding with: location, severity, reproduction steps174- Capture screenshots and HTTP requests/responses175- Map findings to OWASP Top 10 and CWE classifications176177**Step 4: Report**178- Executive summary with risk ratings179- Detailed findings with evidence180- Remediation recommendations prioritized by severity181182### Severity Classification183184| Level | Criteria | Action |185|-------|----------|--------|186| CRITICAL | Remote code execution, data breach, auth bypass | Immediate remediation |187| HIGH | Significant data exposure, privilege escalation | Remediate before release |188| MEDIUM | Limited data exposure, misconfiguration | Plan remediation |189| LOW | Information leakage, minor misconfiguration | Address when convenient |190| INFO | Best practice deviation, no direct exploit | Document for improvement |191192### Defense Perspective193194- **Defense in depth**: Each layer should independently prevent unauthorized access195- **Least privilege**: Grant minimum necessary permissions196- **Secure defaults**: Default configurations should be secure, not permissive197- **Fail closed**: Errors should deny access, not grant it198199## Detection Methods200201### Security Review Audit202- **Code review metrics**: Review depth, finding density, false positive rate.203- **Architecture review**: Threat model coverage (STRIDE, PASTA).204- **Penetration test**: Coverage of OWASP Top 10, API Top 10, ATT&CK.205206### SIEM Detection Rules207- **Splunk SPL**: `index=code:review | stats count by reviewer | where count > 100`208- **GitHub Advanced Security**: CodeQL, secret scanning in PRs.209210## Defense Evasion Techniques211212### Operational Security for Reviewers213- **Verify findings**: Independent reproduction before reporting.214- **Provide actionable remediation**: Don't just identify problems; suggest fixes.215- **Map to MITRE ATT&CK**: Standardized framework for cross-org understanding.216217## Orchestration218219**ECC Loop Pattern**: Sequential Pipeline220221```222surface map → prioritized review → evidence collection → report223```224225**Rationale**: Security reviews require systematic coverage following a defined checklist order. Each phase builds on the previous one — surface mapping identifies entry points, prioritized review allocates effort by risk, evidence collection captures reproducible findings, and report generation delivers actionable results.226227**Integration**:228- `repo-scan` — codebase classification and attack surface identification (provides input for surface mapping phase)229- `terminal-ops` — evidence capture via curl, nmap, and tool output recording230- `verification-loop` — finding confirmation through independent retesting231232**Cross-Skill Pipeline**:233```234repo-scan → security-review → verification-loop → chronicle235```236repo-san classifies the codebase and identifies high-value targets, security-review performs systematic OWASP audit, verification-loop confirms findings independently, chronicle archives the final report.237238**Quality Gate**:239- **Pre-condition**: Target scope defined with rules of engagement documented240- **Post-condition**: All OWASP Top 10 categories assessed with findings documented241- **Verification**: Findings independently confirmed through reproduction and retesting242243## Report Template244245```markdown246# Security Review Report247*Target: [system/application] | Date: [date] | Scope: [boundaries]*248249## Executive Summary250[Overall risk rating and key findings]251252## Findings253254### [SEVERITY] [Title]255- **CWE**: [CWE-ID]256- **OWASP**: [Category]257- **Location**: [file/endpoint]258- **Description**: [what was found]259- **Evidence**: [reproduction steps]260- **Impact**: [what attacker can achieve]261- **Remediation**: [how to fix]262263## Summary Statistics264| Severity | Count |265|----------|-------|266| Critical | N |267| High | N |268| Medium | N |269| Low | N |270| Info | N |271```