Dual-Agent Independent Validation to Reduce False Positives in AI Penetration Testing
AI agents can improve reconnaissance, vulnerability correlation, and reporting in automated penetration testing, but they also make false-positive management harder. This article explains a dual-agent independent validation design for open-source AI penetration testing solutions, covering isolated verification, differentiated evidence thresholds, code-first judgment rules, scope control, auditability, and human review. It also discusses evaluation limitations and practical steps for balancing testing efficiency with report credibility.
In automated penetration testing, AI agents can improve efficiency in information gathering, vulnerability lead correlation, and report generation, but they also amplify the challenge of false-positive governance. False positives not only consume security team review capacity but may also trigger unnecessary incident response. This article focuses on the design of dual-agent independent validation and discusses how to build an auditable, degradable, and human-fallback false-positive suppression mechanism in open-source AI penetration testing solutions, along with general engineering practices.
1. Why False Positives Are a Core Problem in AI Penetration Testing
Traditional scanners rely on rule matching and fingerprinting. False positives usually come from version identification deviations, configuration misinterpretation, or insufficient exploitation conditions. With large language models and agents, systems gain stronger context understanding and tool orchestration capabilities, but the risks increase at the same time: a model may misjudge input echo as script execution, misjudge a DNS resolution request as a successful server-side request forgery, or treat expected product design behavior as a vulnerability. If reports are output directly, security teams will face many findings that appear to exist but are actually harmless.
Therefore, an AI penetration testing solution cannot focus only on how many vulnerabilities are found. It must also address whether evidence is reproducible, whether judgment is explainable, and whether failure can be degraded. The core value of dual-agent independent validation is to split discovery and validation into two roles with isolated responsibilities: the hunting agent expands the search surface, and the verification agent reviews evidence from a skeptical perspective. The verification agent should not reuse the discoverer’s context. It should start from a fresh session, treat evidence submitted by the former as untrusted input, and use only read-only tools for reproduction and forensics.
2. Architecture Points for Dual-Agent Independent Validation
The architecture can be summarized in three layers: the discovery layer, the validation layer, and the human review layer. The discovery layer executes a 20-plus-stage workflow from early reconnaissance to report generation, calling general security capabilities such as port and service identification, template-based vulnerability scanning, and injection detection. The validation layer receives suspected vulnerability records and independently judges whether they are reproducible. The human review layer handles findings that can neither be confirmed nor disproven.
The isolation of the validation layer is reflected in three aspects. First, context isolation: the validation process starts from a fresh context to avoid contamination by the discovery agent’s reasoning path. Second, permission isolation: the verification agent is equipped only with read-only tools, reducing the risk of side effects on the target environment during validation. Third, evidence isolation: request responses, screenshots, or logs submitted by the discovery agent are treated as materials to be validated, not as confirmed facts. Each validation can set interaction rounds and time limits, for example, no more than eight rounds and no more than three minutes per validation run, to prevent the validation process from expanding indefinitely.
3. Differentiated Judgment Thresholds and a Code-First Principle
Different vulnerability types require different validation standards. For cross-site scripting vulnerabilities, script execution must be triggered; input echo alone cannot be considered a pass. For server-side request forgery vulnerabilities, with redirects disabled, the target server must send an HTTP callback to a new random token address; merely triggering a DNS resolution request or receiving a callback from the scanner itself does not count as a pass. These differentiated thresholds separate weak signals from strong evidence and reduce the room for subjective model judgment.
More importantly, code logic should take priority over model conclusions. If the model does not complete a successful retest but returns “confirmed,” the code should downgrade the judgment to “undetermined.” Only when a vulnerability is explicitly disproven, for example, when it is expected product design behavior, should the validation module discard the finding. If validation requires a second account, or if the trigger process is outside the visibility of the validation module, the finding should enter the human review queue rather than being forced to a conclusion.
A pseudocode example is as follows:
def validate(finding):ctx = new_isolated_context()evidence = treat_as_untrusted(finding.evidence)tools = read_only_tools()for round in range(MAX_ROUNDS):result = verifier_agent.investigate(ctx, evidence, tools)if result.status == "proven":return "confirmed"if result.status == "disproven":return "discarded"return "manual_review"if model_result == "confirmed" and not code_checks.replay_success:final_result = "undetermined"
4. Scope Control and Tool Orchestration
When an AI agent calls external tools, scope protection is essential. The solution should include a target allowlist that blocks all tool calls to hosts outside the configured targets and their subdomains, preventing unauthorized scanning. The tool orchestration layer should record the target, parameters, time, and response summary of each call to form an evidence chain. On the model side, the solution can be compatible with multiple model providers and local model runtimes, but model selection should not change validation standards. Validation rules, degradation logic, and human review conditions should be uniformly constrained by code.
If deployed in cloud environments such as Baidu AI Cloud, audit logs can be connected to a log service and evidence packages can be stored in object storage for review and traceability. This is a general cloud operations practice and does not change the judgment logic of the tools themselves.
5. Evaluation Limitations and Practical Recommendations
Current solutions of this type mostly disclose internal testing processes and have not yet published reproducible benchmark results. Public materials also describe differences among similar solutions only in broad terms. Readers should therefore interpret claims about false-positive rate advantages with caution. Practical recommendations include: build an in-house vulnerability sample set and separately measure the false-positive rate, false-negative rate, and human review proportion; set read-only permissions and call allowlists for the verification agent; enforce evidence chain logging; keep a human entry point for “undetermined” results; and regularly audit scope protection rules. Only by closing the loop among dual-agent validation, code degradation, and human review can AI penetration testing balance efficiency and credibility.
