pentesting 0.100.7 → 0.100.10
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 +49 -43
- package/README.md +71 -90
- package/lib/runtime.mjs +2 -2
- package/package.json +2 -2
package/ARCHITECTURE.md
CHANGED
|
@@ -54,11 +54,11 @@ bound expensive operations.
|
|
|
54
54
|
- **One Security Surface** — Session, process, finding, flag verification, and
|
|
55
55
|
frontier operations are ordinary tools. Engagement context, permission,
|
|
56
56
|
resource budget, and proof remain separate responsibilities.
|
|
57
|
-
- **Prompt Ownership** — Prompt mode owns Enter submission. Buffered replay may
|
|
58
|
-
preserve typed-ahead input, but live terminal control responses, redraws, and
|
|
59
|
-
resize noise are not allowed to turn a normal Enter into a pasted newline.
|
|
60
|
-
Modal return restores the transcript scroll region and its pre-modal saved
|
|
61
|
-
cursor before the fixed bottom UI is redrawn.
|
|
57
|
+
- **Prompt Ownership** — Prompt mode owns Enter submission. Buffered replay may
|
|
58
|
+
preserve typed-ahead input, but live terminal control responses, redraws, and
|
|
59
|
+
resize noise are not allowed to turn a normal Enter into a pasted newline.
|
|
60
|
+
Modal return restores the transcript scroll region and its pre-modal saved
|
|
61
|
+
cursor before the fixed bottom UI is redrawn.
|
|
62
62
|
- **Lab Session Multiplexing** — `shell-listener` runs multiple authorized TCP,
|
|
63
63
|
local PTY, and local pipe sessions. A single actor exclusively owns each
|
|
64
64
|
session's descriptors, command queue, transcript, raw log, and child
|
|
@@ -130,12 +130,11 @@ request hot path. Explicit event metadata is routed deterministically; absent
|
|
|
130
130
|
metadata receives one general strategy. Named profiles may add context, but
|
|
131
131
|
coarse labels do not authorize or reject tool calls.
|
|
132
132
|
|
|
133
|
-
CTF engagement metadata may select `ctf-competition` prompt context, and
|
|
134
|
-
`flag_check` remains a verification tool and evidence source rather than a
|
|
135
|
-
default completion gate. `explore` is always available; `[exploration]` only
|
|
136
|
-
sets node and fan-out caps.
|
|
137
|
-
|
|
138
|
-
decision record beside it.
|
|
133
|
+
CTF engagement metadata may select `ctf-competition` prompt context, and
|
|
134
|
+
`flag_check` remains a verification tool and evidence source rather than a
|
|
135
|
+
default completion gate. `explore` is always available; `[exploration]` only
|
|
136
|
+
sets node and fan-out caps. Installed users edit the relevant engagement, flag,
|
|
137
|
+
and frontier fields through `/config`.
|
|
139
138
|
|
|
140
139
|
The shipped exploration tool does not replace the core execution strategy.
|
|
141
140
|
It provides a bounded `EvidenceKind::Lead` ledger and explicit dispatch. Stable
|
|
@@ -180,13 +179,16 @@ flowchart TD
|
|
|
180
179
|
The core agent team is domain-neutral. Each agent ships as a markdown persona
|
|
181
180
|
definition under `crates/builder_repo/src/agents/`.
|
|
182
181
|
|
|
183
|
-
Subagents are
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
182
|
+
Subagents are explicit and bounded. A `task` call selects one agent; its tasks
|
|
183
|
+
run concurrently up to four per call and delegation stops at depth two.
|
|
184
|
+
Separate top-level tool calls are sequenced. Built-ins include `crypto`, `rev`,
|
|
185
|
+
and `pwn`.
|
|
186
|
+
|
|
187
|
+
`explore dispatch` is a separate path. It runs selected leads as `builder`
|
|
188
|
+
clones with category overlays, defaults to breadth one, is hard-capped at four,
|
|
189
|
+
and waits for the batch. It does not auto-route leads to specialist personas.
|
|
190
|
+
Every child uses the same tool/policy gateway, budget, lineage, and evidence
|
|
191
|
+
merge contracts.
|
|
190
192
|
|
|
191
193
|
| Agent | Default role | Runtime profile |
|
|
192
194
|
| --- | --- | --- |
|
|
@@ -207,11 +209,11 @@ child conversations, specialist agents, or frontier fan-out.
|
|
|
207
209
|
|
|
208
210
|
## Named Autonomy Profiles
|
|
209
211
|
|
|
210
|
-
Optionally pin the top-level profile (`autonomy_profile = "ctf-competition"`);
|
|
211
|
-
leave unset for the deterministic general default. CTF engagement config may
|
|
212
|
-
select CTF prompt context when no explicit profile is set, but it never changes
|
|
213
|
-
tool reachability. Delegated subagent contracts stay intact. Defined in
|
|
214
|
-
`crates/builder_domain/src/autonomy_profile.rs`.
|
|
212
|
+
Optionally pin the top-level profile (`autonomy_profile = "ctf-competition"`);
|
|
213
|
+
leave unset for the deterministic general default. CTF engagement config may
|
|
214
|
+
select CTF prompt context when no explicit profile is set, but it never changes
|
|
215
|
+
tool reachability. Delegated subagent contracts stay intact. Defined in
|
|
216
|
+
`crates/builder_domain/src/autonomy_profile.rs`.
|
|
215
217
|
|
|
216
218
|
| Profile | Purpose |
|
|
217
219
|
| --- | --- |
|
|
@@ -401,11 +403,11 @@ npm install -g pentesting
|
|
|
401
403
|
|
|
402
404
|
## Supported Runtime Targets
|
|
403
405
|
|
|
404
|
-
The npm launcher currently resolves a managed native release asset for Linux
|
|
405
|
-
x64. Docker is the recommended runtime on Windows and macOS. Published Docker
|
|
406
|
-
images support `linux/amd64` only; Apple Silicon Macs use Docker Desktop's amd64
|
|
407
|
-
emulation. Native ARM64 images and binaries are not supported. Advanced users
|
|
408
|
-
may set `PENTESTING_BIN` to a locally supplied compatible binary.
|
|
406
|
+
The npm launcher currently resolves a managed native release asset for Linux
|
|
407
|
+
x64. Docker is the recommended runtime on Windows and macOS. Published Docker
|
|
408
|
+
images support `linux/amd64` only; Apple Silicon Macs use Docker Desktop's amd64
|
|
409
|
+
emulation. Native ARM64 images and binaries are not supported. Advanced users
|
|
410
|
+
may set `PENTESTING_BIN` to a locally supplied compatible binary.
|
|
409
411
|
|
|
410
412
|
| OS | CPU | Release asset |
|
|
411
413
|
| --- | --- | --- |
|
|
@@ -421,7 +423,8 @@ through resource-capped Docker wrappers. Host Cargo is not an emergency
|
|
|
421
423
|
fallback. `dbuild.sh` owns individual Cargo commands, `dverify.sh` owns
|
|
422
424
|
sequential gate profiles, and `dbuild-image.sh` owns BuildKit. Each path shares
|
|
423
425
|
storage admission, effective-limit inspection, a machine-wide lock, watchdogs,
|
|
424
|
-
and structured failure reports. CI
|
|
426
|
+
and structured failure reports. Automated CI/CD is disabled; maintainers invoke
|
|
427
|
+
these wrappers explicitly. The
|
|
425
428
|
normative contract is [Docker-only build safety](https://github.com/agnusdei1207/pentesting/blob/main/docs/BUILD_SAFETY.md).
|
|
426
429
|
|
|
427
430
|
The measured next-stage simplification and deletion plan is indexed at
|
|
@@ -436,9 +439,9 @@ overridden by project-local `.pentesting.toml` files discovered by walking up
|
|
|
436
439
|
from the working directory. Local storage is the default; normal setup only
|
|
437
440
|
needs the public model endpoint environment.
|
|
438
441
|
|
|
439
|
-
The
|
|
440
|
-
|
|
441
|
-
config directory.
|
|
442
|
+
The full file shape is represented in `builder.schema.json`; common runtime and
|
|
443
|
+
CTF fields are editable through `/config`. Set `PENTESTING_CONFIG` to override
|
|
444
|
+
the global config directory.
|
|
442
445
|
|
|
443
446
|
| Variable | Description |
|
|
444
447
|
| --- | --- |
|
|
@@ -475,8 +478,8 @@ Inside an interactive session, these commands inspect and drive runtime state
|
|
|
475
478
|
/tools List the currently available tools and schemas
|
|
476
479
|
/agent Switch the active agent
|
|
477
480
|
/conversation Browse conversations for the active workspace
|
|
478
|
-
/goal <task> Set the active goal without enabling autonomous mode
|
|
479
|
-
/auto
|
|
481
|
+
/goal <task> Set the active goal without enabling autonomous mode
|
|
482
|
+
/auto Toggle autonomous mode for the current goal (default: off; Esc stops it)
|
|
480
483
|
/update Download and apply the latest public release asset for supported native targets
|
|
481
484
|
/help Show all commands
|
|
482
485
|
/exit Quit
|
|
@@ -501,15 +504,18 @@ pentesting shell-listener --bind 127.0.0.1 --port 4444
|
|
|
501
504
|
|
|
502
505
|
Manages multiple accepted TCP sessions with per-session routing, buffered
|
|
503
506
|
output, raw byte logging, full-duplex transcripts, command history, attach /
|
|
504
|
-
detach events, replay, and evidence manifests. `pty-upgrade` sends
|
|
505
|
-
only; `upgrade` runs
|
|
506
|
-
or failed.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
507
|
+
detach events, replay, and evidence manifests. `pty-upgrade` sends one concrete
|
|
508
|
+
helper only; `upgrade` runs a helper plus a probe and records `pty_state` as
|
|
509
|
+
verified or failed. Explicit `technique=auto` adds a bounded listener-side state
|
|
510
|
+
machine: framed capability recon, allowlisted `bash`/`sh` selection, ordered
|
|
511
|
+
helper attempts (`python3`, `python`, `python2`, `script`, `expect`), generic
|
|
512
|
+
prompt observation, and phase-local probe verification. Only unavailable,
|
|
513
|
+
early-returned, or completed-but-unverified attempts advance to the next
|
|
514
|
+
candidate; timeout, disconnect, or writer failure stops without blind input.
|
|
515
|
+
The entire operation keeps one command id, deadline, session lease, ledger, and
|
|
516
|
+
final response. There is still no silent default: omission is rejected, manual
|
|
517
|
+
techniques keep their single-attempt behavior, and custom text remains the
|
|
518
|
+
escape hatch for unusual targets. Raw logs and transcripts are capped per session and closed sessions
|
|
513
519
|
are archived automatically so a noisy peer cannot grow memory or disk without
|
|
514
520
|
bound. Secret redaction is applied before new raw/transcript/display records are
|
|
515
521
|
written; it is not retroactive for output that arrived before the secret value
|
package/README.md
CHANGED
|
@@ -21,20 +21,33 @@ Agent-loop essentials plus a security-focused runtime layer.
|
|
|
21
21
|
| Tool guardrails | Read-before-edit enforcement, repeat-call guard, policy-gated file/shell/network |
|
|
22
22
|
| Permissions | Allow / Deny / Confirm, with once/always decisions persisted |
|
|
23
23
|
| Context compaction | Automatic micro-pruning + model-triggered summarization, pre/post hooks |
|
|
24
|
-
| Interrupt & steering | ESC
|
|
24
|
+
| Interrupt & steering | ESC stops the current turn and auto loop; queued input uses revisioned FIFO amend/replace semantics and deterministic PTY Enter ownership |
|
|
25
25
|
| 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 |
|
|
26
26
|
| PTY session control | One actor owns each socket/PTY/pipe, command queue, transcript, and child lifecycle, with resize gating, FD accounting, and deterministic close/revoke/gc reclamation |
|
|
27
|
-
| Frontier-guided exploration |
|
|
28
|
-
| Subagents |
|
|
27
|
+
| Frontier-guided exploration | Persistent lead ledger with explicit dispatch; breadth defaults to one and is hard-capped at four |
|
|
28
|
+
| Subagents | Explicit delegation to built-in specialists, including `crypto`, `rev`, and `pwn`; one selected agent can run up to four tasks concurrently |
|
|
29
29
|
| MCP & skills | Dynamic MCP tool discovery, layered markdown skills |
|
|
30
30
|
| Memory | Ebbinghaus-style decaying notes + hybrid lexical/semantic/graph retrieval |
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
Delegation is explicit. One `task` call selects one agent and may run its tasks
|
|
35
|
+
concurrently; separate top-level calls are sequenced. `explore dispatch` instead
|
|
36
|
+
uses `builder` clones with category overlays and waits for the batch. Both paths
|
|
37
|
+
share permissions, budgets, lineage, and evidence checks.
|
|
38
|
+
|
|
39
|
+
### Core algorithms
|
|
40
|
+
|
|
41
|
+
| Area | Implementation | Time / space |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Exploration | Score-ranked BFS/DFS guidance, parent backtracking, global reseeding; append-only leads folded into a `HashMap` | Snapshot/advice `O(R + L log L)` time, `O(L)` working and `O(R)` stored space |
|
|
44
|
+
| Knowledge | BM25 + 768-D cosine search + BFS over adjacency maps/visited sets, fused by RRF; fixed 20-round PageRank at index build | Query `O(M + N(Q + D + log N) + V log V + E)` time and `O(N + V + D)` working space; index storage `O(M + ND + V + E)` |
|
|
45
|
+
| Runtime control | FIFO queues plus semaphore-bounded `join_all` fan-out | `O(T)` scheduling/result state, at most four active children per batch |
|
|
46
|
+
|
|
47
|
+
`R` is lead records, `L` live leads, `M` searchable text, `N` notes, `Q` query
|
|
48
|
+
terms, `D = 768`, and `V/E` graph nodes/links. Memory decay is constant-time per
|
|
49
|
+
note. Kruskal, Prim, and a generic divide-and-conquer engine are not runtime
|
|
50
|
+
components; agents may apply them to a target when useful.
|
|
38
51
|
|
|
39
52
|
---
|
|
40
53
|
|
|
@@ -58,26 +71,26 @@ wrappers. Host Cargo compilation is fail-closed; free disk or RAM does not make
|
|
|
58
71
|
it an approved path.
|
|
59
72
|
|
|
60
73
|
```bash
|
|
61
|
-
scripts/dbuild.sh check --workspace --all-targets
|
|
62
|
-
scripts/dbuild.sh test -p builder_domain
|
|
63
|
-
scripts/dverify.sh focused
|
|
64
|
-
scripts/dverify.sh full
|
|
65
|
-
scripts/dbuild-image.sh validation # once per fresh Docker cache
|
|
66
|
-
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/dbuild.ps1 test -p builder_domain # Windows
|
|
67
|
-
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/nverify.ps1 # Windows npm verify
|
|
74
|
+
scripts/dbuild.sh check --workspace --all-targets
|
|
75
|
+
scripts/dbuild.sh test -p builder_domain
|
|
76
|
+
scripts/dverify.sh focused
|
|
77
|
+
scripts/dverify.sh full
|
|
78
|
+
scripts/dbuild-image.sh validation # once per fresh Docker cache
|
|
79
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/dbuild.ps1 test -p builder_domain # Windows
|
|
80
|
+
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/nverify.ps1 # Windows npm verify
|
|
68
81
|
```
|
|
69
82
|
|
|
70
83
|
The wrappers cap memory, CPU, PIDs, jobs, test threads, and time; verify storage
|
|
71
|
-
before launch; serialize
|
|
72
|
-
|
|
84
|
+
before launch; serialize resource-intensive work; and leave a redacted resource
|
|
85
|
+
report. Automated CI/CD is disabled. Full policy: [Docker-only build safety](https://github.com/agnusdei1207/pentesting/blob/main/docs/BUILD_SAFETY.md).
|
|
73
86
|
|
|
74
|
-
### 🐳 Run with Docker
|
|
75
|
-
|
|
76
|
-
No local Rust toolchain needed:
|
|
77
|
-
|
|
78
|
-
Published images support `linux/amd64` only. Docker is the recommended runtime
|
|
79
|
-
on Windows and macOS; Apple Silicon Macs run the amd64 image through Docker
|
|
80
|
-
Desktop emulation. Native ARM64 images and binaries are not supported.
|
|
87
|
+
### 🐳 Run with Docker
|
|
88
|
+
|
|
89
|
+
No local Rust toolchain needed:
|
|
90
|
+
|
|
91
|
+
Published images support `linux/amd64` only. Docker is the recommended runtime
|
|
92
|
+
on Windows and macOS; Apple Silicon Macs run the amd64 image through Docker
|
|
93
|
+
Desktop emulation. Native ARM64 images and binaries are not supported.
|
|
81
94
|
|
|
82
95
|
```bash
|
|
83
96
|
export OPENAI_API_KEY="sk-..." # provider API key or gateway token
|
|
@@ -111,7 +124,7 @@ OPENAI_MAX_TOKENS=4096 \
|
|
|
111
124
|
docker compose run --rm pentesting
|
|
112
125
|
```
|
|
113
126
|
|
|
114
|
-
### Common commands
|
|
127
|
+
### Common commands
|
|
115
128
|
|
|
116
129
|
```bash
|
|
117
130
|
pentesting # Interactive TUI
|
|
@@ -120,32 +133,35 @@ pentesting shell-listener --bind 127.0.0.1 --port 4444 # Authorized reverse-sh
|
|
|
120
133
|
pentesting --version
|
|
121
134
|
```
|
|
122
135
|
|
|
123
|
-
Use `shell-listener` in authorized CTF/lab work to accept callbacks, tag sessions, run sentinel-tracked commands, verify PTY upgrades, and retain transcripts/evidence.
|
|
124
|
-
|
|
125
|
-
Short version: the agent can catch a dumb reverse shell, upgrade it to a verified PTY, pivot to a second callback, and reclaim both sessions cleanly with `close` / `revoke` / `gc`.
|
|
126
|
-
|
|
127
|
-
### Interactive
|
|
128
|
-
|
|
129
|
-
- `/model` owns a modal terminal surface. Returning from it restores the prior
|
|
130
|
-
transcript cursor before the fixed prompt/status rows are redrawn, so later
|
|
131
|
-
responses and errors append instead of overwriting the input area.
|
|
132
|
-
- `/goal <task>` records the goal only. Autonomous continuation starts off and
|
|
133
|
-
can be enabled or stopped only with an explicit `/auto` command.
|
|
134
|
-
- Tool/request budget exhaustion does not create a fresh turn while auto mode
|
|
135
|
-
is off. A submitted queued input takes precedence over autonomous follow-up.
|
|
136
|
-
- Submitted type-ahead is consumed once in FIFO order at the next safe turn
|
|
137
|
-
boundary. Only explicit amend/replace intent may change that handoff.
|
|
136
|
+
Use `shell-listener` in authorized CTF/lab work to accept callbacks, tag sessions, run sentinel-tracked commands, verify PTY upgrades, and retain transcripts/evidence.
|
|
137
|
+
|
|
138
|
+
Short version: the agent can catch a dumb reverse shell, upgrade it to a verified PTY, pivot to a second callback, and reclaim both sessions cleanly with `close` / `revoke` / `gc`.
|
|
139
|
+
|
|
140
|
+
### Interactive commands
|
|
138
141
|
|
|
139
|
-
|
|
140
|
-
image and then opens this interactive TUI without WSL:
|
|
142
|
+
Sessions start with auto mode off. Esc stops both the current turn and autonomous continuation. Queued input is replayed in FIFO order.
|
|
141
143
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
| Command | Purpose |
|
|
145
|
+
| --- | --- |
|
|
146
|
+
| `/help` | List every command |
|
|
147
|
+
| `/model [query]` | Choose a provider/model or custom endpoint |
|
|
148
|
+
| `/goal <objective>` · `/auto` | Record a goal, then toggle autonomous continuation; Esc stops it |
|
|
149
|
+
| `/status` · `/usage` | Inspect run state, gates, budgets, tokens, and requests |
|
|
150
|
+
| `/context` · `/memory` | Inspect context-budget snapshots and stored memories |
|
|
151
|
+
| `/agent` · `/builder` · `/planner` · `/researcher` | Select the active agent |
|
|
152
|
+
| `/new` · `/retry` · `/compact` | Start fresh, retry the last turn, or compact context |
|
|
153
|
+
| `/config` · `/tools` · `/skill` | Configure the runtime and inspect capabilities |
|
|
154
|
+
| `/workflow report` | Export the active run as Markdown |
|
|
155
|
+
| `/update` · `/exit` | Update the native release or quit |
|
|
156
|
+
|
|
157
|
+
On native Windows Git Bash, the repository smoke path builds the capped Docker
|
|
158
|
+
image and then opens this interactive TUI without WSL:
|
|
145
159
|
|
|
146
|
-
|
|
160
|
+
```bash
|
|
161
|
+
npm run check
|
|
162
|
+
```
|
|
147
163
|
|
|
148
|
-
### 🔌 Reverse-shell & PTY sessions
|
|
164
|
+
### 🔌 Reverse-shell & PTY sessions
|
|
149
165
|
|
|
150
166
|
Catch and manage authorized shell callbacks: one listener, many targets, audited cleanup.
|
|
151
167
|
|
|
@@ -153,15 +169,16 @@ Catch and manage authorized shell callbacks: one listener, many targets, audited
|
|
|
153
169
|
pentesting shell-listener --port 4444 # 1. Catch callbacks (tracks many at once)
|
|
154
170
|
pentesting shell-session list # 2. See every live session + FD ownership
|
|
155
171
|
pentesting shell-session run -- id # 3. Run sentinel-bounded commands, capture output
|
|
156
|
-
pentesting shell-session
|
|
172
|
+
pentesting shell-session upgrade --technique auto # 4. Recon, select, retry, and verify a real PTY
|
|
157
173
|
pentesting shell-session revoke --session 1 # 5. Hard-close: reclaim FDs + archive evidence
|
|
158
174
|
```
|
|
159
175
|
|
|
160
176
|
- **Track** — each callback is accepted, numbered, and tagged; one session actor exclusively owns its live descriptors, transcript, and child lifecycle. `list` / `info` / `fdstat` / `lifecycle` show state and byte counts without cloned reader/writer descriptors.
|
|
161
177
|
- **Drive** — `run` wraps commands in a sentinel to capture exactly their output; `send` / `raw` / `signal` / `resize` give interactive control.
|
|
162
|
-
- **Upgrade** — `
|
|
178
|
+
- **Upgrade** — `upgrade --technique auto` explicitly runs a bounded `recon → select → helper → probe` controller, choosing an allowlisted shell and retrying only evidence-backed failures across `python3`, `python`, `python2`, `script`, and `expect`. Omission is still rejected: use a concrete technique for one exact CLI attempt; unusual custom `text` commands are available through the `session_control`/JSONL API. CLI `pty-upgrade` sends one concrete catalog helper and never starts adaptive fallback.
|
|
163
179
|
- **Record** — per-session raw log, full-duplex transcript, command ledger, replay, and evidence manifest — with secret redaction for registered values.
|
|
164
180
|
- **Reclaim** — `close` (graceful) and `revoke` (hard) release file descriptors immediately and archive the session; `gc` prunes closed sessions. Reclamation is tracked end-to-end, so FDs never leak.
|
|
181
|
+
- **Guard** — the JSONL control plane is a workspace-internal Unix socket only (absolute paths, symlink escapes, and non-socket files are rejected). Every request carries a protocol version and a correlating `request_id`, is bounded to 1 MiB in / 4 MiB out, and `timeout_ms` is capped at 5 minutes and rejected before any bytes reach the session. A small fixed worker pool multiplexes the socket so a long adaptive `upgrade` never blocks `health` / `observe` / `close`, and injected secrets are redacted from responses and sensitive audit records. `probe` / recon fields are the target's own self-report, not a security attestation.
|
|
165
182
|
|
|
166
183
|
---
|
|
167
184
|
|
|
@@ -185,48 +202,12 @@ export PENTESTING_SKIP_DOWNLOAD=1 # skip postinstall bina
|
|
|
185
202
|
|
|
186
203
|
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.
|
|
187
204
|
|
|
188
|
-
### Frontier-guided CTF exploration
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
`flag_check` remains a verification tool and evidence source instead of a
|
|
195
|
-
default completion gate. `[exploration]` contains only resource caps. A
|
|
196
|
-
ready-to-copy context lives at
|
|
197
|
-
`docs/config/ctf.toml`:
|
|
198
|
-
|
|
199
|
-
```toml
|
|
200
|
-
[engagement]
|
|
201
|
-
kind = "ctf"
|
|
202
|
-
flag_format = "flag\\{[^}]+\\}"
|
|
203
|
-
require_flag_evidence = false
|
|
204
|
-
|
|
205
|
-
[exploration]
|
|
206
|
-
max_frontier_nodes = 256
|
|
207
|
-
max_breadth = 4
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
With the profile active, the runtime stores `explore` leads as bounded
|
|
211
|
-
`EvidenceKind::Lead` events and reuses prior-run records by reference rather
|
|
212
|
-
than copying them. A repeated dead probe suppresses that execution path but
|
|
213
|
-
does not reject the underlying hypothesis; fresh evidence reopens it. The model
|
|
214
|
-
still drives work through the explicit `explore` and `task` tools. Exploration
|
|
215
|
-
does not replace the core execution strategy, add a background scheduler, or
|
|
216
|
-
expose a passive `/frontier` UI/query path. Node, breadth, and depth limits bound
|
|
217
|
-
its cost.
|
|
218
|
-
|
|
219
|
-
Malformed tool-call output is fail-loud: unparsed tool-shaped markup is retried
|
|
220
|
-
instead of accepted as a final answer, the TUI suppresses raw control markup, and
|
|
221
|
-
long no-newline streams flush at soft text boundaries so rendering cannot hang
|
|
222
|
-
behind usage-only progress ticks. The startup banner and live status row stay
|
|
223
|
-
compact; generic run, token, and queued-input detail lives in `/status`.
|
|
224
|
-
|
|
225
|
-
The shipped contract is covered by
|
|
226
|
-
`scripts/dbuild.sh test -p builder_app orch_spec::exploration_e2e`: it verifies the
|
|
227
|
-
always-available tool path plus breadth enumeration, depth descent, sibling
|
|
228
|
-
breadth, dead-probe pivot, global reseed, seed digest, broad-clone overlay, and
|
|
229
|
-
child result promotion.
|
|
205
|
+
### Frontier-guided CTF exploration
|
|
206
|
+
|
|
207
|
+
`explore` is always available. Use `/config` to set the engagement kind, flag
|
|
208
|
+
verification, and frontier limits; settings persist in the installed runtime's
|
|
209
|
+
user config. Breadth defaults to one and is capped at four. Leads are persistent,
|
|
210
|
+
deduplicated, and dispatched explicitly.
|
|
230
211
|
|
|
231
212
|
With Docker, mount both your project and the persistent runtime config volume, then pass the same variables through with `-e`:
|
|
232
213
|
|
package/lib/runtime.mjs
CHANGED
|
@@ -15,7 +15,7 @@ const MANAGED_BINARY_MANIFEST = path.join(MANAGED_BINARY_DIR, "pentesting-manife
|
|
|
15
15
|
|
|
16
16
|
const RELEASE_TARGETS = {
|
|
17
17
|
// Native binaries published as release assets. Linux x64 uses musl (static).
|
|
18
|
-
// Other platforms use the published linux/amd64 image through Docker.
|
|
18
|
+
// Other platforms use the published linux/amd64 image through Docker.
|
|
19
19
|
"linux:x64": {
|
|
20
20
|
assetName: "pentesting-x86_64-unknown-linux-musl",
|
|
21
21
|
binaryFileName: "builder",
|
|
@@ -53,7 +53,7 @@ export function resolveReleaseAsset(platform = process.platform, arch = process.
|
|
|
53
53
|
throw new Error(
|
|
54
54
|
`No native pentesting binary for '${platform}/${arch}'. ` +
|
|
55
55
|
`Native targets: ${supported}. ` +
|
|
56
|
-
`On macOS or Windows, or on a non-amd64 host, use the linux/amd64 Docker image instead: ` +
|
|
56
|
+
`On macOS or Windows, or on a non-amd64 host, use the linux/amd64 Docker image instead: ` +
|
|
57
57
|
`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`,
|
|
58
58
|
);
|
|
59
59
|
}
|
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.10",
|
|
4
|
+
"builderReleaseTag": "v0.100.10",
|
|
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",
|