Cover illustration for “Security Vulnerability Triage Agent Using SARIF Output”

Essay Code and Repo Agents

Security Vulnerability Triage Agent Using SARIF Output

A four-stage agent turns SARIF scanner output into reasoned triage decisions.

A security vulnerability triage agent using SARIF output turns scanner findings into decisions through contextual reasoning. The useful architecture separates evidence collection, judgment, scoring, and routing, then preserves what analysts teach it across pull requests. Its purpose is not to automate security outright, but to give engineers a reasoned first pass while keeping consequential actions under human control.

Why SARIF-based vulnerability triage has outgrown rule-based filtering

Modern CI/CD pipelines produce findings faster than human-only queues can classify them, and AI-generated code adds to that pressure. Google Cloud’s AI Agent Trends 2026 report says a large majority of SOC analysts worry that the number of alerts may cause them to miss real threats. Detection is not the only bottleneck anymore. Each alert also calls for a judgment on whether the flagged code poses a real risk in the setting where it runs.

SARIF, the Static Analysis Results Interchange Format, provides a common, machine-readable output contract for CodeQL, Semgrep, Trivy, and Gitleaks. That shared structure gives an agent a practical ingestion point without requiring a separate reasoning pipeline for every scanner. A rule can spot a suspicious pattern without knowing whether the access controls around it make it harmless.

Rule-based SOAR automation improved parts of this workflow, but could not reason, observe, and adjust as evidence changed. The Google Cloud report describes the broader shift as moving from alerts to action. For vulnerability triage, that means following the evidence through several steps. The architecture therefore needs to support an agent that reasons as a security engineer would.

What the agent actually needs to do: the four-step reasoning chain

Diagram: The Four-Step Vulnerability Triage Reasoning Chain. Visualizes: Show a four-stage sequential flow representing the agent's reasoning chain for vulnerability triage: (1) Ingestion & Normalization — reads SARIF from CodeQL, Semgrep, Trivy…

The first step is ingestion and normalization. The securestack-team PR #7, merged October 2026, reads reports from the four scanners, converts findings into a shared schema, and merges duplicates before downstream processing. SARIF 2.1.0 supplies the relevant fields through runs[].tool.driver.name, results[], ruleId, level, message, and locations[].physicalLocation. Normalization gives later stages one record to reason about. The w-index-m PR #7 from October 2026 provides another example of this normalization pattern.

The second step is contextual false-positive suppression. GitHub Security Lab’s taskflow agent, introduced in January 2026, illustrates the distinction with GitHub Actions workflows. CodeQL can flag a vulnerable workflow and miss a maintainer-only permission check that gates access, while an LLM can read the code around it and see that restriction. Is the dangerous path actually available to an attacker? Code Property Graph reasoning, combining AST, CFG, and PDG, can extend analysis across microservice boundaries, although the taskflow’s simpler file-fetching baseline already demonstrates useful results.

The third step is risk scoring. The securestack-team implementation derives a Risk Score from 0 to 10 using severity × exposure × confidence, so high severity alone does not determine urgency. Exposure distinguishes an accessible weakness from a constrained one, while confidence reflects uncertainty in the judgment. The model also operates within a firm bound. It can lower the score, never raise it, preventing model-driven inflation of the initial risk estimate.

The fourth step makes the judgment actionable. A PR comment gives developers context, while triage.json supplies structured output for ticket creation or remediation pipelines. Routing addresses the otherwise familiar problem of an alert with no owner. Secret handling has to precede this reasoning chain, however. Secrets are excluded from model input and outputs through a hard constraint at normalization, rather than a request that the model keep them private.

How to structure the pipeline: multi-stage taskflows with MCP as the tool layer

GitHub Security Lab’s YAML-driven taskflow framework separates the work into collect, audit, and report stages. Collection gathers evidence that bears on an alert, auditing checks for false-positive conditions, and reporting puts the findings in a structured bug report. The sequence is explicit rather than left inside one large prompt. This helps with limited context windows and with complex tasks that the model tends to leave unfinished when given in a prompt. Templated prompts also support asynchronous batches, with each alert’s details substituted at runtime.

The tool boundary is just as important. MCP, the Model Context Protocol, lets tools handle deterministic work while the LLM handles judgments that resist fixed rules. Early prompt-only attempts to gather workflow triggers sometimes captured partial events or produced conflicting conclusions about privileged contexts. Moving file fetching, searching, and permission-check enumeration into MCP server tools resolved those inconsistencies. The model could then focus on whether a discovered check was semantically equivalent to authentication.

The taskflow agent used only basic file-fetching and searching tools, with no static or dynamic analysis after CodeQL’s initial alerts. A small tool surface kept reasoning tractable and reduced exposure. At a different scale, Microsoft’s MDASH orchestrates more than 100 specialized AI agents across a configurable model panel for vulnerability discovery and exploit validation. Heavy reasoners handle complex inference while cost-efficient models handle volume work.

A purpose-built agent runtime supports that division of labor. Scheduling taskflows, managing tool calls, and preserving state between stages belong in the runtime. This keeps security logic apart from the work of running the infrastructure. It also makes each stage a distinct place to inspect when the final judgment is wrong.

SARIF, the Static Analysis Results Interchange Format, provides a common, machine-readable output contract for CodeQL, Semgrep, Trivy, and Gitleaks.

Persisting state across the PR cycle: SQLite, feedback loops, and memory architecture

An agent that forgets previous dismissals must repeat work every pull request. A longer prompt is not a memory architecture. The 2026-07-28 MCP specification introduced a stateless protocol core, so the application and workflow layer must handle state. The resulting separation gives tools stateless operations, the application task-level state, and external memory cross-session knowledge.

GitHub Security Lab’s fuzzing taskflow uses SQLite to pass state between stages within a run. Knowledge that needs to last longer needs a store that later taskflows can query and update. GitHub Issues can serve as that store when they hold the full alert context, including the reasons for dismissing findings. An analyst’s correction then becomes evidence for future runs. This creates a repository-specific feedback loop rather than forcing the agent to rediscover the same permission boundary each sprint.

Persistence also changes the threat model. A poisoned instruction stored in memory can trigger during a later session without the attacker being present. Memory records therefore need provenance, quarantine and purge capabilities, and protection against cross-task contamination. Tool security deserves equal attention because exposed unauthenticated MCP servers, credential leaks through SSRF vulnerabilities, and malicious marketplace skills are already documented risks. The pipeline’s own dependencies can become an entry point.

SKILLSECURER, by Mecca et al., uses a red agent to generate injections and a blue agent to detect and patch them. The research achieved full injection detection on controlled benchmarks and found latent vulnerabilities in more than 17% of popular skills examined from skills.sh. That finding concerns skills and nevertheless exposes a supply-chain risk for reusable skills brought into triage. Teams should scan third-party skills and tools before using them and keep enough provenance to find and purge compromised memory records.

What the evidence says about accuracy: real results from deployed triage agents

GitHub Security Lab’s taskflow agent discovered approximately 30 real-world vulnerabilities. The team also rejected roughly a fifth of results as false positives and more than half as low severity with very limited potential impact. Those outcomes describe a useful first pass. In September 2026, the lab extended the approach to Android applications through taskflows for entry-point discovery, vulnerability classification, and reporting. That extension shows the architecture can serve more than one platform.

What explains the remaining errors? The taskflow’s false positives were not fabricated findings, but plausible conclusions that could not be distinguished from true positives without runtime evidence. Uncertainty that persists after further code reading is an important limit for a deliberately narrow tool surface.

The Vulnerability Localization Benchmark, by Priyanshu et al., tests another difficult part of security reasoning across hundreds of repositories and more than a hundred CWE categories. The strongest evaluated system achieved a low File F1 score, and more than a third of tasks received no correct localization from any evaluated model. Within this benchmark, better localization was also an unreliable predictor of correct behavior after remediation. They show why locating code, classifying a finding, and confirming a fix should not be treated as interchangeable achievements.

The securestack-team implementation exposes a false-positive probability and an exploitability estimate with its recommendation, giving downstream decisions more information than a single severity label. High-confidence, high-severity findings warrant immediate attention, while low-confidence findings need review. Below-threshold findings can be dismissed with recorded reasons. Entering the remediation path, however, need not mean authorizing an unattended change.

Where to place the human in the loop and how to define that boundary

The review boundary determines both throughput and potential harm. An agent can accelerate a mistaken action as readily as a correct one, while broad access increases the consequences of compromise. Accountability also becomes less clear when no named analyst owns the decision. The “AI SOC + Human Ally” model addresses this by assigning detection, triage, and enrichment to the agent while leaving the last mile and escalation decision with an analyst.

GitHub Security Lab designed its taskflow agent to write a report that a human must verify before action, keeping it under supervision. A team building a triage pipeline can define a graduated boundary around that principle. Low-severity dismissals can be automated with a recorded rationale, and medium-risk findings can produce PR comments for developer review. An analyst should have to confirm high-risk or unclear findings before remediation. Uncertainty is not evidence that a finding is harmless.

Effective supervision needs more than the final score. Stage-level logs should let an analyst inspect which code was fetched, which permission checks were evaluated, and why the confidence judgment followed. An override should return to persistent memory with its reason, connecting review to future triage. An agent operating system makes this model practical at scale by surfacing those logs, managing escalation routing, and writing feedback back to memory.

Putting it together: a reference implementation checklist for teams starting from SARIF output

The ingestion component starts with the securestack-team normalization implementation. Parse the SARIF fields into a canonical record and deduplicate using a fingerprint built from rule ID, file path, and line range. Enforce secret suppression in code at this boundary. Gitleaks findings and other secret-scanner results must not reach the LLM, and their raw severity should be used directly without exposing secret values in outputs.

The taskflow component can follow the publicly available seclab-taskflow-agent and seclab-taskflows artifacts. Define collection, auditing, and reporting in YAML, and spell out how the collected context passes between stages. During auditing, test whether access controls, browser mitigations, or dead code paths suppress the reported vulnerability. The report should expose false-positive probability, exploitability, and a recommendation, following the securestack-team scoring constraint. Allow the model only to lower severity.

The MCP component should expose file fetching and code search through a minimal tool surface, following the lab’s triage baseline. Do not grant runtime or dynamic-analysis access for this pass. Validate server authentication before deployment and scan imported tools and skills before use. The memory component then follows the fuzzing taskflow’s SQLite pattern for within-run state. Store dismissal rationales externally, load relevant prior decisions at the start of later runs, and attach provenance and purge controls to every memory record.

The output component completes the implementation through the PR comment and triage.json artifacts demonstrated by securestack-team. Assign confirmed medium-risk findings to the code owner with the reasoning shown, and send high-risk or unclear findings to an analyst for review before remediation. Record below-threshold dismissals in memory, but send low-confidence judgments that are still unresolved for review so that uncertainty does not count as clearance. The runtime should handle scheduling, tool calls, and persistence across these components.

The value is contextual reasoning with an enforceable boundary. A scanner’s pattern becomes evidence to examine, and humans retain control where an incorrect decision would do the most harm.

Notes

  1. SkillSecurer: Detecting and Patching Prompt-Injection Vulnerabilities in AI Agent Skills

    Supplied the SKILLSECURER red/blue-agent approach and the finding of latent prompt-injection vulnerabilities in popular third-party skills.

  2. Vulnerability Localization Benchmark: Measuring Agentic Security Analysis at Repository Scale

    Provided the benchmark results showing that vulnerability localization remains hard and that better localization does not reliably predict correct remediation.

Tobias Wrenfield

← Back to Agent Runbook