SARIF results with an LLM
SARIF results, reviewed with a model
Use orca-zero-1.5-cybersecurity at https://api.pentestllm.ai/v1 to summarize redacted SARIF from an authorized static-analysis run while keeping the tool’s results apart from the findings an analyst has confirmed. The run is finished and inside scope, your script reads the file, groups results by rule and location and sends only those grouped facts, the model returns short summaries bound to a schema, and a person decides which results become findings.
from openai import OpenAI client = OpenAI(base_url="https://api.pentestllm.ai/v1", api_key="sk-ptl-live-…") reply = client.chat.completions.create( model="auto/security", messages=[{"role": "user", "content": "Explain this advisory and list what to check on an affected host."}],)print(reply.model) # the build that answeredprint(reply.choices[0].message.content)Start after the analyzer has finished
For a downstream job that preserves the scanner gate, use CI security report review after this extraction step.
Everything on this page happens once the SARIF file exists. A static analyzer such as CodeQL, Semgrep or a vendor scanner ran against source the client handed over under a signed engagement, and it wrote its results in the SARIF 2.1.0 format most tools now share. The model never runs the analyzer, never clones a repository and never fetches a dependency; it is given text and gives text back. Keep the rules of engagement beside the file, because a monorepo often contains code the scope does not cover, and those results must be cut before anything is sent.
The same discipline applies to the JSONL that Nuclei writes, and the Nuclei JSONL review guide walks that format in code. SARIF is a different shape, a single JSON document with nested runs rather than one object per line, so the loading step differs even though the review rules are identical.
What a SARIF result carries
A SARIF log has a runs array, and each run usually holds a tool.driver block that describes the analyzer and lists its rules, plus a results array. A typical result names its rule through ruleId, carries a level of error, warning, note or none, a message whose text is given directly or by reference, and locations, each commonly with a physicalLocation that points to an artifactLocation.uri and a region with a startLine. Many tools add partialFingerprints or fingerprints, the tool’s own way of correlating a result across runs, and baselineState, which says whether a result is new, unchanged, updated or absent compared with a baseline. Nearly all of these properties are optional in the OASIS specification read on the date below, so check them against a result from your own tool’s version before your loader depends on one.
The three fields that matter for review are the rule, the location and the fingerprint. The rule says which check fired, the location says where, and the fingerprint is the tool’s hint that a result in this run corresponds to one in the last, a hint your script treats as a correlation aid rather than proof. The level is the tool author’s opinion of severity and is not the engagement’s rating.
Group by rule and file in your own code
Do not ask the model to deduplicate. A model will sometimes merge two different weaknesses because their messages read alike, or split one weakness across several files into several issues. Group in your script instead, with a key you can explain to a reviewer: the ruleId and the file path, with the line numbers of every location kept inside the group. Three hundred instances of one rule in one file become a single group with three hundred line references, and the same rule in another file stays separate, since another file may have another owner.
Give each group a stable id of your own, such as S014, and send that id with the rule’s short description, the file, the count and a sample of the tool’s message text. The id is what ties the model’s summary back to the lines that caused it.
Redact paths and snippets first
SARIF results often embed a snippet of the source at the location, and the file paths usually carry the client’s repository and product names. Strip the snippets unless a group genuinely needs one, and replace identifying path segments with placeholders your script keeps a map for. Then turn on the gateway’s redaction setting so a secret that survives in a message string is swapped for a placeholder before the request leaves. That setting is a second net; the trimming is yours to do first.
Ask for summaries bound to a schema
Send the groups as a JSON array and ask for one plain summary per group id, plus a short note on what an analyst should open to decide whether the result is real. Pin the reply with a json_schema response format so it comes back as an array of objects with exactly those keys; orca-zero-1.5-cybersecurity lists response_format among its supported parameters on the live catalog and takes a long file in one request. Tell the model in the system prompt that each group is an unconfirmed static-analysis result, that it must not call anything confirmed, and that it must not add a rule, a file or a severity of its own.
Cost is in usage.cost on the reply, and the request id sits in the response headers if you need to raise a question about a specific call. Check the pricing page for the per-token rates of the security builds before a large batch.
Check the reply against what you sent
A reply that validates against the schema has the right shape, which is not the same as being right. Run three checks in code: every group id you sent came back exactly once, no summary uses the word confirmed, and no file or rule appears in the text that was not in the group it summarizes. A summary that fails any check is dropped and the group is sent again. The severity, the file and the line numbers in your review file always come from the SARIF, never from the model’s prose.
Two lists: tool results and findings
The review file is a work queue, not a report. Each group stays a tool result until a named analyst opens the code, decides whether the weakness is real and reachable, and records a verdict of confirmed, false positive or out of scope with their name beside it. Only confirmed entries cross into the findings list, where they get a severity the analyst sets rather than the tool’s level, and from there into the report. The vulnerability triage page covers ordering the confirmed ones; the rejected groups stay in the work papers with their line references so the reasoning can be shown later.
16 security builds, priced per token
USD per million tokens, live on 2026-11-27; auto/security bills at the build that answers.
Detected refusals and invalid non-streamed JSON qualify for automatic refunds within the daily cap. Verify your receipt.
| Wire formats | |||||
|---|---|---|---|---|---|
| Qwen3.8 27B Cybersecurity | Security | $0.40 | $2.40 | 262K | |
| Uncensored Qwen3.8 27b Cybersecurity | Security | $0.40 | $2.40 | 262K | |
| Gemma 4 26B A4B Cybersecurity | Security | $0.4224 | $1.3376 | 262K | |
| Gemma 4 26B A4B Cybersecurity (Uncensored) | Security | $0.48 | $1.52 | 262K | |
| GLM-5.3 Flash Cybersecurity | Security | $0.4935 | $1.645 | 1049K | |
| GLM-5.3 Flash Cybersecurity (Uncensored) | Security | $0.5093 | $1.6975 | 1049K | |
| Red Team (Flash) | Security | $0.90 | $3.00 | 1000K | |
| Red Team (Pro) | Security | $1.50 | $6.00 | – | |
| OrcaCyber MiniMax M3.1 Flash | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber MiniMax M3.1 Flash (Uncensored) | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber Qwen3.8 Flash Next (Uncensored) | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber Qwen3.8 Flash Next | Security | $2.00 | $4.00 | 262K | |
| Uncensored Qwen3.8 Flash Next Cybersecurity | Security | $2.00 | $4.00 | 262K | |
| Cyber Frontier | Security | $5.25 | $15.75 | 1049K | |
| OrcaCyber Zero 1.5 | Security | $7.50 | $18.75 | 999K | |
| OrcaCyber Zero 1.5 (Uncensored) | Security | $7.50 | $18.75 | 999K |
Questions
Which SARIF fields preserve provenance?
ruleId ties a result to the check that produced it, locations with artifactLocation.uri and region.startLine say where it is, and partialFingerprints or fingerprints are the tool’s aid for correlating a result across runs. Keep all three in your groups so every sentence in the review traces back to a location in the file.
How do I keep a tool result separate from a confirmed finding?
Keep two lists in your own file. A group stays a tool result, with the model’s summary attached, until an analyst records a verdict and their name. Only entries marked confirmed move to the findings list, and the severity on that list is the one the analyst set, not the tool’s level.
Who confirms a result?
A named analyst on the engagement, by opening the code and deciding whether the weakness is real and reachable. The model writes summaries of unconfirmed results and is told not to call anything confirmed; it has no view of the code beyond the grouped facts you sent.
Does the model run the static analyzer?
No. The analyzer ran earlier, under the engagement, and wrote the SARIF file. The model receives the grouped, redacted facts from that file and answers in text, with no tools, no repository access and no network.