Reviewing Nuclei JSONL results with a model, without promoting matches to findings

Summarize redacted Nuclei JSONL from an authorized scan with a model: group duplicates in code, keep provenance, and let a named analyst confirm each finding.

Steps checked November 21, 2026 · prices as of November 27, 2026

Use auto/security at https://api.pentestllm.ai/v1 to summarize redacted Nuclei JSONL while keeping scanner matches separate from analyst-confirmed findings. The scan is already done, authorized in writing and within the signed scope. Your script trims each line, groups duplicates, and sends only the grouped facts. The model writes short summaries. A person on the engagement decides which matches become findings in the report.

Start from a finished, authorized scan

This guide begins after the scan. You hold a JSONL file from a run the client approved in writing, against targets listed in the signed scope. Nothing here runs Nuclei, writes templates or touches a target. The model receives text and returns text. It has no tools and cannot reach the network on your behalf.

If you are still writing templates, that is a different job, covered on AI Nuclei template generation. Keep the rules of engagement next to the file, because the summary should never mention a host that the scope does not.

What one result line carries

Nuclei writes one JSON object per match when output is set to JSONL (the -jsonl flag, or -jsonl-export to a file). The field names below come from the output struct in the Nuclei repository, read 21 November 2026; they are an illustrative guide to adapt, so confirm them against a result line from your own version. The ones that matter for review:

  • template-id and info.name: which check produced the match.
  • info.severity: the severity the template author assigned. It is not your rating.
  • host, matched-at, type: where the match happened and over which protocol.
  • matcher-name and extractor-name: which condition inside the template fired.
  • extracted-results: values the template pulled from the response.
  • timestamp: when the match was recorded.
  • request, response, curl-command: raw traffic for the match.

Raw request and response pairs are included by default. The Nuclei running docs list -omit-raw as the switch that leaves them out of JSON and JSONL output, with the config default omit-raw: false. So assume your file holds full HTTP bodies, cookies and headers unless you know it was written with that flag.

Trim each line before it leaves your machine

Most of a result line is not needed for a summary, and the raw traffic is the riskiest part. Keep the provenance fields, drop the rest, and record the source line number so every later claim points back to the file.

python
1import json
2
3KEEP = ("template-id", "matcher-name", "extractor-name", "type",
4 "host", "matched-at", "timestamp")
5
6def load(path):
7 rows = []
8 with open(path, encoding="utf-8") as f:
9 for n, line in enumerate(f, 1):
10 if not line.strip():
11 continue
12 r = json.loads(line)
13 info = r.get("info") or {}
14 row = {k: r.get(k) for k in KEEP}
15 row.update(line=n, name=info.get("name"),
16 severity=info.get("severity"),
17 extracted_count=len(r.get("extracted-results") or []))
18 rows.append(row)
19 return rows

Only a count of extracted values survives, not the values. If host names identify the client, swap them for labels such as host-03 before sending and keep that map on your side. Then turn on redaction for the key or the request, as described on files and redaction. It replaces secrets in message text with placeholders such as [[SECRET_1]] before the request is forwarded, and an option covers personal values too. It is a second net for a token left in a matched-at URL, not a replacement for trimming.

Group duplicates in code, not in the prompt

A model asked to deduplicate will sometimes merge two different issues or split one. Do the grouping yourself, with a key you can explain to a reviewer: template, matcher and host.

python
1from collections import defaultdict
2
3def group(rows):
4 buckets = defaultdict(list)
5 for r in rows:
6 buckets[(r["template-id"], r["matcher-name"] or "", r["host"] or "")].append(r)
7 groups = []
8 for i, ((tid, matcher, host), items) in enumerate(sorted(buckets.items()), 1):
9 groups.append({
10 "group_id": f"G{i:03d}", "template_id": tid, "matcher": matcher,
11 "host": host, "name": items[0]["name"],
12 "severity": items[0]["severity"],
13 "matched_at": sorted({x["matched-at"] for x in items if x["matched-at"]}),
14 "lines": [x["line"] for x in items],
15 "first_seen": min(x["timestamp"] for x in items),
16 })
17 return groups

Forty identical hits on one host become one group with forty line numbers. The same template on two hosts stays as two groups, because each host may have a different owner and a different fix.

Ask for summaries bound to a schema

Send the groups and ask for one summary per group_id. With a json_schema response format the answer is billed only if it matches the schema, and a miss on a non-streamed request is retried once with the missed answer free. The call below is an example to adapt: make one request first and confirm the reply parses, and see pricing for rates.

python
1import os
2from openai import OpenAI
3
4SCHEMA = {"type": "object", "required": ["groups"], "additionalProperties": False,
5 "properties": {"groups": {"type": "array", "items": {
6 "type": "object", "additionalProperties": False,
7 "required": ["group_id", "summary", "analyst_check"],
8 "properties": {"group_id": {"type": "string"},
9 "summary": {"type": "string"},
10 "analyst_check": {"type": "string"}}}}}}
11
12SYSTEM = ("Each group is an unconfirmed scanner match from an authorized scan. "
13 "Write one plain summary per group_id using only the fields given. "
14 "Never call a match confirmed. Add no hosts, CVEs or severities. "
15 "Give no exploitation steps. In analyst_check, name the records "
16 "the analyst should compare before deciding.")
17
18client = OpenAI(api_key=os.environ["PENTESTLLM_API_KEY"],
19 base_url="https://api.pentestllm.ai/v1")
20groups = group(load("scan.jsonl"))
21resp = client.chat.completions.create(
22 model="auto/security",
23 response_format={"type": "json_schema",
24 "json_schema": {"name": "nuclei_review", "schema": SCHEMA}},
25 messages=[{"role": "system", "content": SYSTEM},
26 {"role": "user", "content": json.dumps(groups)}])
27out = json.loads(resp.choices[0].message.content)

Get a key at the console. Other client libraries are listed on SDKs.

Check the answer before anyone reads it

A schema match proves shape, not truth. Run three checks: every group came back exactly once, no summary claims confirmation, and the facts still come from your code.

python
1import re
2
3sent = sorted(g["group_id"] for g in groups)
4got = sorted(g["group_id"] for g in out["groups"])
5assert got == sent, "model dropped, added or repeated a group"
6for g in out["groups"]:
7 assert not re.search(r"(?<!un)confirmed", g["summary"], re.I), g["group_id"]
8
9by_id = {g["group_id"]: g for g in out["groups"]}
10for g in groups:
11 g.update(summary=by_id[g["group_id"]]["summary"],
12 analyst_check=by_id[g["group_id"]]["analyst_check"],
13 status="scanner match", verdict=None, analyst=None)
14json.dump(groups, open("review.json", "w"), indent=2)

Host, severity and line numbers in review.json come from the scan file, never from the model’s text.

Keep two lists: matches and findings

review.json is a work queue. Each entry stays a scanner match until a named analyst sets verdict to confirmed, false positive or out of scope, and fills in analyst. Only confirmed entries move into the findings list. The analyst also sets the final severity, using the CVSS calculator rather than the template’s label.

From there the confirmed findings go into the normal reporting flow described in pentest report writing. Matches the analyst rejected stay in the work papers with their line numbers, so a client who asks why something is missing gets a clear answer. For deciding which confirmed issues to fix first, see vulnerability triage. All of this assumes testing within the acceptable use policy.

Questions

Which Nuclei fields preserve provenance?

template-id, matcher-name and extractor-name tie a match to the exact check that fired. host, matched-at and timestamp say where and when. Add the source line number yourself, and carry it through every step so any sentence in the report traces back to one line of the original file.

How should duplicate matches be grouped?

Group in your script, not in the prompt, using a key of template, matcher and host. Keep every line number inside the group so nothing is lost. Split groups by host, since separate hosts often have separate owners and fixes.

Who confirms a match?

A named analyst on the engagement, never the model. The model only writes summaries of unconfirmed matches. The analyst checks each one against their own evidence, records a verdict and their name, and only then does it appear as a finding.

Model list · Pricing · Families

Get a keyPrepaid from $3, no subscription.

New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.

Join on TelegramHelp