Skip to content

Running a pre-commit pentest

Once Vortex MCP is installed and authenticated, a pentest is five steps: check readiness, start the scan, poll its status, fetch the findings, and (optionally) cancel. You can drive each step conversationally, through the MCP tools directly, or with the plugin’s slash commands.

Make sure your app is running locally and reachable at http://host.docker.internal:PORT (not localhost — see Configuration).

Call health_check(target_url) (or /bestdefense-pentest:doctor [url]) before anything else. It confirms your token authenticates, your org is entitled for pre-commit dispatch, and the target is reachable — and starts no scan. Fix any failing check before continuing.

Call start_pentest(target_url, mode, test_profile, workdir) (or /bestdefense-pentest:scan <url> [smoke|standard|deep]). It returns a session_id you use for every later call.

start_pentest(
target_url="http://host.docker.internal:3000",
mode="standard", # smoke | standard | deep
test_profile="blackbox" # or greybox, deriving context from workdir
)

Traffic originates on your machine and only findings leave it. See Configuration for modes and profiles.

Call get_pentest_status(session_id) about once every 20–30 seconds until the status is terminal. Long scans are normal — provisioning and deep passes can take many minutes. Keep polling; don’t assume a slow scan has failed.

When the status is terminal, call get_findings(session_id, output_format) (or /bestdefense-pentest:findings <session-id>). Choose the format:

  • output_format="json" (default) — structured findings for humans and tooling.
  • output_format="sarif" — SARIF 2.1.0 for GitHub code scanning, IDEs, and CI.

Each finding carries severity, CWE, CVSS, the affected URL and parameter, and evidence.

To stop a running scan early, call cancel_pentest(session_id). It cancels the scan and tears down the local executor cleanly.

StepMCP toolSlash command
Readinesshealth_check/bestdefense-pentest:doctor [url]
Startstart_pentest/bestdefense-pentest:scan <url> [mode]
Pollget_pentest_status(driven automatically by the agent)
Findingsget_findings/bestdefense-pentest:findings <session-id>
Cancelcancel_pentest(call the tool)

smoke and standard are seat-covered — run them as often as you like. deep reserves a pre-commit credit per scan. Check remaining deep-scan credits with /bestdefense-pentest:status (secure mode) or in the app.