AI Agents for Vulnerability Discovery: Workflow, Implementation, and Capability Boundaries

    This article examines how AI agents can move from assisting with code review to autonomously executing vulnerability discovery tasks. It explains the limits of single-turn Q&A, a task-driven workflow with tool feedback, the role of expert knowledge, and public evidence. It also provides practical controls for implementation—authorization, sandboxing, logging, manual review, and knowledge capture—along with report fields and a checklist for deciding when to use agents and when expert judgment must lead.

    1. From Assisted Tools to Autonomous Execution

    Many engineers still think of AI vulnerability discovery as pasting a piece of code into an LLM and asking whether it has security issues. This can surface obvious problems, but the output tends to be static and generic, and it rarely adds meaningful value.

    The difference between the two modes is who controls the workflow.

    • Assisted mode: humans form hypotheses and write validation scripts; AI only accelerates a step, such as completing code or explaining a function.
    • Autonomous mode: humans define the task scope; the agent reads materials, forms hypotheses, writes and runs validation scripts, judges whether the results constitute real issues, and finally produces a report.

    Autonomous mode actually places higher demands on people. They must define scope, provide context, and review results. It is therefore not an unattended, fully automatic tool.

    2. Core Methods for Agent Work

    1. Why Single-Turn Q&A Has Limited Value

    Single-turn questions usually have three limitations:

    • The model lacks the target system’s business logic, deployment environment, and historical defect records.
    • Cross-file and cross-module data flows are truncated in the input and cannot be fully reconstructed.
    • Without runtime feedback, the model can only make probabilistic judgments and cannot validate them.

    As a result, in scenarios with complex cross-file data flows, a need for runtime evidence, or missing business context, single-turn Q&A conclusions are unreliable and should be treated only as leads while reading code.

    2. Task-Driven Workflow with Tool Feedback

    An effective approach is to give the agent a task with a clear objective and a controlled tool environment. Below is an example task template:

    1. Task ID: (enter the approval ticket number)
    2. Authorization scope: only assets listed in the written authorization, see attachment
    3. Target allowlist: list specific hosts, domains, and component versions
    4. Testing window: [time range] each day
    5. Tools and environment: isolated test environment; retain logs for all requests and script executions
    6. Test objective: identify potential security defects in target components and confirm whether they can be reproduced reliably
    7. Stop conditions: stop immediately and notify the owner if service anomalies occur, access exceeds the allowlist, or an alert is triggered
    8. Output requirements: output according to the report template; mark confidence for all findings and flag them for manual review

    This template makes authorization, scope, time, environment, stop conditions, and review points explicit. If any of these is missing, testing should not start.

    The agent’s execution loop usually includes five steps:

    1. Information gathering: read documentation, source code, and interface definitions to build an understanding of the target;
    2. Hypothesis generation: propose candidate hypotheses based on common defect types and suspicious points in the code;
    3. Experimental validation: run tests in an isolated environment and use runtime results to confirm or rule out hypotheses;
    4. Result assessment: distinguish theoretical risks from reproducible issues and filter out false positives;
    5. Report output: organize reproduction steps, impact scope, and remediation recommendations.

    3. Capturing Expert Experience

    The quality of an agent’s output depends heavily on the experience it can draw on. Teams can turn senior engineers’ testing checklists, historical defect patterns, and false-positive experience into reusable skill packages. When the agent can refer to these judgment criteria on each run, its output is more consistent than that of a bare model.

    4. Public Cases and Evidence Sources

    Public cases have shown agents finding defects in different types of targets, including browsers, operating system kernels, and databases, with some results confirmed by vendors. This indicates that the approach has moved beyond the demonstration stage. However, the number of cases, coverage, and specific conclusions should be based on vendor advisories, official acknowledgments, or formal reports. When citing, note the source, date, and statistical basis; do not use unsourced ratios or numbers.

    3. Implementation Priorities and Engineering Recommendations

    Teams introducing agents should start with the following areas:

    • Authorization first: confirm targets, time windows, and methods in writing before starting; exclude any asset that is not authorized.
    • Sandbox isolation: separate script execution environments from production systems and office networks to avoid affecting business operations.
    • Log retention: record every request, every script, and every judgment step for traceability and audit.
    • Manual review: all reports must be confirmed by a human before submission to vendors or internal teams to reduce false positives.
    • Knowledge capture: add effective prompts, skill packages, and validation scripts to the team knowledge base and update them regularly.

    1. Report Field Checklist

    A consistent report format makes review more efficient. Each report should include the following fields:

    • Title
    • Affected assets and versions
    • Reproduction steps
    • Runtime evidence (request records, response summaries, log excerpts)
    • Impact scope
    • Remediation recommendations
    • Confidence (high, medium, low, with rationale)
    • Reviewer and review time

    2. Capability Boundary Checklist

    To decide whether a type of task is suitable for an agent, confirm each item:

    • Asset type: Is it a component that can be isolated and tested repeatedly?
    • Vulnerability type: Is it a defect with a relatively clear pattern that can be validated through runtime results? Complex business logic defects usually require human leadership.
    • False-positive rate: Is the false-positive rate acceptable in a small-scale pilot?
    • Manual review ratio: Has every conclusion been reviewed by a human?
    • Compliance approval: Have the necessary authorization and approvals been obtained?

    If any answer is no, the task scope should be reduced or the effort should be led by an expert. Agents are good at broad screening and repetitive work, but they cannot replace expert business judgment.

    4. Conclusion

    The core of agent-driven vulnerability discovery is to hand repetitive steps—reading code, forming hypotheses, running experiments, and writing reports—to tools, while humans define objectives, provide experience, and review results. For security teams, a prudent approach is to run a small-scale pilot within an authorized scope and an isolated environment, record the false-positive rate and review cost, and then decide whether to expand investment.