
security-pen-testing
Use when the user asks to perform security audits, penetration testing, vulnerability scanning, OWASP Top 10 checks, or offensive security assessments. Covers static analysis, dependency scanning, secret detection, API security testing, and pen test report generation.
- Installs
- 836
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/alirezarezvani/claude-skills --skill security-pen-testing- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads security-pen-testing automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Security Penetration Testing
Hands-on offensive security testing skill for finding vulnerabilities before attackers do. This is NOT compliance checking (see senior-secops) or security policy writing (see senior-security) — this is about systematic vulnerability discovery through authorized testing.
Table of Contents
- Overview
- OWASP Top 10 Systematic Audit
- Static Analysis
- Dependency Vulnerability Scanning
- Secret Scanning
- API Security Testing
- Web Vulnerability Testing
- Infrastructure Security
- Pen Test Report Generation
- Responsible Disclosure Workflow
- Workflows
- Anti-Patterns
- Cross-References
Overview
What This Skill Does
This skill provides the methodology, checklists, and automation for offensive security testing — actively probing systems to discover exploitable vulnerabilities. It covers web applications, APIs, infrastructure, and supply chain security.
Distinction from Other Security Skills
| Skill | Focus | Approach |
|---|---|---|
| security-pen-testing (this) | Finding vulnerabilities | Offensive — simulate attacker techniques |
| senior-secops | Security operations | Defensive — monitoring, incident response, SIEM |
| senior-security | Security policy | Governance — policies, frameworks, risk registers |
| skill-security-auditor | CI/CD gates | Automated — pre-merge security checks |
Prerequisites
All testing described here assumes written authorization from the system owner. Unauthorized testing is illegal under the CFAA and equivalent laws worldwide. Always obtain a signed scope-of-work or rules-of-engagement document before starting.
OWASP Top 10 Systematic Audit
Use the vulnerability scanner tool for automated checklist generation:
# Generate OWASP checklist for a web application
python scripts/vulnerability_scanner.py --target web --scope full
# Quick API-focused scan
python scripts/vulnerability_scanner.py --target api --scope quick --json
Quick Reference (OWASP Top 10:2025)
| # | Category | Key Tests |
|---|---|---|
| A01 | Broken Access Control | IDOR, vertical escalation, CORS, forced browsing, SSRF (internal IPs, cloud metadata, DNS rebinding) |
| A02 | Security Misconfiguration | Default credentials, debug mode, security headers, directory listing |
| A03 | Software Supply Chain Failures | Dependency audit (npm/pip/go), EOL checks, known CVEs, build and CI/CD provenance |
| A04 | Cryptographic Failures | TLS version, password hashing, hardcoded keys, weak PRNG |
| A05 | Injection | SQLi, NoSQLi, command injection, template injection, XSS |
| A06 | Insecure Design | Rate limiting, business logic abuse, multi-step flow bypass |
| A07 | Authentication Failures | Brute force, session cookie flags, session invalidation, MFA bypass |
| A08 | Software or Data Integrity Failures | Unsafe deserialization, SRI checks, unsigned updates |
| A09 | Security Logging and Alerting Failures | Auth event logging, sensitive data in logs, alerting thresholds |
| A10 | Mishandling of Exceptional Conditions | Fail-open on errors, unhandled exceptions, stack-trace leakage, partial transactions |
# Audit dependencies
python scripts/dependency_auditor.py --file package.json --severity high
python scripts/dependency_auditor.py --file requirements.txt --json
See owasp_top_10_checklist.md for detailed test procedures, code patterns to detect, remediation steps, and CVSS scoring guidance for each category.
Static Analysis
Recommended tools: CodeQL (custom queries for project-specific patterns), Semgrep (rule-based scanning with auto-fix), ESLint security plugins (eslint-plugin-security, eslint-plugin-no-unsanitized).
Key patterns to detect: SQL injection via string concatenation, hardcoded JWT secrets, unsafe YAML/pickle deserialization, missing security middleware (e.g., Express without Helmet).
See attack_patterns.md for code patterns and detection payloads across injection types.
Dependency Vulnerability Scanning
Ecosystem commands: npm audit, pip audit, govulncheck ./..., bundle audit check
CVE Triage Workflow:
- Collect — Run ecosystem audit tools, aggregate findings
- Deduplicate — Group by CVE ID across direct and transitive deps
- Prioritize — Critical + exploitable + reachable = fix immediately
- Remediate — Upgrade, patch, or mitigate with compensating controls
- Verify — Rerun audit to confirm fix, update lock files
python scripts/dependency_auditor.py --file package.json --severity critical --json
Secret Scanning
Tools: TruffleHog (git history + filesystem), Gitleaks (regex-based with custom rules).
# Scan git history for verified secrets
trufflehog git file://. --only-verified --json
# Scan filesystem
trufflehog filesystem . --json
Integration points: Pre-commit hooks (gitleaks, trufflehog), CI/CD gates (GitHub Actions with trufflesecurity/trufflehog@main). Configure .gitleaks.toml for custom rules (AWS keys, API keys, private key headers) and allowlists for test fixtures.
API Security Testing
Authentication Bypass
- JWT manipulation: Change
algtonone, RS256-to-HS256 confusion, claim modification (role: "admin",exp: 9999999999) - Session fixation: Check if session ID changes after authentication
Authorization Flaws
- IDOR/BOLA: Change resource IDs in every endpoint — test read, update, delete across users
- BFLA: Regular user tries admin endpoints (expect 403)
- Mass assignment: Add privileged fields (
role,is_admin) to update requests
Rate Limiting & GraphQL
- Rate limiting: Rapid-fire requests to auth endpoints; expect 429 after threshold
- GraphQL: Test introspection (should be disabled in prod), query depth attacks, batch mutations bypassing rate limits
See attack_patterns.md for complete JWT manipulation payloads, IDOR testing methodology, BFLA endpoint lists, GraphQL introspection/depth/batch attack patterns, and rate limiting bypass techniques.
Web Vulnerability Testing
| Vulnerability | Key Tests |
|---|---|
| XSS | Reflected (script/img/svg payloads), Stored (persistent fields), DOM-based (innerHTML + location.hash) |
| CSRF | Replay without token (expect 403), cross-session token replay, check SameSite cookie attribute |
| SQL Injection | Error-based (' OR 1=1--), union-based enumeration, time-based blind (SLEEP(5)), boolean-based blind |
| SSRF | Internal IPs, cloud metadata endpoints (AWS/GCP/Azure), IPv6/hex/decimal encoding bypasses |
| Path Traversal | ../../../etc/passwd, URL encoding, double encoding bypasses |
See attack_patterns.md for complete test payloads (XSS filter bypasses, context-specific XSS, SQL injection per database engine, SSRF bypass techniques, and DOM-based XSS source/sink pairs).
Infrastructure Security
Key checks:
- Cloud storage: S3 bucket public access (
aws s3 ls s3://bucket --no-sign-request), bucket policies, ACLs - HTTP security headers: HSTS, CSP (no
unsafe-inline/unsafe-eval), X-Content-Type-Options, X-Frame-Options, Referrer-Policy - TLS configuration:
nmap --script ssl-enum-ciphers -p 443 target.comortestssl.sh— reject TLS 1.0/1.1, RC4, 3DES, export-grade ciphers - Port scanning:
nmap -sV target.com— flag dangerous open ports (FTP/21, Telnet/23, Redis/6379, MongoDB/27017)
Pen Test Report Generation
Generate professional reports from structured findings:
# Generate markdown report from findings JSON
python scripts/pentest_report_generator.py --findings findings.json --format md --output report.md
# Generate JSON report
python scripts/pentest_report_generator.py --findings findings.json --format json --output report.json
Findings JSON Format
[
{
"title": "SQL Injection in Login Endpoint",
"severity": "critical",
"cvss_score": 9.8,
"cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"category": "A05:2025 - Injection",
"description": "The /api/login endpoint is vulnerable to SQL injection via the email parameter.",
"evidence": "Request: POST /api/login {\"email\": \"' OR 1=1--\", \"password\": \"x\"}\nResponse: 200 OK with admin session token",
"impact": "Full database access, authentication bypass, potential remote code execution",
"remediation": "Use parameterized queries. Replace string concatenation with prepared statements.",
"references": ["https://cwe.mitre.org/data/definitions/89.html"]
}
]
Report Structure
- Executive Summary: Business impact, overall risk level, top 3 findings
- Scope: What was tested, what was excluded, testing dates
- Methodology: Tools used, testing approach (black/gray/white box)
- Findings Table: Sorted by severity with CVSS scores
- Detailed Findings: Each with description, evidence, impact, remediation
- Remediation Priority Matrix: Effort vs. impact for each fix
- Appendix: Raw tool output, full payload lists
Responsible Disclosure Workflow
Responsible disclosure is mandatory for any vulnerability found during authorized testing. Standard timeline: report on day 1, follow up at day 7, status update at day 30, public disclosure at day 90.
Key principles: Never exploit beyond proof of concept, encrypt all communications, do not access real user data, document everything with timestamps.
See responsible_disclosure.md for full disclosure timelines (standard 90-day, accelerated 30-day, extended 120-day), communication templates, legal considerations, bug bounty program integration, and CVE request process.
Workflows
Workflow 1: Quick Security Check (15 Minutes)
For pre-merge reviews or quick health checks:
# 1. Generate OWASP checklist
python scripts/vulnerability_scanner.py --target web --scope quick
# 2. Scan dependencies
python scripts/dependency_auditor.py --file package.json --severity high
# 3. Check for secrets in recent commits
# (Use gitleaks or trufflehog as described in Secret Scanning section)
# 4. Review HTTP security headers
curl -sI https://target.com | grep -iE "(strict-transport|content-security|x-frame|x-content-type)"
Decision: If any critical or high findings, block the merge.
Workflow 2: Full Penetration Test (Multi-Day Assessment)
Day 1 — Reconnaissance:
- Map the attack surface: endpoints, authentication flows, third-party integrations
- Run automated OWASP checklist (full scope)
- Run dependency audit across all manifests
- Run secret scan on full git history
Day 2 — Manual Testing:
- Test authentication and authorization (IDOR, BOLA, BFLA)
- Test injection points (SQLi, XSS, SSRF, command injection)
- Test business logic flaws
- Test API-specific vulnerabilities (GraphQL, rate limiting, mass assignment)
Day 3 — Infrastructure and Reporting:
- Check cloud storage permissions
- Verify TLS configuration and security headers
- Port scan for unnecessary services
- Compile findings into structured JSON
- Generate pen test report
# Generate final report
python scripts/pentest_report_generator.py --findings findings.json --format md --output pentest-report.md
Workflow 3: CI/CD Security Gate
Automated security checks on every PR: secret scanning (TruffleHog), dependency audit (npm audit, pip audit), SAST (Semgrep with p/security-audit, p/owasp-top-ten), and security headers check on staging.
Gate Policy: Block merge on critical/high findings. Warn on medium. Log low/info.
Anti-Patterns
- Testing in production without authorization — Always get written permission and use staging/test environments when possible
- Ignoring low-severity findings — Low findings compound; a chain of lows can become a critical exploit path
- Skipping responsible disclosure — Every vulnerability found must be reported through proper channels
- Relying solely on automated tools — Tools miss business logic flaws, chained exploits, and novel attack vectors
- Testing without a defined scope — Scope creep leads to legal liability; document what is and isn't in scope
- Reporting without remediation guidance — Every finding must include actionable remediation steps
- Storing evidence insecurely — Pen test evidence (screenshots, payloads, tokens) is sensitive; encrypt and restrict access
- One-time testing — Security testing must be continuous; integrate into CI/CD and schedule periodic assessments
Cross-References
| Skill | Relationship |
|---|---|
| senior-secops | Defensive security operations — monitoring, incident response, SIEM configuration |
| senior-security | Security policy and governance — frameworks, risk registers, compliance |
| dependency-auditor | Deep supply chain security — SBOMs, license compliance, transitive risk |
| code-reviewer | Code review practices — includes security review checklist |
FAQ
What does the security-pen-testing skill do?
Use when the user asks to perform security audits, penetration testing, vulnerability scanning, OWASP Top 10 checks, or offensive security assessments. Covers static analysis, dependency scanning, secret detection, API security testing, and pen test report generation.
How do I install security-pen-testing?
Run npx skills add https://github.com/alirezarezvani/claude-skills --skill security-pen-testing in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/security-pen-testing/ (personal) or .claude/skills/security-pen-testing/ (project).
Which AI agents can use security-pen-testing?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is security-pen-testing safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains security-pen-testing?
It is published by alirezarezvani in alirezarezvani/claude-skills. It has 836 recorded installs.
More from alirezarezvani/claude-skills
engineering-skills
alirezarezvani/claude-skills
Index of the engineering-team skills bundle for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw, and 6 more tools. Architecture, frontend, backend, QA, DevOps, security, AI/ML, data engineering, Playwright, Stripe, AWS, MS365 (stdlib-only Python tools). Use when browsing or choosing among engineering-team role skills — load only the one specialist SKILL.md you need, never bulk-load the bundle.
finance-skills
alirezarezvani/claude-skills
Router/index for the finance skills bundled in this plugin: financial-analyst (ratio analysis, DCF valuation, budget variance, rolling forecasts), saas-metrics-coach (ARR/MRR, churn, CAC/LTV, NRR, quick ratio) and month-end-close (close calendar, reconciliations, flux review). Use when a finance request doesn't obviously match one skill and you need to pick the right one (e.g., 'analyze these financials', 'how healthy are my SaaS metrics').
marketing-skills
alirezarezvani/claude-skills
Directory and router for the marketing skills library. Use when you need to find the right marketing skill for a task, see what marketing capabilities exist, or get oriented in this plugin. 44 specialist skills across 8 pods (content, SEO + AEO, CRO, channels, growth, intelligence, sales enablement, ops), 59 stdlib Python tools. Routes to one skill — it does not execute marketing work itself.
business-growth-skills
alirezarezvani/claude-skills
Router/index for the 4 business & growth skills bundled in this plugin: customer-success-manager (health scoring, churn risk, expansion), sales-engineer (RFP analysis, competitive matrices, PoC planning), revenue-operations (pipeline, forecast accuracy, GTM efficiency), and contract-and-proposal-writer. Use when a growth/revenue request doesn't obviously match one skill and you need to pick the right one (e.g., 'which accounts are at risk', 'should we bid on this RFP').
engineering-advanced-skills
alirezarezvani/claude-skills
Index of 37 advanced engineering agent skills for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Use when browsing or choosing among the POWERFUL-tier engineering skills: agent design, RAG, MCP servers, CI/CD, database design, observability, security auditing, changelog/release automation, reliability (SLO/chaos/flags/operators), platform ops.
product-skills
alirezarezvani/claude-skills
Use when coordinating product work across the 12 bundled product sub-skills (RICE, OKRs, UX research, design tokens, competitive teardown, analytics, experiments, discovery, roadmaps, spec-to-repo, landing pages, SaaS scaffolding) or the 4 standalone product-team plugins (user stories, Apple HIG, code-to-PRD, research summarizer). Triggers on 'help me prioritize', 'plan a product experiment', 'we ship features nobody uses', 'run the discovery loop', 'is our OST sound'. Forks context to route to one sub-skill via a deterministic signal router and returns a digest; can also drive a continuous-discovery loop (Torres cadence tracker + OST linter as machine gates) or a full goal→plan→execute→verify→close run through the repo-wide agent-harness. Distinct from project-management (how to deliver vs what to build), marketing/landing (from-scratch pages), and engineering/agent-harness (the generic loop engine this orchestrator plugs into).
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.