Skip to main content

/kosuke:web-pentest

/kosuke:web-pentest checks your project's own app for security holes. The agent reads the source first, then tries each suspected hole against the running Preview with one careful request. You get a report of real vulnerabilities, each with a severity, the file and line, a proof and a fix. It changes no code.

When to use it​

Run it before a release, or after a change to sign-in, permissions, payments or file uploads.

  • The agent proves findings against the session's Preview, so start it first. Without a running Preview, findings stay code-review-only. See Preview and sandboxes.
  • The report arrives as the agent's reply in the chat.

Run it​

Type /kosuke:web-pentest, or $kosuke:web-pentest in a Codex session.

ArgumentWhat it doesDefault
Focus area or scope noteWhere to start, such as one feature or one set of routes. The report still lists what it skipped.The whole app
/kosuke:web-pentest
/kosuke:web-pentest the billing API
/kosuke:web-pentest only the public share links

What it does​

  1. It maps the app's entry points and every place user input reaches a query, a command, a file path, an outbound request or a page. It writes a short threat model.
  2. It checks the code for each category in the table below.
  3. It tries each finding against the Preview with one request. It signs in as whichever user the attack needs, such as a second user for an access test, and shows the attack working.
  4. When it cannot reproduce a finding, it marks the finding code-review-only and gives the exploit path as the proof.
  5. It drops any finding without a source location, a proof, real impact, or a place in scope.
  6. It posts the report.
CategoryWhat it looks for
InjectionSQL, shell commands, templates or file paths built from user input
Broken access control and IDORReading or changing another user's record by changing an ID
Authentication and sessionWeak sessions, token checks, password reset and cookie settings
SSRFThe server fetching a URL an attacker chooses
XSS and CSRFUser input rendered as HTML, and actions a forged request can trigger
Secrets and misconfigurationHardcoded secrets, open CORS, missing security headers, leaky errors
Business logicPrice tampering, skipped steps, races on credits or limits
Deserialization and file uploadUntrusted data unpacked as objects, uploads with no type or path limits

What you get​

One report in the reply. It has a summary with counts by severity, the threat model, the findings from most to least severe, and the categories it covered and did not cover. It says which findings it proved against the Preview and which are code-review-only.

FieldWhat it holds
TitleWhat the hole is
SeverityCritical, High, Medium, Low or Info
CWEThe standard ID for this kind of weakness
LocationThe file and line
DescriptionWhat the flaw is and how it works
ProofThe request and response, or the exploit path, with secrets hidden
ImpactWhat an attacker gains
RemediationThe fix, pointing at the code

Severity weighs impact against how easy the attack is. A problem with no way to exploit it is Info.

To fix a finding, ask the agent in a message. The fix is a separate task, because this skill only audits.

Limits​

  • It changes no code, migrations or configuration.
  • It runs nothing destructive or noisy. There are no data-deleting payloads, no denial of service, no password guessing and no mass fuzzing.
  • It touches only your app's own source and Preview. Other hosts, tenants, users' data and outside services stay out of scope.
  • It never prints a full secret. It names the file and line instead.

Next steps​