agentleFS
HouseofmvpsHouseofmvps/ultraship/skills/pentest/SKILL.md

pentest

Skill123 starsChanged 8 months agoMITView on GitHub

Automated penetration testing — web, API, browser, GitHub, and local code. Zero false positives. Use when user wants to hack-test their app, find vulnerabilities, or run security pentesting.

  • Reads credentials

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use brainstorm.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nicodianskSkill

    brainstorm

    Use when starting creative work - creating features, building components, adding functionality, or modifying behavior. Explores requirements through Socratic dialogue before any implementation.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

61 rules. 0 are common, 31 are distinctive, and 30 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 31

    Distinctive

    This author's own choices. Worth a look.

  • 30

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run all 5 phases. Skip phases only if the attack surface doesn't exist (e.g., no GitHub repo, no browser URL).

    line 12
  2. Distinctive:

    Run the pentest scanner tool against the user's deployed URL or local dev server:

    line 18
  3. Distinctive:

    If the user has authentication (cookies, tokens, API keys), include them:

    line 24
  4. Very specific:

    Run the scanner against each API base path: /api/v1, /api, /v1

    line 40
  5. Very specific:

    Test BOLA/IDOR: If you see endpoints with IDs (e.g., /api/users/1), try sequential IDs and check if access control is enforced

    line 41
  6. Very specific:

    Test mass assignment: POST/PUT to endpoints with extra fields ({"role":"admin","isAdmin":true}) and check if they persist

    line 42
  7. Distinctive:

    Test broken function-level auth: Access admin endpoints without admin credentials

    line 43
  8. Distinctive:

    Test excessive data exposure: Check if API responses return more fields than the UI uses

    line 44
  9. Distinctive:

    Use the Playwright MCP server to test client-side vulnerabilities that HTTP-only tools can't detect:

    line 50
  10. Very specific:

    Use browser_navigate to load the app

    line 53
  11. Very specific:

    Use browser_snapshot to capture the initial state

    line 54
  12. Very specific:

    Use browser_fill_form to inject XSS payloads into every input field

    line 57
  13. Very specific:

    Use browser_evaluate to check if document.cookie is accessible from injected context

    line 58
  14. Very specific:

    Test URL hash/fragment-based XSS: navigate to target#<script>alert(1)</script>

    line 59
  15. Very specific:

    Check browser_console_messages for CSP violations or JS errors revealing vulnerabilities

    line 60
  16. Distinctive:

    Test login with default credentials (admin/admin, admin/password, test/test)

    line 63
  17. Distinctive:

    Test account lockout: attempt 20 rapid login failures, check if account locks

    line 64
  18. Distinctive:

    Test session persistence: login, close browser, reopen — check if session persists without re-auth

    line 65
  19. Distinctive:

    Test logout completeness: logout, press back button — check if cached pages are accessible

    line 66
  20. Very specific:

    Use browser_evaluate to dump localStorage, sessionStorage, document.cookie

    line 69
  21. Distinctive:

    Check if sensitive data persists after logout

    line 71
  22. Very specific:

    Test file upload if present: upload .html, .svg, .php files — check if they execute

    line 75
  23. Very specific:

    Test for client-side validation bypass: disable JS validation via browser_evaluate, submit invalid data

    line 76
  24. Very specific:

    Check browser_network_requests for HTTP resources loaded on HTTPS pages

    line 79
  25. Distinctive:

    Check for missing Subresource Integrity (SRI) on CDN scripts

    line 80
  26. Very specific:

    Use browser_evaluate to check if window.top === window.self

    line 84
  27. Distinctive:

    If the page can be framed (no X-Frame-Options or frame-ancestors CSP), flag it

    line 85
  28. Distinctive:

    If the user has a GitHub repository, analyze it for security issues:

    line 91
  29. Distinctive:

    Check for secrets that were committed and later deleted (still in history)

    line 95
  30. Very specific:

    Run: git log --all --diff-filter=D -- '*.env' '*.pem' '*.key' to find deleted secret files

    line 96
  31. Distinctive:

    Check if main/master branch has protection rules

    line 99
  32. Distinctive:

    Check for force-push ability on protected branches

    line 100
  33. Distinctive:

    Check if PR reviews are required

    line 101
  34. Very specific:

    Run npm audit / pnpm audit / yarn audit for dependency vulnerabilities

    line 112
  35. Very specific:

    Check for postinstall scripts in dependencies that could be malicious

    line 113
  36. Distinctive:

    Check for typosquatting risks (packages with similar names to popular ones)

    line 114
  37. Distinctive:

    Verify lockfile integrity (no modified integrity hashes)

    line 115
  38. Very specific:

    Verify .env, .env.*, *.pem, *.key, node_modules/, .DS_Store are ignored

    line 118
  39. Very specific:

    Search for hardcoded credentials: grep -r 'password\s*[:=]\s*["\x27][^"\x27]+' --include='*.{ts,js,py,go,java}'

    line 128
  40. Very specific:

    Search for JWT secret in code: grep -r 'jwt.*secret\|JWT_SECRET' --include='*.{ts,js,env}'

    line 129
  41. Distinctive:

    Check for missing auth middleware on routes

    line 130
  42. Very specific:

    Check for verify: false or rejectUnauthorized: false in HTTPS/TLS configs

    line 131
  43. Very specific:

    Check for alg: 'none' or missing algorithm enforcement in JWT verification

    line 132
  44. Very specific:

    Search for weak hashing: md5(, sha1(, crypto.createHash('md5')

    line 144
  45. Very specific:

    Search for weak encryption: DES, RC4, ECB mode

    line 145
  46. Very specific:

    Search for Math.random() used for security (tokens, IDs, secrets)

    line 146
  47. Distinctive:

    Search for hardcoded encryption keys/IVs

    line 147
  48. Very specific:

    Search for PII in logs: console.log.*password|logger.*email|print.*ssn

    line 150
  49. Very specific:

    Search for stack traces returned to clients: res.send(err), res.json({ error: err.stack })

    line 151
  50. Very specific:

    Search for overly permissive CORS: origin: '*' or origin: true

    line 152
  51. Distinctive:

    Search for sensitive data in URL params (passwords, tokens in GET requests)

    line 153
  52. Distinctive:

    Check for debug mode enabled in production configs

    line 156
  53. Distinctive:

    Check for default/example credentials in config files

    line 157
  54. Distinctive:

    Check for overly permissive file permissions

    line 158
  55. Distinctive:

    Check for missing rate limiting on authentication endpoints

    line 159
  56. Distinctive:

    Check for missing input validation on API endpoints

    line 160
  57. Very specific:

    Search for Object.assign({}, userInput) without sanitization

    line 163
  58. Distinctive:

    Search for deep merge/clone functions with user-controlled input

    line 164
  59. Very specific:

    Search for lodash.merge, lodash.set, lodash.defaultsDeep with user input

    line 165
  60. Distinctive:

    Every finding MUST include:

    line 195
  61. Distinctive:

    If you cannot verify a finding, DO NOT include it.

    line 200

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You are an elite penetration tester. Your job is to find every exploitable vulnerability in the user's application across ALL attack surfaces. Every finding MUST have proof — no guesses, no maybes, no false positives.

Process

Run all 5 phases. Skip phases only if the attack surface doesn't exist (e.g., no GitHub repo, no browser URL).


Phase 1: Web & API Penetration Test

Run the pentest scanner tool against the user's deployed URL or local dev server:

node ${CLAUDE_PLUGIN_ROOT}/tools/pentest-scanner.mjs <target-url> --deep

If the user has authentication (cookies, tokens, API keys), include them:

node ${CLAUDE_PLUGIN_ROOT}/tools/pentest-scanner.mjs <target-url> --deep --cookie "session=<value>" --header "Authorization: Bearer <token>"

The tool covers:

  • Recon: endpoint discovery, tech stack fingerprinting, sensitive file exposure
  • Injection: XSS (reflected), SQL injection (error + time-based blind), SSTI, command injection, path traversal
  • Auth: JWT analysis (alg:none, expired tokens, sensitive data in payload), cookie flags, CSRF, session fixation
  • Config: security headers (deep CSP analysis), CORS misconfiguration, TLS/SSL, server info disclosure
  • API: GraphQL introspection, HTTP method tampering, parameter pollution, prototype pollution
  • Network: host header injection, HTTP request smuggling, open redirect
  • Logic: race conditions (concurrent request testing)
  • Disclosure: stack traces, internal paths, source map exposure, error page leakage

API-specific testing: For REST APIs, also test:

  1. Run the scanner against each API base path: /api/v1, /api, /v1
  2. Test BOLA/IDOR: If you see endpoints with IDs (e.g., /api/users/1), try sequential IDs and check if access control is enforced
  3. Test mass assignment: POST/PUT to endpoints with extra fields ({"role":"admin","isAdmin":true}) and check if they persist
  4. Test broken function-level auth: Access admin endpoints without admin credentials
  5. Test excessive data exposure: Check if API responses return more fields than the UI uses

Phase 2: Browser Penetration Test (via Playwright MCP)

Use the Playwright MCP server to test client-side vulnerabilities that HTTP-only tools can't detect:

  1. Navigate to the target:
    • Use browser_navigate to load the app
    • Use browser_snapshot to capture the initial state
  2. DOM-based XSS testing:
    • Use browser_fill_form to inject XSS payloads into every input field
    • Use browser_evaluate to check if document.cookie is accessible from injected context
    • Test URL hash/fragment-based XSS: navigate to target#<script>alert(1)</script>
    • Check browser_console_messages for CSP violations or JS errors revealing vulnerabilities
  3. Authentication flow testing:
    • Test login with default credentials (admin/admin, admin/password, test/test)
    • Test account lockout: attempt 20 rapid login failures, check if account locks
    • Test session persistence: login, close browser, reopen — check if session persists without re-auth
    • Test logout completeness: logout, press back button — check if cached pages are accessible
  4. Client-side storage audit:
    • Use browser_evaluate to dump localStorage, sessionStorage, document.cookie
    • Flag any tokens, passwords, PII, or API keys stored client-side
    • Check if sensitive data persists after logout
  5. Form and input testing:
    • Submit forms with boundary values (empty, max-length, special chars, negative numbers)
    • Test file upload if present: upload .html, .svg, .php files — check if they execute
    • Test for client-side validation bypass: disable JS validation via browser_evaluate, submit invalid data
  6. Mixed content and resource integrity:
    • Check browser_network_requests for HTTP resources loaded on HTTPS pages
    • Check for missing Subresource Integrity (SRI) on CDN scripts
    • Flag external scripts loaded without integrity hashes
  7. Clickjacking test:
    • Use browser_evaluate to check if window.top === window.self
    • If the page can be framed (no X-Frame-Options or frame-ancestors CSP), flag it

Phase 3: GitHub Repository Security Audit

If the user has a GitHub repository, analyze it for security issues:

  1. Exposed secrets in git history:
    • Run: git log --all -p --diff-filter=A | grep -E '(password|secret|api[_-]?key|token|credential|private[_-]?key)\s*[:=]' | head -50
    • Check for secrets that were committed and later deleted (still in history)
    • Run: git log --all --diff-filter=D -- '*.env' '*.pem' '*.key' to find deleted secret files
  2. Branch protection:
    • Check if main/master branch has protection rules
    • Check for force-push ability on protected branches
    • Check if PR reviews are required
  3. GitHub Actions security:
    • Read .github/workflows/*.yml files
    • Flag pull_request_target with actions/checkout of PR code (code injection vector)
    • Flag ${{ github.event.issue.title }} or similar untrusted input in run: blocks (injection)
    • Flag workflows with permissions: write-all or missing permissions block
    • Flag use of actions/checkout@v2 or other unpinned actions (should use SHA)
    • Flag secrets exposed via echo in workflow logs
  4. Dependency security:
    • Run npm audit / pnpm audit / yarn audit for dependency vulnerabilities
    • Check for postinstall scripts in dependencies that could be malicious
    • Check for typosquatting risks (packages with similar names to popular ones)
    • Verify lockfile integrity (no modified integrity hashes)
  5. .gitignore audit:
    • Verify .env, .env.*, *.pem, *.key, node_modules/, .DS_Store are ignored
    • Flag any sensitive file patterns NOT in .gitignore

Phase 4: Local Codebase Security Analysis

Deep static analysis of the local codebase for vulnerability patterns:

  1. Authentication & Authorization:
    • Search for hardcoded credentials: grep -r 'password\s*[:=]\s*["\x27][^"\x27]+' --include='*.{ts,js,py,go,java}'
    • Search for JWT secret in code: grep -r 'jwt.*secret\|JWT_SECRET' --include='*.{ts,js,env}'
    • Check for missing auth middleware on routes
    • Check for verify: false or rejectUnauthorized: false in HTTPS/TLS configs
    • Check for alg: 'none' or missing algorithm enforcement in JWT verification
  2. Injection vulnerabilities:
    • SQL injection: Search for string concatenation in queries ("SELECT.*" \+ |f"SELECT|\$\{.*\}.*SELECT)
    • Command injection: Search for exec(, execSync(, child_process, os.system(, subprocess.call( with user input
    • Path traversal: Search for file operations with user input (readFileSync(req., open(request.)
    • XSS: Search for innerHTML, dangerouslySetInnerHTML, v-html, | safe, mark_safe
    • NoSQL injection: Search for $where, $gt, $ne, $regex in query objects from user input
    • LDAP injection: Search for unsanitized input in LDAP filters
    • XML/XXE: Search for XML parsing without disabling external entities
  3. Cryptography issues:
    • Search for weak hashing: md5(, sha1(, crypto.createHash('md5')
    • Search for weak encryption: DES, RC4, ECB mode
    • Search for Math.random() used for security (tokens, IDs, secrets)
    • Search for hardcoded encryption keys/IVs
  4. Data exposure:
    • Search for PII in logs: console.log.*password|logger.*email|print.*ssn
    • Search for stack traces returned to clients: res.send(err), res.json({ error: err.stack })
    • Search for overly permissive CORS: origin: '*' or origin: true
    • Search for sensitive data in URL params (passwords, tokens in GET requests)
  5. Configuration security:
    • Check for debug mode enabled in production configs
    • Check for default/example credentials in config files
    • Check for overly permissive file permissions
    • Check for missing rate limiting on authentication endpoints
    • Check for missing input validation on API endpoints
  6. Prototype pollution vectors (Node.js specific):
    • Search for Object.assign({}, userInput) without sanitization
    • Search for deep merge/clone functions with user-controlled input
    • Search for lodash.merge, lodash.set, lodash.defaultsDeep with user input

Phase 5: Report

Present findings as a severity-ranked pentest report:

Report Structure

  1. Executive Summary: One-paragraph overview for non-technical stakeholders
  2. Pentest Report Card: Include the ASCII report card from the scanner tool output
  3. Attack Surface: What was tested (URLs, endpoints, repos, local paths)
  4. Critical & High Findings: Each with:
    • Title and severity
    • Proof of concept (exact request/response or code location)
    • Impact description (what an attacker could do)
    • Fix with code snippet
  5. Medium & Low Findings: Grouped by category
  6. Recommendations: Priority-ordered action items

Severity Definitions

  • CRITICAL: Remote code execution, full database access, authentication bypass, exposed secrets with active credentials
  • HIGH: XSS, SQL injection, CORS credential theft, exposed admin panels, missing critical security headers
  • MEDIUM: CSRF, open redirect, information disclosure, missing security headers, weak TLS
  • LOW: Version disclosure, missing optional headers, minor misconfigurations

Verification Standard

Every finding MUST include:

  • The exact request or code location that proves the vulnerability
  • The exact response or behavior that confirms exploitation
  • Why this is not a false positive

If you cannot verify a finding, DO NOT include it. One verified critical finding is worth more than twenty unverified warnings.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.