HunterX v7 Full Toolchain Integration & Professional Tool Intelligence

Status: Ratified (Sprint 031 / Wave 16) Version: 1.0.0 Owner: HunterX Architecture Council


1. Purpose / Scope

HunterX must be capable of professionally interacting with the complete authorized offensive-security toolchain. This is not “run command and capture stdout”. It is:

UNDERSTAND TOOL
    → UNDERSTAND CAPABILITIES
    → UNDERSTAND REQUIREMENTS
    → SELECT TOOL
    → BUILD SAFE/SCOPED INVOCATION
    → EXECUTE → MONITOR → CAPTURE OUTPUT
    → PARSE → NORMALIZE → VALIDATE
    → EXTRACT OBSERVATIONS → EXTRACT EVIDENCE
    → CORRELATE → UPDATE TARGET MEMORY → UPDATE FINDINGS → UPDATE HYPOTHESES
    → SELECT NEXT ACTION

The critical principle: HunterX understands tool semantics. Every tool integration defines what the tool does, when to use it, when not to use it, what inputs it accepts, what outputs it produces, what the output means and — just as importantly — what the output does NOT prove.

Sprint 031 does not add new vulnerability classes, new reporting, new target-memory features, reverse engineering, malware analysis, new AI providers or new attack techniques.


2. Canonical Toolchain Vocabulary (Domain)

The canonical domain model lives in hunterx.domain.tool_intelligence and hunterx.domain.tool_mastery. Sprint 031 adds the full professional vocabulary:

Concept Role
ToolDefinition identity + category + version (via ToolMetadata)
ToolCapability discrete, searchable capability a tool provides
ToolKnowledge structured knowledge contract (inputs/outputs/args/modes/safety)
ToolRequirement input, dependency, resource, safety and scope requirements
ToolExecutionProfile full structured execution profile (execution_id, scope, refs)
ToolExecutionResult structured result with artifact references, never a finding
ToolObservation canonical observation (CanonicalObservation)
ToolEvidence evidence classification (EvidenceClass) extracted from results
ToolEvidenceConfidence confidence assessment combining reliability/completeness/…
ToolHealthStats / ToolReliabilityStats / ToolAvailabilityReport health
ToolVersion known/installed/constraint version facts
ToolParser / ToolNormalizer versioned parser/normalizer contracts
ToolStrategy primary/fallback/complementary/specialized strategy for a capability
ToolResult unified result with ToolOutputSemantics
ToolChain / ToolChainStep / ToolChainResult dependency-aware planning

ToolOutputSemantics is the canonical semantic state of a result: FOUND, NOT_FOUND, UNKNOWN, ERROR, PARTIAL, TIMEOUT, BLOCKED, RATE_LIMITED, UNSUPPORTED, INVALID_INPUT. Tool failure is never reported as “target is safe”.

EvidenceClass classifies extracted evidence: DIRECT, SUPPORTING, CANDIDATE, NEGATIVE, EXECUTION, VALIDATION, METADATA. Tool output alone never automatically becomes a confirmed finding.


3. Capability Model & Vocabulary

Every tool declares capabilities. The approved toolchain maps onto the capability model:

Because different layers historically used different vocabularies (the TIP taxonomy says subdomain-discovery while the arsenal said subdomain-enumeration), Sprint 031 introduces CapabilityVocabulary (hunterx.tools.intelligence.vocabulary) — a canonical alias map. Selection, recommendation and chaining now canonicalize capability ids so the whole toolchain speaks one capability language.


4. Tool Knowledge Contracts

Every integrated tool has a structured knowledge contract, synthesized by ToolKnowledgeFixtureRegistry (hunterx.tools.mastery.knowledge_fixtures) from the authoritative arsenal profiles. A fixture covers:

The three knowledge sources — PayloadsAllTheThings, SecLists and FuzzDB — are integrated as versioned, licensed knowledge contracts (capability: payload-intelligence / wordlist-provider / attack-patterns). They are knowledge inputs to hypotheses, testing, PoC generation and validation — never blindly executed.


5. Tool Selection

ToolSelectionEngine + ToolSelector rank candidate tools against criteria (mission profile, target type, required capabilities, installed state, time, compatibility, reliability, performance, preferences, safety ceiling). Every selection produces an explanation:

ToolRecommendationEngine produces best / alternative / fallback / complementary recommendations. ToolchainService.strategies(capability) returns the canonical strategy: primary tool, ordered fallbacks, complementary tools and the merge policy (deduplicate / correlate / cross-validate / keep-separate).

Fallbacks

Every major capability has fallback tools, e.g.:

Complementarity

Different tools produce different evidence. HunterX knows when outputs should be merged, correlated, cross-validated, deduplicated or kept separate — Subfinder + Amass never become duplicate subdomains (EvidenceCorrelator deduplicates by canonical key).


6. Tool Chain Planning

ToolSequencePlanner builds dependency-aware chains in topological order, e.g.:

Subfinder → DNSx → HTTPx → Katana → Parameter Discovery → Nuclei → Validator
Nmap → service detection → technology identification → vulnerability testing
JS discovery → LinkFinder → extracted endpoints → HTTPx → parameter discovery → validation

Chains are dynamic; steps declare routing conditions (ON_SUCCESS, ON_FAILURE, ON_FINDING, …) and per-step safety classes.


7. Structured Execution & Scope

Commands are built from structured configuration — never by concatenating untrusted target input into a shell string. The SDK (hunterx.tools.sdk) provides:

Scope enforcement runs before every execution (ToolEnforcementEngine): the target must be authorized and in scope; domain suffix containment is supported (api.example.com is inside example.com); out-of-scope assets are recorded but never attacked; redirects never auto-widen scope.

ToolchainService is the shared application facade (hunterx.application. toolchain) that the CLI and API call for catalog, knowledge, health, versions, requirements, provenance, recommendations, chains, guarded execution and offline parse/normalize.


8. Parsers, Normalizers & Output Intelligence

HunterX prefers structured tool output (JSON, JSONL, XML, CSV, SARIF, NDJSON, tool-native formats) and only falls back to textual parsing where necessary. Every parser/normalizer is versioned; malformed input is skipped defensively; empty output is an empty result (never an error); tool errors are classified by ToolOutputSemantics.

ToolchainService.parse(tool, raw) and .normalize(tool, records) support offline replay of saved tool output — essential for parser testing, regression testing, golden datasets and reprocessing with new normalizers.


9. Evidence, Correlation & Confidence

From tool results HunterX extracts direct, supporting, candidate, negative, execution, validation and metadata evidence. EvidenceCorrelator:

ToolEvidenceConfidence evaluates tool reliability, result completeness, output quality, version, validation state, corroboration and false-positive characteristics. Tool output is candidate evidence (or validated evidence) — never an automatic confirmed finding.


10. Security

Sprint 031 tests the toolchain attack surface:

See tests/security/test_toolchain_security.py.


11. Resource Controls & Rate Limiting

ToolRateLimitProfile supports requests/sec, concurrency, burst, cooldown and per-target limits. Effective limits are the minimum of all applicable limits (tool, scope policy, mission policy, target policy, safety policy). ToolResourceRequirements integrates with the SDK ResourceManager for CPU, memory, disk, network, process count, timeout, concurrency, rate and request budgets.


12. Versioning, Health & Installation


13. Events

The toolchain publishes typed events (see hunterx.domain.events):


14. Interfaces

CLI (hunterx tools)

hunterx tools list
hunterx tools show <tool>
hunterx tools capabilities [<tool>]
hunterx tools health [<tool>]
hunterx tools versions [<tool>]
hunterx tools execute <tool> <target> [--parameters JSON] [--mission <id>]
hunterx tools inspect-result <execution_id>
hunterx tools parse <tool> --raw <output|@file>
hunterx tools normalize <tool> --records <json>
hunterx tools chain <objective> --capabilities a,b,c
hunterx tools recommend <capability>

API (/tools)

GET /tools, GET /tools/{tool_id}, GET /tools/{tool_id}/capabilities, GET /tools/{tool_id}/health, GET /tools/{tool_id}/versions, GET /tools/{tool_id}/requirements, GET /tools/{tool_id}/provenance, GET /tools/capabilities, GET /tools/recommend/{capability_id}, POST /tools/chain, POST /tools/execute, GET /tools/executions/{execution_id}/status|output|result, POST /tools/parse, POST /tools/normalize.


15. Testing


16. Extension Model

New tools are integrated through the Tool Integration SDK (ToolAdapter) and registered with knowledge contracts in the arsenal specs (hunterx.tools.mastery.arsenal_*). The canonical capability vocabulary must be extended in CAPABILITY_ALIASES when a new tool introduces a new capability id. Knowledge fixtures are synthesized automatically; golden outputs and cross-tool correlation tests are added per tool category.

See capabilities/full-toolchain-intelligence.json for the ratified manifest of every integrated tool and its capabilities.