Pentest

From tinh2/skills-hub-registry · View interactive version

Pentest is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Static-analysis penetration test that hunts for exploitable vulnerabilities with proof-of-concept payloads and fix code.

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Hunt for exploitable vulnerabilities methodically.

TARGET:

$ARGUMENTS

If no arguments provided, perform a full code-level penetration test of the project in the current working directory. If arguments specify a scope (e.g., "auth module", "API routes"), focus the analysis on that area.

============================================================

PHASE 0: RECONNAISSANCE

============================================================

Map the application's attack surface:

TECH STACK:

ROUTE INVENTORY:

DATA FLOW MAPPING:

Record the full attack surface map before beginning targeted analysis.

============================================================

PHASE 1: SQL / NOSQL INJECTION

============================================================

Hunt for injection points in database interactions:

SQL INJECTION:

NOSQL INJECTION:

For each finding:

============================================================

PHASE 2: CROSS-SITE SCRIPTING (XSS)

============================================================

Hunt for XSS vectors:

REFLECTED XSS:

STORED XSS:

DOM-BASED XSS:

TEMPLATE INJECTION:

For each finding:

============================================================

PHASE 3: AUTHENTICATION BYPASS

============================================================

Hunt for authentication weaknesses:

MISSING AUTH:

AUTH LOGIC FLAWS:

CREDENTIAL ATTACKS:

For each finding:

============================================================

PHASE 4: AUTHORIZATION FLAWS

============================================================

Hunt for privilege escalation:

HORIZONTAL PRIVILEGE ESCALATION:

VERTICAL PRIVILEGE ESCALATION:

MASS ASSIGNMENT:

For each finding:

============================================================

PHASE 5: PATH TRAVERSAL AND FILE INCLUSION

============================================================

Hunt for file system attacks:

PATH TRAVERSAL:

FILE UPLOAD:

LOCAL FILE INCLUSION:

For each finding:

============================================================

PHASE 6: COMMAND INJECTION

============================================================

Hunt for command injection:

DIRECT INJECTION:

INDIRECT INJECTION:

For each finding:

============================================================

PHASE 7: CSRF AND REQUEST FORGERY

============================================================

Hunt for CSRF vulnerabilities:

MISSING CSRF PROTECTION:

SSRF:

OPEN REDIRECTS:

For each finding:

============================================================

PHASE 8: SECRETS AND CREDENTIALS

============================================================

Hunt for hardcoded secrets:

PATTERNS TO SEARCH:

CHECK CONFIGURATION:

For each finding:

============================================================

PHASE 9: INSECURE DESERIALIZATION

============================================================

Hunt for deserialization attacks:

For each finding:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing the security analysis, validate thoroughness:

  1. Verify every category in the audit was actually checked (not skipped).
  2. Verify every finding has a specific file:line location.
  3. Verify severity ratings are justified by impact assessment.
  4. Verify no false positives by re-reading flagged code in context.

IF VALIDATION FAILS:

============================================================

OUTPUT

============================================================

Penetration Test Report (Code Analysis)

Project: [name]

Stack: [detected technologies]

Scope: [full project or specified scope]

Date: [date]

Executive Summary

| Category | Critical | High | Medium | Low |

|----------|----------|------|--------|-----|

| Injection (SQL/NoSQL) | N | N | N | N |

| XSS | N | N | N | N |

| Auth Bypass | N | N | N | N |

| Authorization Flaws | N | N | N | N |

| Path Traversal | N | N | N | N |

| Command Injection | N | N | N | N |

| CSRF/SSRF | N | N | N | N |

| Hardcoded Secrets | N | N | N | N |

| Insecure Deserialization | N | N | N | N |

| Total | N | N | N | N |

Findings

For each finding, in severity order:

[SEVERITY] — [Finding Title]

```

[Example exploit payload or steps]

```

```

[Code showing the remediation]

```

Attack Surface Summary

Remediation Priority

[Ordered list: Critical findings first, with effort estimates]

============================================================

NEXT STEPS

============================================================

After reviewing the pentest report:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /pentest — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

============================================================

DO NOT

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.