Garak (LLM vulnerability scanner) | DefectDojo Documentation

Garak (LLM vulnerability scanner)

Input Type

This parser imports the JSON Lines hit log produced by garak, NVIDIA’s LLM vulnerability scanner.

A garak run writes garak.<run_id>.hitlog.jsonl alongside its report.jsonl. Every line in the hit log is, by construction, a detector hit, so each record is mapped to a DefectDojo Finding. Upload the *.hitlog.jsonl file (not report.jsonl).

Tested against the garak 0.15.x hit-log schema (garak/evaluators/base.py).

Things to note about the Garak parser

JSON Lines Format

The parser accepts a .jsonl hit log. Each line is one hit record with fields including goal, prompt, output, triggers, score, probe, detector, and generator. The prompt and output values are serialized garak conversation/message objects (nested dicts), from which the parser extracts the displayed text.

Sample Scan Data

Sample scan data for testing purposes can be found here.

Deduplication

The “Garak Scan” scan type uses the hash_code deduplication algorithm with the following fields:

description and severity are intentionally excluded from the hashcode. description holds the specific prompt and model output for the hit, which garak samples non-deterministically on each run. severity is an aggregate value — the most severe rung seen across a probe’s occurrences — so it shifts as the occurrence set changes between scans. Including either would stop the same weakness from deduplicating across repeated scans of the same model.