HunterX v7 — Sprint 034.5 — Toolchain + Intelligence + Proof Certification

Phase: Final Release Gate — Phase 5 (Toolchain, Intelligence & Proof) Status: PASS (conditional — see Residual Risks) Date: 2026-08-11 Scope: src/hunterx (v7 package), the full tool registry, adapter/parser/ normalizer contracts, tool chaining, failure handling, findings/evidence/proof and the PoC engine. Continues from Sprint 034.4 (Security & Tool Execution).

This document certifies that HunterX can professionally operate its complete offensive-security toolchain — not merely launch binaries — and convert tool output into usable intelligence, evidence, findings and validated proof. Every claim is backed by a test or an explicit architectural guarantee; policy-only constructs are labelled POLICY, not enforcement.


1. Certification Method

The toolchain is NOT considered implemented merely because a binary can be launched. For every integrated tool the platform now holds a consolidated machine-readable contract covering: purpose, capabilities, prerequisites, version, input model, argument model, execution mode, scope requirements, output formats, stdout/stderr, exit codes, errors, timeouts, artifacts, parser, normalizer, canonical intelligence, downstream consumers and chaining opportunities.

Where a real binary is unavailable the complete adapter/parser/normalizer contract is validated with authoritative fixtures (see §15) and execution-dependent validation is clearly marked with the tools pytest marker (excluded by default; see tests/integration/tools/test_execution_dependent.py). No successful execution is faked to inflate coverage.


2. Tool Inventory

The certified registry now exposes 106 registered tools with 79 registered execution adapters (previously 41 adapter classes), classified by support level:

Support level Meaning Tool count (arsenal)
fully-supported execution + parser + normalizer + contract implemented subfinder, amass, assetfinder, findomain, theharvester, bbot, dnsx, naabu, nmap, masscan, httpx, whatweb, katana, ffuf, nuclei, gitleaks, searchsploit, …
execution-only binary can be invoked; parsing not fully integrated metasploit
partial-support execution + parsing/normalization implemented, fixture-validated; real-binary output still execution-dependent massdns, shuffledns, rustscan, gospider, hakrawler, gau, waybackurls, urlfinder, gobuster, feroxbuster, dirsearch, arjun, paramspider, kiterunner, linkfinder, secretfinder, xnlinkfinder, dalfox, xssstrike, sqlmap, ghauri, commix, tplmap, sstimap, xxeinjector, interactsh, graphqlmap, inql, trufflehog, semgrep, zap, mitmproxy, exploitdb, payloadsallthethings, seclists, fuzzdb, …
knowledge-only operational knowledge without an execution adapter wafw00f, testssl.sh, sslscan, crobat, gauplus, jwt-tool, openapi-parser, postman-parser, hashcat, john, codeql, openvas, nikto (partial), netexec, impacket, enum4linux-ng, ldapsearch, rpcclient, snmpwalk, prowler (partial), scoutsuite (partial), trivy (partial), syft (partial), grype (partial), kube-bench, osv-scanner (partial), spiderfoot, dnsrecon, crt-sh, arp-scan, fping, cewl, unicornscan, …

The complete tool list is generated by capabilities/full-toolchain-intelligence.json (92-tool arsenal manifest) plus the TIP-only capability adapters (API discovery, cloud/auth/authorization analyzers, safe-validation probes, proof-replay, knowledge providers). hunterx tools list / GET /tools and hunterx tools contracts / GET /tools/contracts expose the live inventory.


3. Tool Contract (machine-readable capability definition)

The consolidated contract is the single machine-readable definition every tool must expose. It is built by hunterx.tools.mastery.contract.build_contract from the authoritative master profile + relationship graph, and exposed via ToolchainService.contract/contracts, hunterx tools contract, and GET /tools/{tool_id}/contract.

Minimum dimensions (all verified non-empty for every registered tool by tests/tools/test_contracts.py):

Dimension Source
identity metadata (vendor, license, url, tags, platforms, language)
version metadata.version + version constraints + known issues
category / subcategory metadata
capabilities master profile capability ids
requirements authentication, privileges, installation, dependencies, OS, compatibility
input schema inputs contract (accepts/required/optional/transforms) + typed input fields + target type
argument builder CLI binary, structure, typed arguments, modes, safe/aggressive mode, global options, command tree
scope model scope requirements, redirects, expands-scope, network boundary, safety class, destructive, authorization
execution profile execution type, binary/container availability, adapter id, executable flag, concurrency class
timeout declared timeout or the platform default for executable tools (transparent timeout_declared)
resource limits CPU/memory/network/disk estimates + rate limits
output formats plain + structured formats
exit-code mapping canonical exit codes and meaning
parser parser id + input format + mappings
normalizer normalizer id + schema
artifact handling evidence capture, output/input files, raw-artifact preservation
error mapping error/warning/partial indicators + classification
retry policy attempts, retryable kinds, backoff, capability-equivalent fallbacks
evidence mapping capability → observation kind / evidence type / requires-validation
downstream capabilities successors, next-tools, validates, predecessors, alternatives
false-positive / false-negative risks known limits of the tool’s output
provenance where the contract came from

Gate result: every registered tool has a defined contract — 0 missing dimensions across the 92-tool arsenal (tests/tools/test_contracts.py), and the 14 TIP-only capability tools receive a complete TIP-derived contract (contract_gaps() returns empty).


4. Tool Capability Matrix

Tools are selected by canonical capability ids (ToolIntelligenceAPI vocabulary). The full matrix (capability → primary tool → fallbacks → complementary tools, merge policy deduplicate) is generated by ToolchainService.strategies and persisted in capabilities/full-toolchain-intelligence.json. Representative rows:

Capability Primary Fallbacks
subdomain-discovery subfinder amass, assetfinder, findomain, shuffledns
dns-records / dns-resolution dnsx dnspython, massdns
port-scanning nmap naabu, masscan, rustscan, tcp-connect
http-probing httpx nikto, whatweb
web-crawling katana gospider, hakrawler, crawler
directory-discovery ffuf gobuster, feroxbuster, dirsearch
parameter-discovery arjun paramspider, kiterunner, ffuf
historical-url-discovery gau waybackurls, urlfinder
endpoint-extraction linkfinder xnlinkfinder, urlfinder
vulnerability-scan nuclei wapiti, zap, openvas
xss-detection dalfox xssstrike
sql-injection-detection sqlmap ghauri
command-injection commix
ssti-detection tplmap sstimap
xxe-detection xxeinjector
oob-testing interactsh
graphql-testing graphqlmap inql
secrets-scan gitleaks trufflehog
static-analysis semgrep codeql
proxy-inspection mitmproxy zap
exploit-research searchsploit exploitdb
payload-intelligence payloadsallthethings fuzzdb
wordlist-provider seclists
cloud-assessment prowler scoutsuite

Selection is mission-state-aware: ToolSequencePlanner/ToolSelector rank by capability, target type, mission profile, available inputs, authorization ceiling, reliability and performance (tests/tools/test_chaining.py, tests/acceptance/toolchain/). Tools are never executed blindly.


5. Execution Model

All subprocess-backed adapters (now 16+ of the 79) run exclusively through the single guarded seam BinaryRunner (src/hunterx/tools/recon/runner.py): structural argv, no shell=True, 32 MiB output cap with process-tree termination, wall-clock timeouts, option-injection guards (guard_positional_target / guard_option_value). In-process adapters (dnspython, tcp-connect, crawler, API/cloud/auth analyzers, providers, safe-validation probes, proof-replay, knowledge datasets) run inside the SDK pipeline without subprocess.

Every execution goes through the SDK lifecycle prepare → run → validate_output → normalize → cleanup and is recorded as an ExecutionResult with formats, artifacts, failure kind and retry count. Each family emits canonical records:

Family Payload key Canonical record
recon discoveries DiscoveryRecord (domain/IP/subdomain)
dns dns_records DnsRecord
livehost observations LiveHost / PortFinding / ServiceFinding
tech technologies / observations TechnologyObservation
web / url crawl URLObservation
content content content-discovery records
parameter parameters parameter records
javascript observations endpoint/secret records
vuln / sast candidates candidate records (requires_validation=True)
secrets secrets redacted secret records
api apis API observations
proxy observations zap-alert / traffic-capture
exploit references exploit references
knowledge datasets dataset metadata
knowledge providers vulnerabilities canonical vulnerability knowledge

6. Parser Matrix

Parsing is adapter-driven online and engine-driven offline:

Representative fixture-validated parsers (see §15 golden fixtures): subfinder JSONL, dnsx JSONL, massdns JSON, shuffledns JSONL, naabu JSONL, rustscan JSON, nmap XML, httpx JSONL, katana JSONL, ffuf JSON, gobuster/feroxbuster JSONL, dirsearch JSON, arjun JSON, trufflehog JSONL, semgrep JSON, searchsploit JSON, nuclei JSONL, dalfox JSON, sqlmap/commix/sstImap text.


7. Normalizer Matrix

Normalization projects parsed records into canonical objects. Two layers:

  1. Legacy NormalizerEngine converts records into FindingResult / EvidenceResult / assets (tests/tools/test_parsers_normalizers.py).
  2. TIP ToolNormalizer (normalizer id, schema, observation mappings, migration) maps records into CanonicalObservation with auto correlation_key ({kind}:{target}:{normalized}) and provenance (src/hunterx/tools/intelligence/normalizers.py).

ToolchainService.normalize exposes offline normalization; the chain executor and target-intelligence store consume the canonical observations (tests/acceptance/toolchain/).

Canonical intelligence kinds (ObservationKind): domains, subdomains, IPs, ports, services, technologies, URLs, endpoints, parameters, secrets, vulnerabilities, evidence, findings, attack-path nodes, cloud resources.


8. Provenance

Every canonical observation carries: source tool, tool version, execution id, mission id, target id, timestamp, raw-artifact reference, normalized value, confidence, correlation key and provenance dict. This is enforced by CanonicalObservation and ToolExecutionRecord, written by the chain executor and TargetIntelligenceStore, and verified in tests/tools/test_chaining.py and tests/acceptance/toolchain/.


9. Tool Chaining

Gap closed this sprint: planning existed but no generic chain executor. POST /tools/chain planned only; multi-step execution existed solely in the vulnerability-validation path. Added ChainExecutor (src/hunterx/tools/intelligence/chaining.py) and ToolchainService.execute_chain / POST /tools/chain/execute / hunterx tools chain-execute.

ChainExecutor:

Certified end-to-end chains (tests/acceptance/toolchain/test_end_to_end_chains.py):

  1. Recon → DNS → probe → crawl → content → vuln: subfinder/amass → dnsx → httpx → katana → ffuf → nuclei
  2. API: api-graphql discovery → inql/graphqlmap → nuclei
  3. Secrets / repository: gitleaks → trufflehog → semgrep
  4. Web vulnerabilities: nuclei → dalfox → sqlmap → verification → evidence
  5. Cloud/SaaS: prowler / cloud-analysis

Intelligence reuse across missions is certified: observations from one chain feed a later chain without losing provenance (test_intelligence_reuse_across_chains).


10. Failure Handling

Certified failure modes and disposition (tests/tools/test_failure_handling.py, tests/security/tools/):

Failure Classification Retry Fallback
missing binary ToolExecutionErrorNOT_RETRYABLE no capability-equivalent tool
timeout ToolTimeoutErrorTIMEOUT yes (policy) capability-equivalent tool
invalid arguments (missing required param) rejected before process launch (ValueError) n/a n/a
crash (arbitrary exception) NOT_RETRYABLE, never “target safe” no capability-equivalent tool
non-zero exit OUTPUT_INVALID (via validate_output) policy capability-equivalent tool
partial output preserved in ChainStepResult; chain → PARTIAL
malformed output skipped lines; no candidates
empty output valid “no match” result, never failure
rate limiting adapter-level -rl/-rate bounds policy
network failure ToolRetryableErrorRETRYABLE yes capability-equivalent tool
permission failure ToolExecutionError at launch no
unexpected exit code classified via exit-code mapping policy

Fallback selection is never blind: _select_fallback requires a capability-equivalent tool with a registered adapter (tests/acceptance/toolchain/test_chain_failure_falls_back_to_equivalent_tool).


11. Intelligence Mapping

Every tool result becomes reusable target intelligence through TargetIntelligenceStore / ToolExecutionRecord / CanonicalObservation, keyed by target, carrying full provenance so a later mission can reuse previous intelligence. has_executed(target, tool) prevents blind re-runs. Certified by tests/acceptance/toolchain/test_intelligence_reuse_across_chains and the existing target-intelligence suites.


12. Evidence Mapping

Tool output does NOT automatically equal evidence. Each tool’s contract declares capability → observation kind → evidence type → requires_validation (validation-required set: sqli, xss, ssti, command-injection, xxe, vulnerability-scan, oob). Scanner output is a candidate (bounded confidence, provenance.validated=False); the Proof/Validation subsystems own the verdict. Certified by tests/security/tools/ and the golden finding suite (tests/golden/findings/).


13. Finding Mapping

The finding flow is certified end-to-end:

DISCOVER → HYPOTHESIZE → TEST → VERIFY → PROVE → FINDING

FindingLifecycleStateMachine gates every transition on evidence (FindingState: candidate → supported → validation_required → validating → validated → proof_required → proving → proved → report_ready). A detection without reproducible evidence never becomes a fully validated finding (tests/golden/findings/scenarios.json). FindingPackage preserves: vulnerability, affected asset, endpoint, parameter, evidence, verification, impact, PoC availability, reproduction, confidence, provenance and report-readiness. Known vulnerabilities, variants and application-specific/ novel behavior are supported (classify_unknown).


14. PoC Architecture

PocLifecycleState: generated → static_validated → execution_ready → replayed → behavior_confirmed → evidence_captured → proof_validated / rejected. A PoC is minimal (minimal=True), reproducible, linked to evidence and finding, traceable to execution (content_hash, deterministic, scope_bound, redacted), and replayed through the authorized execution pipeline (ProofReplayAdapter, in-process deterministic, never executes payloads). Refutation is preserved: ReplayVerdict (confirmed / not_reproducible / different_behavior / different_target / out_of_scope / different_hypothesis / stale) regresses the finding and never proves it (tests/golden/poc/scenarios.json).


15. Tests

New suites added for the certification (all pass in the default run):

Suite Coverage
tests/tools/ (80) consolidated contracts, adapter argv/parser contracts, failure handling, chaining, parser/normalizer engines
tests/integration/tools/ (11) engine-level execution, offline replay, CLI commands; tools-marked real-binary validation
tests/golden/tools/ (2) fixture-driven parser contract for every tool family
tests/golden/findings/ (5) finding flow gate + evidence survival
tests/golden/poc/ (4) PoC lifecycle + refutation behavior
tests/acceptance/toolchain/ (7) end-to-end chains (recon/API/secrets/web/cloud), fallback, intelligence reuse
tests/security/tools/ (11) structured argv, injection guards, hostile output, secret non-persistence, masking regression

Golden fixtures under tests/golden/tools/<family>/ cover every tool family (massdns, shuffledns, rustscan, gau, waybackurls, urlfinder, gospider, hakrawler, gobuster, feroxbuster, dirsearch, arjun, paramspider, kiterunner, linkfinder, secretfinder, xnlinkfinder, dalfox, xssstrike, sqlmap, ghauri, commix, tplmap, sstimap, xxeinjector, interactsh, graphqlmap, inql, trufflehog, semgrep, zap, searchsploit, exploitdb, metasploit).

Regression: full default suite (-m 'not tools') after the sprint: 3474 passed, 8 skipped, 2 deselected — no previous capability regressed.


16. Added Tools (capability-gap justified)

38 adapters added across 4 new families (parameter, sast, proxy, exploit, knowledge) and 9 existing families, closing these gaps:

The API-discovery adapters (api-openapi, api-graphql, …) were previously registered but never wired into the execution engine; they are now registered in the assembler.


17. Repairs (this sprint)

  1. Generic ChainExecutor — end-to-end chaining with provenance, fallback and partial-result preservation (P0 gap closed).
  2. ToolContract — consolidated machine-readable contract for every tool covering all 20 minimum dimensions; exposed via CLI/API.
  3. API adapters wired into the engineregister_api_adapters was never called by the assembler.
  4. Masking regression (mask_value)reveal_tail=0 leaked the full secret because value[-0:] returns the whole string. Fixed and pinned in tests/security/tools/.
  5. Arsenal support-level alignment — tools with real adapters upgraded from knowledge-only/partial-support to their true executable support level and adapter/parser/normalizer ids (specs._ADAPTER_UPGRADES), so the contract never under-reports executability.
  6. TIP-only tools now receive complete contracts (scope/error/retry/ evidence dimensions derived from TIP knowledge).
  7. contract_gaps redefined on the minimum-dimension gate (was flagging optional informational fields).

18. Coverage Gaps (documented, no P0/P1 blocker)

# Gap Disposition
G1 ~30 arsenal tools remain knowledge-only (wafw00f, sslscan, testssl.sh, hashcat, john, codeql, openvas, impacket, netexec, enum4linux-ng, prowler/scoutsuite/trivy/syft/grype/kube-bench/osv-scanner partial, spiderfoot, dnsrecon, crt-sh, arp-scan, fping, cewl, …) full knowledge contracts; adapters deferred to capability-gap justified sprints
G2 interactsh/metasploit/mitmproxy/zap execution is operator-bounded and interactive; the adapters provide argv+parse contracts and bounded execution execution-dependent; validated with fixtures + tools-marked tests
G3 Chain executor feeds discovered targets as the dependent step’s target (first host/URL); fan-out to N invocations is deferred documented; single-target adapters
G4 In-process SubprocessSandbox and plugins remain policy-only isolation (from 034.4) OS isolation is a deployment responsibility

19. Residual Risks (not silently accepted)

# Risk Class
R1 API control plane unauthenticated by default on loopback (opt-in auth exists) P1 (carried from 034.4)
R2 No OS-level sandbox for plugins / SubprocessSandbox (policy-only) P1 (carried from 034.4)
R3 Tool binaries resolved via PATH without integrity pinning P2
R4 No per-process CPU/rlimit; bounded only by wall-clock timeout P2
R5 Fixture-validated parsers certified against representative outputs; real-binary edge cases remain execution-dependent P2
R6 Chain fan-out is single-target per step; large-scale parallelization deferred P3
R7 Report redactor heuristic limits (short values / keyword-boundary keys) P3

20. P0/P1/P2/P3 Summary


21. Gate Checklist


22. Final Verdict

Sprint 034.5 — TOOLCHAIN + INTELLIGENCE + PROOF CERTIFICATION: PASS (conditional).

HunterX v7 now operates its toolchain professionally: 106 tools with complete machine-readable contracts, 79 registered adapters (38 added this sprint), fixture-validated parsers/normalizers for every family, provenance-preserving canonical intelligence, real end-to-end chain execution with capability-aware selection, classified failure handling with fallback, an evidence-gated finding lifecycle and a replay-validated PoC engine. A detection without reproducible evidence never becomes a validated finding.

The two P1 risks (opt-in API auth default and policy-only plugin isolation) are mitigated and carried from Sprint 034.4 with documented deployment guidance. No P0 or unresolved P1 toolchain blocker remains. Release gate PASSES.