pentesting 0.100.4 → 0.100.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +35 -8
- package/README.md +51 -2
- package/lib/runtime.mjs +4 -10
- package/package.json +3 -3
package/ARCHITECTURE.md
CHANGED
|
@@ -27,6 +27,9 @@ stays intentionally short and usage-focused.
|
|
|
27
27
|
access (policy-based today; OS sandboxing is roadmap).
|
|
28
28
|
- **Intelligent Queuing** — Queued inputs are deduplicated and prioritized live;
|
|
29
29
|
obsolete tasks are preempted, not FIFO-replayed.
|
|
30
|
+
- **Prompt Ownership** — Prompt mode owns Enter submission. Buffered replay may
|
|
31
|
+
preserve typed-ahead input, but live terminal control responses, redraws, and
|
|
32
|
+
resize noise are not allowed to turn a normal Enter into a pasted newline.
|
|
30
33
|
- **Lab Session Multiplexing** — `shell-listener` runs multiple authorized TCP
|
|
31
34
|
sessions with per-session routing, identity tags, verified PTY upgrade state,
|
|
32
35
|
transcripts, command ledgers, replay, and orphaned evidence recovery.
|
|
@@ -66,6 +69,7 @@ Plain view:
|
|
|
66
69
|
```text
|
|
67
70
|
user input
|
|
68
71
|
-> CLI / interactive prompt loop
|
|
72
|
+
-> terminal-session prompt ownership + buffered replay boundary
|
|
69
73
|
-> BuilderAPI facade
|
|
70
74
|
-> BuilderApp classification and strategy
|
|
71
75
|
-> active agent or delegated subagent
|
|
@@ -85,6 +89,27 @@ There is no fixed persona. The runtime derives a profile per request, optionally
|
|
|
85
89
|
overlays a named autonomy profile, then reuses tool scope, phase, and memory
|
|
86
90
|
weighting.
|
|
87
91
|
|
|
92
|
+
CTF frontier exploration keeps the global `[exploration]` default off, then
|
|
93
|
+
enables the effective CTF profile when `engagement.kind = "ctf"` or a
|
|
94
|
+
`flag_format` is configured. That profile selects `ctf-competition` autonomy,
|
|
95
|
+
turns on exploration, requires verified `flag_check` evidence before completion,
|
|
96
|
+
and auto-continues the TUI loop after `/goal`. See `docs/config/ctf.toml`,
|
|
97
|
+
`docs/plans/2026/07/08/PLAN_CtfFrontierExploration_2026-07-08.md`, and the
|
|
98
|
+
decision record beside it.
|
|
99
|
+
|
|
100
|
+
The shipped design is advisor-guided, not scheduler-owned: `decide_next` is a
|
|
101
|
+
pure traversal recommendation over `EvidenceKind::Lead` events, while dispatch
|
|
102
|
+
uses the existing delegated-task fan-out. There is no detached task registry or
|
|
103
|
+
second runtime scheduler in the default implementation. Phase 10 is pinned by
|
|
104
|
+
`orch_spec::exploration_e2e`, which exercises the flag-off path and the
|
|
105
|
+
breadth/depth/pivot/reseed/merge flow without launching real subagents.
|
|
106
|
+
|
|
107
|
+
Reliability guards sit below the profile layer. Provider protocol capabilities
|
|
108
|
+
default native tool support for OpenAI/Anthropic-compatible responses on
|
|
109
|
+
registry misses, unparsed tool-shaped markup becomes retryable instead of a
|
|
110
|
+
false completion, raw control markup is scrubbed from the stream, and the
|
|
111
|
+
markdown renderer bounds very large no-newline buffers.
|
|
112
|
+
|
|
88
113
|
```mermaid
|
|
89
114
|
flowchart LR
|
|
90
115
|
R[Request] --> GEN["Derive<br/>dynamic profile"]
|
|
@@ -145,8 +170,9 @@ definition under `crates/builder_repo/src/agents/`.
|
|
|
145
170
|
## Named Autonomy Profiles
|
|
146
171
|
|
|
147
172
|
Optionally pin the top-level profile (`autonomy_profile = "ctf-competition"`);
|
|
148
|
-
leave unset for classifier-driven defaults.
|
|
149
|
-
|
|
173
|
+
leave unset for classifier-driven defaults. CTF engagement config auto-selects
|
|
174
|
+
the CTF profile when no explicit profile is set. Delegated subagent contracts
|
|
175
|
+
stay intact. Defined in `crates/builder_domain/src/autonomy_profile.rs`.
|
|
150
176
|
|
|
151
177
|
| Profile | Purpose |
|
|
152
178
|
| --- | --- |
|
|
@@ -157,9 +183,10 @@ intact. Defined in `crates/builder_domain/src/autonomy_profile.rs`.
|
|
|
157
183
|
|
|
158
184
|
## Engagement Metadata
|
|
159
185
|
|
|
160
|
-
Runs can attach typed engagement context — scope, phase, tags,
|
|
161
|
-
(PTES, MITRE ATT&CK, OWASP,
|
|
162
|
-
|
|
186
|
+
Runs can attach typed engagement context — scope, phase, tags, flag format,
|
|
187
|
+
flag-evidence requirement, and standard refs (PTES, MITRE ATT&CK, OWASP,
|
|
188
|
+
CWE/CAPEC, NIST CSF, CIS Controls) — to workflow metadata. `/workflow report`
|
|
189
|
+
exports it as a Markdown handoff.
|
|
163
190
|
|
|
164
191
|
## Memory & Knowledge
|
|
165
192
|
|
|
@@ -316,14 +343,14 @@ npm install -g pentesting
|
|
|
316
343
|
|
|
317
344
|
## Supported Runtime Targets
|
|
318
345
|
|
|
319
|
-
The npm launcher currently resolves managed native release
|
|
320
|
-
|
|
346
|
+
The npm launcher currently resolves a managed native release asset for Linux
|
|
347
|
+
x64. Other operating systems, including Apple Silicon Macs, Linux arm64,
|
|
348
|
+
Windows, and Android, can run the multi-architecture Docker image or use
|
|
321
349
|
`PENTESTING_BIN` to point at a locally built compatible binary.
|
|
322
350
|
|
|
323
351
|
| OS | CPU | Release asset |
|
|
324
352
|
| --- | --- | --- |
|
|
325
353
|
| Linux | x64 | `pentesting-x86_64-unknown-linux-musl` |
|
|
326
|
-
| Android | arm64 | `pentesting-aarch64-linux-android` |
|
|
327
354
|
|
|
328
355
|
`/update` (and the npm postinstall) resolves the matching asset for the current
|
|
329
356
|
supported OS/CPU target from `agnusdei1207/pentesting-public`.
|
package/README.md
CHANGED
|
@@ -25,10 +25,11 @@ Agent-loop essentials plus a security-focused runtime layer.
|
|
|
25
25
|
| Tool guardrails | Read-before-edit enforcement, repeat-call guard, policy-gated file/shell/network |
|
|
26
26
|
| Permissions | Allow / Deny / Confirm, with once/always decisions persisted |
|
|
27
27
|
| Context compaction | Automatic micro-pruning + model-triggered summarization, pre/post hooks |
|
|
28
|
-
| Interrupt & steering | ESC to interrupt mid-turn, queue follow-ups while it works |
|
|
28
|
+
| Interrupt & steering | ESC to interrupt mid-turn, queue follow-ups while it works, and keep Enter submissions deterministic across PTY redraw/control-response noise |
|
|
29
29
|
| Reverse-shell control plane | Accept and track multiple authorized callbacks, tag/probe sessions, send/observe/run commands, verify PTY upgrades, and keep transcript/ledger/evidence records |
|
|
30
30
|
| PTY session control | Treat upgraded shells as managed PTY sessions with resize gating, transcript capture, FD accounting, and deterministic close/revoke/gc reclamation |
|
|
31
|
-
|
|
|
31
|
+
| Frontier-guided exploration | Persistent, deduplicated lead frontier: the runtime enforces pivots and caps, and recommends breadth-first enumeration vs depth-first exploitation while the model drives |
|
|
32
|
+
| Subagents | Broad-clone delegates with category focus overlays; independent deep-specialist leads (crypto/rev/pwn) run in the same parallel batch so the main line keeps moving |
|
|
32
33
|
| MCP & skills | Dynamic MCP tool discovery, layered markdown skills |
|
|
33
34
|
| Memory | Ebbinghaus-style decaying notes + hybrid lexical/semantic/graph retrieval |
|
|
34
35
|
|
|
@@ -68,6 +69,10 @@ docker run -it --rm \
|
|
|
68
69
|
agnusdei1207/pentesting:latest
|
|
69
70
|
```
|
|
70
71
|
|
|
72
|
+
Provider environment variables are optional for startup. If they are omitted,
|
|
73
|
+
the interactive TUI still launches and lets you configure/login inside the
|
|
74
|
+
persistent `pentesting-config` volume.
|
|
75
|
+
|
|
71
76
|
Or via Docker Compose:
|
|
72
77
|
|
|
73
78
|
```bash
|
|
@@ -134,6 +139,46 @@ export PENTESTING_SKIP_DOWNLOAD=1 # skip postinstall bina
|
|
|
134
139
|
|
|
135
140
|
The TUI pre-fills output max tokens from known model names/provider metadata. `OPENAI_MAX_TOKENS` and the TUI field are explicit overrides for custom/self-hosted models.
|
|
136
141
|
|
|
142
|
+
### Frontier-guided CTF exploration
|
|
143
|
+
|
|
144
|
+
The global frontier engine default stays off, but CTF-shaped engagement config
|
|
145
|
+
auto-applies the CTF runtime profile: `ctf-competition` autonomy, runtime
|
|
146
|
+
exploration, autonomous continuation, and a completion gate that requires
|
|
147
|
+
verified `flag_check` evidence. A ready-to-copy profile lives at
|
|
148
|
+
`docs/config/ctf.toml`:
|
|
149
|
+
|
|
150
|
+
```toml
|
|
151
|
+
[engagement]
|
|
152
|
+
kind = "ctf"
|
|
153
|
+
flag_format = "flag\\{[^}]+\\}"
|
|
154
|
+
require_flag_evidence = true
|
|
155
|
+
|
|
156
|
+
[exploration]
|
|
157
|
+
enabled = true
|
|
158
|
+
max_frontier_nodes = 256
|
|
159
|
+
max_breadth = 4
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
With the profile active, the runtime stores `explore` leads as
|
|
163
|
+
`EvidenceKind::Lead` events, carries prior-run frontier/findings/verified flags
|
|
164
|
+
forward, deduplicates leads, auto-pivots dead probes, enforces graph/cap limits,
|
|
165
|
+
and injects a breadth/depth recommendation into mission control. The model still
|
|
166
|
+
drives the work through `explore` and `task`; heavy independent leads such as
|
|
167
|
+
crypto/rev/pwn ride the same parallel delegation batch rather than a detached
|
|
168
|
+
background scheduler. Operators can inspect the current graph with `/frontier`,
|
|
169
|
+
and the status row shows compact frontier progress during dispatch.
|
|
170
|
+
|
|
171
|
+
Malformed tool-call output is fail-loud: unparsed tool-shaped markup is retried
|
|
172
|
+
instead of accepted as a final answer, the TUI suppresses raw control markup, and
|
|
173
|
+
large no-newline streams are bounded so rendering cannot hang behind usage-only
|
|
174
|
+
progress ticks.
|
|
175
|
+
|
|
176
|
+
The shipped contract is covered by
|
|
177
|
+
`cargo test -p builder_app orch_spec::exploration_e2e`: it verifies the
|
|
178
|
+
flag-off regression path plus breadth enumeration, depth descent, sibling
|
|
179
|
+
breadth, dead-probe pivot, global reseed, seed digest, broad-clone overlay, and
|
|
180
|
+
child result promotion.
|
|
181
|
+
|
|
137
182
|
With Docker, mount both your project and the persistent runtime config volume, then pass the same variables through with `-e`:
|
|
138
183
|
|
|
139
184
|
```bash
|
|
@@ -148,6 +193,10 @@ docker run -it --rm \
|
|
|
148
193
|
agnusdei1207/pentesting:latest
|
|
149
194
|
```
|
|
150
195
|
|
|
196
|
+
Those variables only pre-fill provider settings. Leaving them unset must not
|
|
197
|
+
block the container from launching the TUI; configure the provider interactively
|
|
198
|
+
inside the container instead.
|
|
199
|
+
|
|
151
200
|
> **Note:** The command you run is always **`pentesting`**. The internal engine is **`builder`** — `pentesting` downloads and runs it under the hood; the engine name never surfaces in normal use.
|
|
152
201
|
|
|
153
202
|
---
|
package/lib/runtime.mjs
CHANGED
|
@@ -14,15 +14,9 @@ const MANAGED_BINARY_DIR = path.join(PACKAGE_ROOT, "vendor");
|
|
|
14
14
|
const MANAGED_BINARY_MANIFEST = path.join(MANAGED_BINARY_DIR, "pentesting-manifest.json");
|
|
15
15
|
|
|
16
16
|
const RELEASE_TARGETS = {
|
|
17
|
-
// Native binaries published as release assets. Linux uses musl (static
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// Docker image (see the Unsupported-platform error below).
|
|
21
|
-
"android:arm64": {
|
|
22
|
-
assetName: "pentesting-aarch64-linux-android",
|
|
23
|
-
binaryFileName: "builder",
|
|
24
|
-
label: "android-arm64",
|
|
25
|
-
},
|
|
17
|
+
// Native binaries published as release assets. Linux x64 uses musl (static).
|
|
18
|
+
// macOS, Windows, Linux arm64, and Android are served by the multi-arch Docker
|
|
19
|
+
// image (see the unsupported-platform error below).
|
|
26
20
|
"linux:x64": {
|
|
27
21
|
assetName: "pentesting-x86_64-unknown-linux-musl",
|
|
28
22
|
binaryFileName: "builder",
|
|
@@ -60,7 +54,7 @@ export function resolveReleaseAsset(platform = process.platform, arch = process.
|
|
|
60
54
|
throw new Error(
|
|
61
55
|
`No native pentesting binary for '${platform}/${arch}'. ` +
|
|
62
56
|
`Native targets: ${supported}. ` +
|
|
63
|
-
`On macOS/Windows run it via Docker instead: ` +
|
|
57
|
+
`On macOS/Windows/Linux arm64/Android run it via Docker instead: ` +
|
|
64
58
|
`docker run -it --rm -v "$(pwd):/workspace" -v pentesting-config:/root/.pentesting -w /workspace -e OPENAI_API_KEY -e OPENAI_BASE_URL -e OPENAI_MODEL -e OPENAI_MAX_TOKENS agnusdei1207/pentesting`,
|
|
65
59
|
);
|
|
66
60
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pentesting",
|
|
3
|
-
"version": "0.100.
|
|
4
|
-
"builderReleaseTag": "v0.100.
|
|
3
|
+
"version": "0.100.5",
|
|
4
|
+
"builderReleaseTag": "v0.100.5",
|
|
5
5
|
"description": "pentesting — coding agent runtime with audited reverse-shell capture, verified PTY session upgrades, pivot control, evidence transcripts, and safe session reclamation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "agnusdei1207",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"public:sync": "bash scripts/sync-public-repo.sh",
|
|
73
73
|
"public:mirror-release": "bash scripts/mirror-public-release.sh",
|
|
74
74
|
"release:backfill": "bash scripts/backfill-release-local.sh",
|
|
75
|
-
"check:docker": "
|
|
75
|
+
"check:docker": "npm run docker:build && docker run -it --rm -v builder-workspace:/workspace -v pentesting-config:/root/.pentesting -e OPENAI_API_KEY -e OPENAI_BASE_URL -e OPENAI_MODEL -e OPENAI_MAX_TOKENS agnusdei1207/pentesting:latest",
|
|
76
76
|
"docker:build": "(docker image inspect agnusdei1207/pentesting-build-base:1.96 >/dev/null 2>&1 && docker image inspect agnusdei1207/pentesting-runtime-base:26.04 >/dev/null 2>&1 || npm run docker:base:build) && docker build --build-arg APP_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo dev) -t agnusdei1207/pentesting:latest .",
|
|
77
77
|
"docker:base:build": "docker build -t agnusdei1207/pentesting-build-base:1.96 -f docker/build-base.Dockerfile . && docker build -t agnusdei1207/pentesting-runtime-base:26.04 -f docker/runtime-base.Dockerfile .",
|
|
78
78
|
"release:patch": "./scripts/release-all.sh patch",
|