agent report builder failed on nuclei severity field missing from template output
Fixes agent report builders that crash when a nuclei template omits the severity field, because the builder assumes every finding carries one. Use when your report step throws a missing-key error on nuclei JSONL that parsed fine. Not for nuclei scan failures or template compile errors.
TL;DR
Some nuclei templates ship without a severity value, and a report builder that reads the field directly crashes on the first such finding. Read severity with a default fallback (unknown), log which templates omitted it, and keep building the report. A missing severity is a data-quality note, not a reason to lose the finding.
agent report builder failed on nuclei severity field missing from template outputUse this when
- Your report builder throws a missing-key or null-reference error on nuclei JSONL output.
- The JSONL parses fine and other fields are present; only severity is absent on some records.
- You aggregate nuclei findings into client reports automatically.
Not for this skill when
- Nuclei itself failed to run or produced no output. That is a scan issue, not a builder issue.
- The template failed to compile. Fix the template; the builder is not the problem.
- You are scanning targets outside your authorized scope. Stop.
Steps
- Reproduce with the failing record: read one JSONL line missing severity and confirm the builder throws on it. Verify: you can point to the exact field access that fails.
- Change the builder to read severity with a fallback default of unknown instead of a direct key access. Verify: the previously failing record now builds without error.
- Log every finding that used the fallback, with its template id. Verify: the log lists each affected template exactly once per run.
- Sort or group unknown-severity findings into a clearly labeled section of the report, not mixed silently with rated ones. Verify: a reader can tell which findings lack a severity rating.
- Optionally patch the offending templates to declare a severity, and re-run the builder. Verify: the fallback log is empty on the next run.
Variant phrasings
nuclei template missing severity field
Common phrasing.
report builder crashes on nuclei jsonl null severity
Symptom-level search.
handle unknown severity in nuclei findings
Workflow phrasing.
Compatibility: Nuclei 3.x JSONL output. Template metadata fields vary by template author.
Why it happens
Nuclei's template schema does not enforce severity, and community templates sometimes omit it. Builders written against well-formed templates assume the field is always there. The first community template without it crashes the whole report.
Edge cases / pitfalls
- Do not default missing severity to a real rating like low. Unknown is honest; a guessed rating corrupts prioritization.
- Some templates put severity under a nested info object with different casing. Normalize the lookup across both shapes before falling back.
- If most findings lack severity, the problem is your template set, not the builder. Audit the templates.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_aifSIXEXQWX-NCwyonBviw