Run an authorised network test inside a scope file, keep a run record a gate can check, and hand confirmed findings to vuln-intake. The powersuit ships the controls around a scanner and never a scanner: a scope file that names who authorised the test in writing, without which nothing runs, a run record with the backend, its version, the model, the scope hash, the end state and the findings with evidence, a gate that fails a timed-out or out-of-scope run, and a backend-validation step against ...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pentest?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/uncovertechtalent-pentest)
---
name: pentest
description: >
Run an authorised network test inside a scope file, keep a run record a gate
can check, and hand confirmed findings to vuln-intake. The powersuit ships the
controls around a scanner and never a scanner: a scope file that names who
authorised the test in writing, without which nothing runs, a run record with
the backend, its version, the model, the scope hash, the end state and the
findings with evidence, a gate that fails a timed-out or out-of-scope run, and
a backend-validation step against a baseline the team supplies. Four backends
behind one interface: a deterministic one (nmap and nuclei, no model), and
three experimental agentic adapters, ARTEX (an isolated server driven by its
HTTP API), Strix (its headless command line in its Docker sandbox) and PentAGI
(a server driven by its REST API), each with the model on a local box or a
rented GPU you control. For systems you own or are authorised in writing to
test. Use before a pentest, to record one, or to turn its findings into dated
tickets. Activates on "/pentest", "scope a pentest", "run an authorised scan",
"turn pentest findings into tickets", "is this scan in scope", "validate the
scanner".
user-invocable: true
---
# Pentest
A network test that nobody authorised, or whose result nobody can check, is not evidence; it is a liability. This skill is the controls around a scanner, so a test runs only inside a written authorisation and leaves a record a gate can read. **It ships no scanner and installs nothing.** You bring the scanner; the powersuit provides the scope file, the run record, the gate, the hand-over, and the validation step.
**Only for systems you own or are authorised in writing to test.** The scope file is the control that makes a run a defender testing their own estate. The same scanner in other hands is an attack tool; the line between the two is the authorisation in the scope file, not the software.
Scripts next to this file, Python 3.9+, standard library only: `pentest.py` (the commands below), `backend_tools.py` (the deterministic backend), `backend_artex.py` (the ARTEX adapter), `backend_strix.py` (the Strix adapter), `backend_pentagi.py` (the PentAGI adapter), `backend_common.py` (the model route and the helpers the backends share). The gate check is `checks/pentest_runs.py` in the module.
## The eight parts
1. **Scope file** (`security/pentest/scope.json`, from `templates/security/pentest/scope.json`). Owner, the named person who authorised the test in writing with the reference to it, the targets, the exclusions, a time window, and a noise level. Private address ranges pass by default; a public address or host name needs `proof_of_control` stated in the file. Validate it before anything else:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" check-scope security/pentest/scope.json
```
A target the run requests that lies outside the scope is refused before any backend is called.
2. **Run record** (`security/pentest/runs/<run id>.json`, schema `templates/security/pentest/run.schema.json`). The backend name, its version and commit, the model and its route, the sha256 of the scope file at the start and the end of the run, the window, the budget, the end state (complete, timeout, aborted), the assets found, and the findings, each with a severity and its evidence.
3. **Gate check** `security.pentest-runs`. It fails when the newest run of a scope timed out or was aborted, when a finding lacks evidence or a severity, when an asset or finding lies outside the scope, when the record names no scope targets, when the scope file changed during the run, or when the run started or finished outside the scope's window (checked when the record carries both run times and the window). The newest run of each scope must have ended complete: **a timed-out run is never a clean result.**
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" gate security/pentest/runs
```
Install it in the deploy gate like the other security checks (module README, "Enable them"): copy `checks/pentest_runs.py` into the gate's rules and add `"security.pentest-runs": {"tier": "warn"}`. It runs on `warn` without its fixtures; copy them before you move it to `block`, because `gate.rule-fixtures` runs every blocking rule against its pass and fail fixtures.
4. **Hand-over to `vuln-intake`.** Confirmed findings become ticket drafts with fix-by dates through the existing `intake.py` path. It refuses a record with integrity problems (a changed scope, a target out of scope, a finding without evidence, a run outside its window); a run that did not complete still hands over its confirmed findings, with a warning. It creates nothing without the user's go, like that skill.
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" handover security/pentest/runs/<run id>.json \
--policy docs/security/vuln-policy.md --existing security-issues.json
```
The ticket carries the host and port, the severity and the fix-by date, never the exploit path; the evidence stays in the run record. Then follow `/security:vuln-intake` to create the tickets.
5. **Backend validation.** A backend counts as trusted for a team only after one complete run has reproduced a baseline of known findings the team supplies (`templates/security/pentest/baseline.json`). The result is written next to the run record as `<run id>.validation.json` (found, missed), and a later run of the same backend, version and model is then marked `trusted` in its record.
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" validate security/pentest/runs/<run id>.json \
--baseline security/pentest/baseline.json
```
Until a backend is validated, treat its findings as leads and confirm each one by hand before a ticket is created.
6. **Backends behind one interface.**
- **Deterministic, first (`tools`).** Drives `nmap` and `nuclei` when both are on `PATH`, with no model involved. It detects their absence and says so; `--discovery-only` runs nmap alone. nuclei runs with its update check off and its out-of-band interaction server off, so no traffic goes to a third party. An open port whose number in nmap's output is not 1 to 65535 is left out and counted in the record's notes.
- **ARTEX adapter, experimental (`artex`).** Talks to an ARTEX server's HTTP API only (login, health, create task, add scope, poll, report, findings). It refuses to start a task unless the health call reports isolated mode. The model that drives it defaults to a local one; see the next section. Every record it writes carries `experimental: true`; a later release of this module clears it once the adapter has reproduced a team's manual baseline on a second ARTEX run, which the validation step records.
- **Strix adapter, experimental (`strix`).** Runs the Strix command line headless (`strix -n`), one `--target` per address or host name, and reads the run's status and findings from the files Strix writes. Strix runs its agents' commands in a Docker sandbox. The adapter refuses to start unless the Docker daemon answers and the sandbox image you name with `--strix-image` is already on the machine (it pulls nothing); it refuses the host network and a network or wildcard target, because Strix would read a network as a web address. Strix starts in an empty folder, with an empty settings file, an empty MCP server list, telemetry, the update check and LiteLLM's price-list download off, and an environment built from an allowlist, so no web-search key, trace exporter, second model, MCP connection or settings file comes along. The model is the one you name with `--strix-model` and `--strix-model-url`. A finding counts as confirmed only when Strix rates its confidence high. Every record it writes carries `experimental: true`, like ARTEX's.
- **PentAGI adapter, experimental (`pentagi`).** Talks to a PentAGI server's REST API only (settings, flows, providers, create flow, poll the flow and its tasks, finish), with an API token from `PENTAGI_TOKEN`. It refuses to start unless the server reports `docker_inside` false and no other flow runs, and unless you pass `--pentagi-egress-checked` to state that the server's embedding, search, tracing, fallback and update settings are off or on the estate, which the API does not report. PentAGI reports no model endpoint either, so you state the URL its provider uses with `--pentagi-model-url`; it is classified like the others and recorded as stated. PentAGI returns its results as text: the flow's input asks for a `pentest-findings` block at the end of its report, and a run without a readable block is recorded `aborted`. Every record it writes carries `experimental: true`.
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" backends # what each backend is missing
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" run security/pentest/scope.json \
--backend tools --confirm <scope name> --seconds 3600
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" run security/pentest/scope.json \
--backend strix --confirm <scope name> --target <address or host name> --seconds 14400 --strix-scan-mode quick \
--strix-model openai/<model> --strix-model-url http://127.0.0.1:11434/v1 --strix-image <sandbox image>
python3 "${CLAUDE_PLUGIN_ROOT}/skills/pentest/pentest.py" run security/pentest/scope.json \
--backend pentagi --confirm <scope name> --target <address or host name> --seconds 14400 --pentagi-url https://<pentagi server> \
--pentagi-model-url <the model URL its provider uses> --pentagi-egress-checked
```
An agentic run on a local model takes hours, not minutes, and a run that reaches its budget fails the gate: give it a long budget, one target per run, and Strix's `quick` mode first.
`--confirm <scope name>` is the user's go for the run, typed after they have read the scope. The budget, plus the time a backend needs to stop (60 s for Strix and PentAGI), must fit inside the window; after the pre-flight the budget is cut, if needed, so the run still ends inside the window. The run writes the record, runs the gate on it, and exits non-zero when the run did not complete cleanly.
7. **Tests.** `plugins/security/tests/test_security.py` runs the pentest cases: scope validation and matching, every refusal before a backend is called, the deterministic backend against fake nmap and nuclei on `PATH` (arguments, exclusions, noise, a missing tool, a timeout, an out-of-scope answer), the ARTEX adapter against a local fake server (pre-flight order and refusals, the scope entries with exclusions cut out, the model routes, a timeout, no password or token in any output), the Strix adapter against a fake `strix` and `docker` on `PATH` (the command line, the empty settings and MCP files, the environment allowlist, the refusals, the model routes, the window with the time Strix needs to stop, a timeout, an unclean end, a finding out of scope, no key in any output), the PentAGI adapter against a local fake server (pre-flight order and refusals, the findings block, a timeout that stops and finishes the flow, a task waiting for input, a failed flow, an asset out of scope, no token in any output), the hand-over, and the validation. No test touches a network target off the loopback interface.
8. **Docs.** This file, the module README and manifest, the CHANGELOG, and the German README.
## The model that drives an agentic backend
An agentic scanner like ARTEX, Strix or PentAGI is driven by a language model. The model sees the targets and the findings, so **where the model runs decides who else sees the test.** Each agentic adapter classifies the model's endpoint into three routes and records it, with the same rule (`backend_common.py`): ARTEX by the base URL of the server's LLM profile, Strix by `--strix-model-url`, PentAGI by `--pentagi-model-url`, which you state because PentAGI reports no endpoint. A Strix model with no URL is reached through its provider's own API, and a `chatgpt/` model always goes to that provider, so both count as remote.
- **local**: the model runs on your estate (a private address or loopback). The default, and the way findings stay on the estate.
- **rented**: the model runs on a GPU host you declare in the scope's `model_hosts` and control yourself: a box you rent by the hour and run your own model image on, reached the same way as a local model server (an OpenAI-compatible endpoint such as Ollama or llama.cpp's server, pointed at by its URL). You control it, so the test's traffic and its findings stay with you; it runs without `--allow-remote-model`. Each `model_hosts` entry off the estate carries a note of what the host is and who controls it.
- **remote**: a third-party model API that is neither local nor a declared `model_hosts` host. The test's traffic and findings would go to a third party, so it is refused unless the owner agrees and you pass `--allow-remote-model`.
This is the arrangement for running a self-hosted or abliterated open-weight model as the scanner's driver: run it on a box you own or a GPU you rent, declare that host in the scope, and the findings never leave your control. The scope file stays the authorisation; the model host decides the data path.
## ARTEX notes
ARTEX is a third party's agentic pentest tool under the AGPL. **No ARTEX code, prompt or template is in this repository.** The adapter is written from the behaviour of the API as observed on one deployment, and it reads every response defensively. An agentic scanner is dual-use: the same tool serves an attacker and a defender, and the control that makes this adapter a defender's is the scope file and the written authorisation it records, nothing in the tool itself. The adapter never installs, deploys or configures ARTEX, and it never handles an ARTEX admin password beyond reading `ARTEX_PASSWORD` from the environment to log in; the password and token are never printed or recorded.
The scope's noise level reaches an `artex` run as an instruction in the task goal, not as an enforced rate limit: this adapter does not set the server's own noise setting, so the record stores the level as requested and notes that the adapter did not enforce it. The deterministic backend does enforce it, through nmap's timing template and nuclei's rate limit.
The adapter refuses to create a task when the server's health call does not report `isolated` mode (its agent processes could otherwise reach the server's own keys), when another task is active, and when the LLM profile points off the estate and the host is not a declared `model_hosts` entry. It refuses a redirect too, so the token never moves on to another address and a redirected health answer cannot pass the isolation check. A port the server lists that is not a number from 1 to 65535 is left out of the record. A task that times out is recorded with state `timeout` and fails the gate.
## Strix notes
Strix is a third party's agentic pentest tool under the Apache-2.0 licence. **No Strix code, prompt or skill is in this repository.** The adapter is written from Strix's documented command line and the files a headless run writes, as read in its repository at v1.7.1, and it reads every file defensively. It never installs, updates or configures Strix, never pulls its sandbox image, and never handles a model key beyond passing `LLM_API_KEY` to the Strix process; the key is never printed or recorded. Strix keeps your home folder, which the Docker client needs to find its daemon; anything else Strix or LiteLLM reads there is not replaced by the adapter. Run the provenance check of this module (`/security:supply-chain`) on Strix before you install it, and install the `strix-agent` package at a pinned version rather than a release archive.
Strix enforces no scope. The targets reach its model as a list in its prompt, and that prompt calls the list a starting scope, not a ceiling. The adapter puts the scope, the exclusions and the authorisation into the instruction, and every finding stays in the record, so a finding outside the scope fails the gate. A request that never became a finding is not in the record: for a hard boundary, run the sandbox on a Docker network whose egress reaches only the targets (`--strix-network`). Strix gives the sandbox the name `host.docker.internal` for the machine it runs on, so keep services you do not want tested off the interfaces the sandbox can reach. Strix keeps no asset list, so a `strix` record has no assets. When a finding's `target` and its `endpoint` name different hosts, the record keeps the one outside the scope.
The noise level reaches a `strix` run as an instruction only. A run Strix stopped at a cost or turn limit (status `stopped`) is recorded `aborted`. A run that reaches the time budget is interrupted, given 60 seconds to remove its sandbox, then killed, and recorded `timeout`; after any run, the record names a leftover sandbox container by its `strix-run-id` label. Strix's own findings file is stored beside the record as `findings.jsonl`, never as a `.json` file, which the gate would read as a run record.
## PentAGI notes
PentAGI is a third party's agentic pentest system under the MIT licence, with an end-user licence agreement (`EULA.md`) on top that grants a revocable licence for lawful penetration testing only. **No PentAGI code, prompt or template is in this repository.** The adapter is written from the server's published API description and its flow controller, as read in its repository at v2.2.0, and it reads every answer defensively. It never installs, deploys or configures PentAGI and never handles a password: it reads an API token from `PENTAGI_TOKEN` (the server issues tokens only after its `COOKIE_SIGNING_SALT` is changed from the default), and the token is never printed or recorded. Run the provenance check of this module on PentAGI before you deploy it.
What the API cannot show, you state, and the record says so:
- The model endpoint, with `--pentagi-model-url`: PentAGI's provider list carries no URL. Set `LLM_FALLBACK_PROVIDER` empty on the server, or a failed call can go to a second provider.
- The server's other outbound paths, with `--pentagi-egress-checked`. By default PentAGI embeds with OpenAI (`EMBEDDING_PROVIDER`, `EMBEDDING_URL`), searches DuckDuckGo (`DUCKDUCKGO_ENABLED`), and reports a usage summary to its vendor every 3 hours (`UPDATE_CHECK_INTERVAL=0` turns it off); `LANGFUSE_BASE_URL` and `OTEL_HOST` send traces. Turn each off or point it at the estate before you pass the flag.
PentAGI enforces no scope: the targets reach its agents as text in the flow's input. Keep its worker containers off the host network (`DOCKER_NETWORK`) and on a network whose egress reaches only the targets. A flow whose task waits for a person's input (the server's `ASK_USER` setting) cannot be answered by an unattended run and is recorded `aborted`. A flow that reaches the time budget is stopped, then finished, and recorded `timeout`; every flow is finished at the end, which releases its worker containers. No call waits past the budget, and the stop, the last read and the finish share the 60 s the window reserves. The server knows no budget of its own: it holds only while the adapter runs. An interrupted adapter (Ctrl-C) still stops and finishes the flow and writes the record as `aborted`; if the adapter is killed outright, stop and finish the flow on the server yourself. The adapter reads exactly one findings block: with two or more (a target's own text, quoted in a report, can carry one) none is trusted and the run is `aborted`. A redirect is refused, so the token never travels on to another address. Findings and assets come from the block the flow writes, so they are the flow's own account: confirm each one by hand until the backend has reproduced your baseline.
## Rules
- Nothing runs without a valid scope file and the user's `--confirm`.
- A target outside the scope is refused before any backend is called. An asset or finding that comes back outside the scope stays in the record, so the gate fails on it; it is never silently dropped.
- A timed-out or aborted run is never a clean result and never validates a backend.
- Confirm findings by hand until the backend has reproduced the team's baseline.
- Create tickets only through `/security:vuln-intake`, with the user's go. No exploit detail in a ticket.
- Install no scanner and no model; detect what is present and say what is missing.
## Check the scripts
`python3 "${CLAUDE_PLUGIN_ROOT}/tests/test_security.py"` runs the pentest cases next to the rest of the module. Every line must read `ok`.
## Overlay
This skill works on the generic defaults in this file. Before you start, check for a private overlay:
```bash
[ -n "$POWERSUIT_OVERLAY" ] && ls -1 "$POWERSUIT_OVERLAY/security" 2>/dev/null || true
```
If `$POWERSUIT_OVERLAY/security/` exists, read its `README.md` first, then the files in `security/pentest/` if that folder exists (your scope files, your baselines, your validated backends and model hosts). Read other overlay files only when that README or this skill names them. Where the overlay and this file disagree, follow the overlay. If the variable is unset or the folder is missing, use the defaults and do not ask for an overlay. If the permission settings block the command, use the defaults and say in your output that the overlay was not checked. Never copy overlay content into this plugin, into its templates or into any public repository.