Skip to content
Back to skills

Pentest

ASecurity

Penetration test of the user''s own running app on localhost or a named staging server: real requests, evidence for every finding, each confirmed hole becomes a failing regression test before it is fixed. Only when the user asks.

  • 3 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added November 26, 2026
securitygoshellsqlnodetestinggitdatabasesecurity

Works with

  • cli

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add Rasimoghlu/sarkhans-claude-starter --skill pentest --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pentest?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pentest
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rasimoghlu-pentest-sarkhans-claude-starter/badge)](https://www.skillsdirectory.com/skills/rasimoghlu-pentest-sarkhans-claude-starter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pentest
description: 'Penetration test of the user''s own running app on localhost or a named staging server: real requests, evidence for every finding, each confirmed hole becomes a failing regression test before it is fixed. Only when the user asks.'
argument-hint: "[address of your running app, e.g. http://localhost:3000]"
disable-model-invocation: true
---
# Pentest

Target: $ARGUMENTS

You are testing the user's own application the way an attacker would, to find holes before someone else does. This is real testing with real requests, not a code read (that is `/sarkhans-starter:security-audit`). Everything you report must be something you actually saw happen.

## Ground rules (never break these)
- Only the user's own app, running on this computer or on a test server whose name says so (staging, dev, test, qa, preview, sandbox). Never production, never third-party services, never other people's hosts. A hook enforces the scope; never work around it.
- No denial of service: at most about 5 requests per second, no load or stress tests, no fuzzing runs longer than a few hundred requests.
- Nothing destructive: use test accounts and test data you created. Don't delete, overwrite or change data you didn't create in this session. Never touch real users' data.
- Stop at proof. One minimal request that shows the problem is enough. Never pivot further, never keep access, never use a found hole to reach something else.
- If you see a secret (key, token, password, connection string), write down where it was exposed and that it was a secret. Never copy its value into the report or the chat.
- Don't install tools. Use what's installed; say what you skipped because a tool is missing.

## 1. Agree on the scope
1. If no address was given, ask for it. Ask whether this is the user's own app and environment, and for two test accounts with different roles (for example a normal user and an admin), or permission to create them. Without two accounts, mark the authorization checks as not tested.
2. Start the scope with the exact address the user gave:
   `node ${CLAUDE_PLUGIN_ROOT}/scripts/pentest-scope.mjs start <address> --project "${CLAUDE_PROJECT_DIR}"`
   Add `--staging` only when the user named a staging server. If the script refuses, stop and explain why; don't try another way.
3. Check the app answers: `curl -s -o /dev/null -w '%{http_code}\n' <address>`. If not, ask the user to start it.

## 2. Map the attack surface from the code
Read the routes, not a scanner's guesses. For every endpoint or page note: method and path, whether it needs login, which role, which IDs or parameters it takes, and whether it reads files, fetches URLs, redirects, uploads, sends email, or runs shell commands.
Write the plan into `reports/pentest-<YYYY-MM-DD>.md` as a table: endpoint · checks planned · accounts needed. Show the user the plan in a few lines before you start sending requests.

## 3. Run the checks
Send real requests with curl or the project's own HTTP client. For each check, decide pass or fail from the response, not from the code.

| Area | What to send | It's a hole when |
|---|---|---|
| Authentication | every protected endpoint with no session, an expired session, a tampered token (and `alg: none` for JWT) | anything other than 401/403/redirect to login |
| Authorization (IDOR) | user A's session on user B's objects: read, change, delete (B's test objects only) | A can read or change B's data |
| Privilege | normal user on admin endpoints and actions | not refused |
| Mass assignment | extra fields on create/update: `role`, `isAdmin`, `ownerId`, `price`, `verified` | the field is stored (read it back) |
| SQL / NoSQL injection | `'`, `"`, `1 OR 1=1`, `{"$ne": null}` in parameters that reach the database; time-based only with a sleep of 2 seconds or less | database errors, different results for always-true input, or the delay |
| Command / template injection | `;id`, `$(id)`, `{{7*7}}` only in parameters that the code passes to a shell or a template | command output or `49` in the response |
| XSS | a harmless marker such as `<svg data-pentest="1">` in fields that are shown back | the marker comes back unescaped in HTML |
| Path traversal | `../` sequences in file or path parameters | a file outside the intended folder is returned |
| SSRF | URL parameters pointing to `http://127.0.0.1:<port>` and `http://169.254.169.254/` | the server fetches it (content, timing or error shows it) |
| Open redirect | `next`, `returnTo`, `redirect` parameters with an outside URL | the response redirects there |
| CSRF | a state-changing request with the session cookie but no CSRF token, from another Origin | it succeeds |
| Rate limiting | up to 30 wrong logins / reset requests on a test account | no 429, lockout or slowdown |
| Uploads | wrong type with an image name, oversized file, `../` in the name | accepted or stored as sent |
| Errors | bad input on several endpoints | stack traces, SQL, file paths or framework debug pages |
| Headers, CORS, cookies | `curl -sI`, a request with `Origin: https://evil.example` | missing CSP / frame-ancestors / nosniff (HSTS on https), CORS that echoes any Origin with credentials, session cookies without HttpOnly / Secure / SameSite |

When installed, also run against the scope only: `npm audit` / `pnpm audit` / `pip-audit` / `govulncheck ./...` / `composer audit`, `gitleaks` for secrets, `semgrep --config auto`, OWASP ZAP baseline or `nuclei -u <address>`. Treat their output as leads: confirm each one with a request before calling it a finding.

## 4. Evidence
A finding is **Confirmed** only when you reproduced it twice and saved the exact request (with tokens shortened to their first 6 characters) and the part of the response that proves it. Everything else is **Suspected** (looks wrong, not proven) or **Not exploitable** (tried, it held). Never upgrade a finding without proof. Never invent a response.

## 5. Turn each confirmed hole into a test
For every Confirmed finding, write a regression test in the project's own test framework (supertest/Playwright, `httptest`, pytest client, Laravel feature test, …) that sends the attacking request and expects the safe result. Run it and show that it fails now.
Then stop and ask the user before fixing: fixes change behaviour. After the user agrees, fix the cause, run the test until it passes, and run `/sarkhans-starter:verify`.

## 6. Report and close
1. End the scope: `node ${CLAUDE_PLUGIN_ROOT}/scripts/pentest-scope.mjs end --project "${CLAUDE_PROJECT_DIR}"`.
2. Finish `reports/pentest-<YYYY-MM-DD>.md`:
   - scope, date, accounts used, tools used and skipped;
   - findings table: # · severity (Critical / High / Medium / Low) · area · endpoint · evidence · regression test file · status (open / fixed);
   - not tested, with the reason (no second account, tool missing, endpoint unreachable).
3. End the reply with the Third eye section: Confirmed findings as "Found, not fixed" or "Found & fixed", Suspected ones and everything not tested as "Not verified".

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.