fix: post-0.2.0 tester feedback — tool discipline, subagent UX, upgrade - #1
Merged
Conversation
Prompts (tool discipline): - webapp: Authenticated Testing block (auth goes via ffuf/gobuster/nuclei/ sqlmap -H/-b/--cookie, not hand-run curl); Injection→sqlmap block with a single-recon-curl exception for Next.js RSC/Server Actions, then sqlmap -r + sqlmap_parse; Long-running Fuzz block (-maxtime, background, separate parse, drop -s, lower -t on throttle); narrow the line-118 loophole so "PoC bytes" can't justify manual payload sweeps. - pentest.txt: mirror the auth/injection/maxtime discipline next to NO CURL LOOPS. - Skills now MANDATORY just-in-time (one at a time) across webapp + scanner, enumerator, exploiter, infrastructure, identity, post-exploit; coordinator delegates skill-loading to subagents. - web-server skill: mirror auth/injection/maxtime; add -maxtime to ffuf example. Coordinator delegation (prompt-only): - pentest.txt + orchestrator-mode.txt: narrow the do-it-yourself whitelist to one command, add "dispatch then wait — don't grab the work back". Subagent management (TUI + registry): - subagent-bar: show only running subagents; finished drop out (reachable via session list). - session nav (←/→): cycle active subagents only (present session_status entry); makes overflow beyond the bar reachable too. - background-job: prune finished jobs to a 30-entry tail so <live-subagents> and state_query subagents stop growing unbounded; running never pruned. Upgrade: - upgradeCurl: fetch install.sh from raw main (release asset was dropped in eb77230) and pass PENTESTCODE_VERSION so `pentestcode upgrade` works again. - app.tsx: drop stray console.log in the update-available handler (garbled TUI). Branding: - sidebar footer plugin: "Open"→"Pentest" (it overrode the rebranded default).
s0ld13rr
added a commit
that referenced
this pull request
Jul 27, 2026
…uctive agents (#1) The batch-3 stall-watchdog gated on task-graph updatedAt (dispatch time, never bumped while a subagent runs), so a still-working reverse-shell/exploit agent looked stalled at 5min. In the field run the coordinator killed such agents (twice) and took the work over solo -> the death-spiral. - detectStall (orchestrator.ts): add lastActivityMs (nodeId -> MAX part timestamp) and roleStallMultiplier; gate on idleMs (time since last output), not dispatch age; add idleMs to Stall; sort most-idle-first. Falls back to age when no signal. - message-v2.ts: lastActivityBySession(sessionIDs) -> latest part.time_created per child session (live activity signal; parts are written incrementally). - task.ts watchdogLoop: map in-flight node->child-session via job metadata, query activity, pass to detectStall. Operational roles (exploiter/exploit_dev/ post_exploit/infrastructure) get x4 threshold (shell/gadget/tunnel are slow+quiet). - formatStalledTask: reworded to SILENT-for-N (not running-for-N), de-emphasize kill, and after a kill RE-DELEGATE — never take the work over solo. - orchestrator.test.ts: +4 cases (active-not-stalled, silent-stalled, role multiplier, most-idle-first). 28/28.
s0ld13rr
added a commit
that referenced
this pull request
Jul 27, 2026
…off subagents The dev.11 run (6/12) burned ~4x tokens because the engagement-state block (diff + OODA + full compact-state) was NOT gated to the coordinator — every focused subagent got the whole multi-host state re-injected, and recentChanges>15 (true almost every turn in a busy run) forced a FULL dump each turn -> ~4x input + a busted prefix cache (coordinator was only 7% of cacheR; subagents webapp 16.3M / infra 10.6M). - #3 subagent-cost (prompt.ts): gate diff/OODA/full-state to isCoordinator; a focused subagent now gets a one-line 'use state_query' pointer (it has its task+target in the objective). Subagents no longer call markInjected (stops disturbing the coordinator's diff baseline). - #1 vector-ledger (schema.ts toVectorLedger): the coordinator's PRIMARY lens — a compact ranked board grouped by host (OWNED-root/user/recon + signal), HOT confirmed/exploited vulns to finish-or-escalate, suspected candidates, untried services, and a DEAD list (resolved_vectors) to never retry. Injected every coordinator turn; full compact-state stays on the every-8-turns cadence. typecheck 19/19.
s0ld13rr
added a commit
that referenced
this pull request
Jul 27, 2026
KumaloWilson
pushed a commit
to KumaloWilson/pentestcode
that referenced
this pull request
Aug 2, 2026
…ld13rr#1) Both the released 0.2.2 and our build failed to weaponize a found web vuln by brute-forcing request shapes instead of reading the route handler they had the source for. Add a general, target-agnostic methodology rule to pentest/exploiter/ webapp: on a 4xx/5xx with source in hand, read the handler to derive the exact contract (transport JSON vs form-encoded vs query; field names/nesting/types; preconditions) before trying variants. Deliberately GENERIC — no framework/plugin/CVE-specific detail — so it improves general exploitation methodology without leaking any test CVE's answer (keeps zero_day measurement clean).
KumaloWilson
pushed a commit
to KumaloWilson/pentestcode
that referenced
this pull request
Aug 2, 2026
When a versioned component has a public fixed release, diff patched vs target version to locate the vuln from the fix, then focus exploitation on the changed code. Target-agnostic (any versioned software) — no CVE/framework specifics, so zero_day measurement stays clean. Depth-committing: also counters breadth-first scatter. Complements read-the-handler (fix s0ld13rr#1).
Dextan-solutions
pushed a commit
to Dextan-solutions/pentestcode
that referenced
this pull request
Aug 8, 2026
…ve scope gate dev.4 (s0ld13rr#1+s0ld13rr#3): - s0ld13rr#1 Reconcile ORCHESTRATOR_MODE.txt to the plan-only model. The old manual-dispatch text (ACT: use `task` tool + `task_graph dispatch` bookkeeping, Dispatch Pattern) directly CONTRADICTED the AR1 <orchestrator-dag> block (`task_graph plan` is the ONLY verb, harness dispatches). A dev.3 range-3 session showed the coordinator caught between the two, resolving the paralysis by soloing with bash and NEVER dispatching. Rewrote to a single plan-only model + a clear line: one-off fingerprint direct is fine, ALL deeper enum/exploit/pivot is a planned task. - s0ld13rr#3 scope_check: (a) extractor no longer matches code tokens (json.load, s.recv, socket.socket) or internal-TLD hosts (mail-dmz.range3.local) as targets — a curated public-TLD allow-list kills the false SCOPE WARNINGs that flooded every python-in-bash command; (b) scope check moves BEFORE command execution and becomes an interactive gate: a genuinely-external out-of-scope target prompts the operator to add it to scope (approve -> added + proceed; deny -> command not run). Chain-reachable targets (inside a discovered network segment) are auto-in-scope. Without a TTY it never asks/hangs/ blocks — warn-only and proceed. free mode bypasses. - Test: scope-matcher extraction (code tokens/internal hosts rejected, real targets kept). typecheck 19/19; core tests 14/14.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Batch fix from live 0.2.0 tester feedback. Bumps version → 0.2.1.
Prompts — tool discipline
Authenticated Testingblock (auth is carried by ffuf/gobuster/nuclei/sqlmap via-H/-b/--cookie, not hand-run curl);Injection → sqlmapblock with a single recon-curl exception for Next.js RSC/Server Actions, thensqlmap -r+sqlmap_parse;Long-running Fuzzblock (-maxtime, background, separate parse, drop-s, lower-ton throttle); narrowed the line-118 loophole (single curl only to PoC a confirmed finding, not to detect).NO CURL LOOPS.-maxtimeto the ffuf example.Coordinator delegation — prompt only
pentest.txt+orchestrator-mode.txt: narrowed the do-it-yourself whitelist to one command; added "dispatch, then wait — don't grab the work back".Subagent management (TUI + registry)
session_statusentry); this also makes subagents beyondMAX_ROWSreachable.core/background-job.ts): prune finished jobs to a 30-entry tail so<live-subagents>andstate_query subagentsstop growing unbounded; running jobs are never pruned.Upgrade
upgradeCurl: fetchinstall.shfrom raw main (the release asset was dropped in eb77230) and passPENTESTCODE_VERSION→pentestcode upgradeworks again.app.tsx: drop a strayconsole.login the update-available handler (it garbled the TUI render).Branding
Open→Pentest(it overrode the already-rebranded default).Verified
bun turbo typecheck19/19.PENTESTCODE_VERSION.Rollout
curl … install.sh | bash), because 0.2.0'supgradeCurlis still broken; after thatpentestcode upgradeself-heals. Bundled skills re-seed automatically on the first launch of the new binary (embedded bundle version changes); prompts ship inside the binary.