Skip to content

load

The load action parses a SARIF file and stores issues in Sheriff’s database. This is typically the first action in any session.

{
"action": "load",
"target": "path/to/results.sarif"
}
ParameterTypeRequiredDescription
targetstringYesPath to a SARIF file or directory containing SARIF files (directories are scanned up to 2 levels deep)
{
"file": "qodana.sarif.json",
"total": 136,
"sev": {"H": 104, "M": 32},
"rules": {"ConstantValue": 22, "unused": 15, "...": "..."},
"files": 23,
"prior": {"fixed": 10, "skip": 2}
}
FieldDescription
fileSARIF file path, or target directory path when loading multiple files
totalTotal number of issues
sevBreakdown by severity (H=High, M=Moderate, L=Low)
rulesCount per rule ID (top 10 by count)
filesNumber of unique files with issues
priorPreviously marked issues (from prior sessions)

When loading a new SARIF file (different content hash):

  • All issues are parsed and stored
  • Prior progress counts are captured for the response, then the database is reset
  • New session starts with all issues in “pending” state

When loading the same SARIF file again:

  • Existing progress is preserved
  • prior shows how many issues were already marked
  • Useful after session restart or context compaction
{"action": "load", "target": "build/qodana/qodana.sarif.json"}
{"action": "load", "target": "/home/user/project/results.sarif"}
{
"file": "qodana.sarif.json",
"total": 136,
"sev": {"H": 104, "M": 32},
"rules": {
"ConstantValue": 22,
"unused": 15,
"DataFlowIssue": 12,
"NullableProblems": 8
},
"files": 23,
"prior": {"fixed": 0, "skip": 0}
}
Error CodeCauseSolution
INVALID_TARGETTarget path is null, empty, or blankProvide a valid file or directory path
SARIF_NOT_FOUNDNo SARIF files found at pathCheck the file path exists and contains .sarif or .sarif.json files
SARIF_PARSE_ERRORFile isn’t valid SARIF JSONVerify your static analysis tool output
DB_ERRORDatabase error occurredCheck .sheriff/ directory permissions