export
The export action writes remaining issues to a file for external use or handoff.
Request
Section titled “Request”{ "action": "export", "format": "json", "path": "remaining-issues.json"}Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
format | string | No | Output format: "json" or "list" (default: "json") |
path | string | No | Output file path (default: sheriff-export-{yyyyMMdd-HHmmss}.json) |
scope | object | No | Filter which issues to export |
Response
Section titled “Response”{ "path": "/home/user/project/remaining-issues.json", "format": "json", "count": 19}Response Fields
Section titled “Response Fields”| Field | Description |
|---|---|
path | Path where file was written |
format | Format used |
count | Number of issues exported |
scope | Applied scope filter (present when scope was specified) |
Format Options
Section titled “Format Options”JSON Format
Section titled “JSON Format”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) {" } ]}List Format
Section titled “List Format”Simple text list for human review:
{"action": "export", "format": "list", "path": "issues.txt"}Output file:
Service.java:45:12 [ConstantValue] Condition is always trueService.java:67:8 [unused] Private field never usedRepository.java:23:5 [DataFlowIssue] Possible null pointerUse Cases
Section titled “Use Cases”Handoff to Another Agent
Section titled “Handoff to Another Agent”Export remaining issues for a different agent or session:
{"action": "export", "format": "json", "path": "handoff.json"}Create Review List
Section titled “Create Review List”Export for human review before fixing:
{"action": "export", "format": "list", "path": "review.txt"}Export Specific Category
Section titled “Export Specific Category”Export only high-severity issues:
{ "action": "export", "format": "json", "path": "critical.json", "scope": {"severity": "High"}}Error Cases
Section titled “Error Cases”| Error Code | Cause | Solution |
|---|---|---|
SARIF_NOT_LOADED | No SARIF file has been loaded | Call load first |
INVALID_SCOPE | Invalid scope filter | Check severity is High, Moderate, or Low |
NO_ISSUES | No remaining issues to export | All issues are already fixed or skipped |
INVALID_PATH | Output path is invalid or outside working directory | Use a relative path within the project |
INVALID_FORMAT | Format is not json or list | Use "json" or "list" |
DB_ERROR | Database error occurred | Check .sheriff/ directory permissions |
IO_ERROR | Failed to write export file | Check file system permissions |
Security
Section titled “Security”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