Skip to content

export

The export action writes remaining issues to a file for external use or handoff.

{
"action": "export",
"format": "json",
"path": "remaining-issues.json"
}
ParameterTypeRequiredDescription
formatstringNoOutput format: "json" or "list" (default: "json")
pathstringNoOutput file path (default: sheriff-export-{yyyyMMdd-HHmmss}.json)
scopeobjectNoFilter which issues to export
{
"path": "/home/user/project/remaining-issues.json",
"format": "json",
"count": 19
}
FieldDescription
pathPath where file was written
formatFormat used
countNumber of issues exported
scopeApplied scope filter (present when scope was specified)

Full structured data for programmatic use:

{"action": "export", "format": "json", "path": "issues.json"}

Output file:

{
"source": "qodana.sarif.json",
"exportedAt": "2026-03-01T10:30:00",
"count": 19,
"issues": [
{
"fingerprint": "88d32cab35478753",
"rule": "ConstantValue",
"file": "Service.java",
"line": 45,
"column": 12,
"message": "Condition is always true",
"severity": "High",
"snippet": "if (value != null) {"
}
]
}

Simple text list for human review:

{"action": "export", "format": "list", "path": "issues.txt"}

Output file:

Service.java:45:12 [ConstantValue] Condition is always true
Service.java:67:8 [unused] Private field never used
Repository.java:23:5 [DataFlowIssue] Possible null pointer

Export remaining issues for a different agent or session:

{"action": "export", "format": "json", "path": "handoff.json"}

Export for human review before fixing:

{"action": "export", "format": "list", "path": "review.txt"}

Export only high-severity issues:

{
"action": "export",
"format": "json",
"path": "critical.json",
"scope": {"severity": "High"}
}
Error CodeCauseSolution
SARIF_NOT_LOADEDNo SARIF file has been loadedCall load first
INVALID_SCOPEInvalid scope filterCheck severity is High, Moderate, or Low
NO_ISSUESNo remaining issues to exportAll issues are already fixed or skipped
INVALID_PATHOutput path is invalid or outside working directoryUse a relative path within the project
INVALID_FORMATFormat is not json or listUse "json" or "list"
DB_ERRORDatabase error occurredCheck .sheriff/ directory permissions
IO_ERRORFailed to write export fileCheck file system permissions

Sheriff validates the export path to prevent directory traversal attacks:

  • Paths with .. are rejected
  • All absolute paths are rejected; only relative paths within the working directory are allowed