Skip to main content

SARIF Output

SquireX emits SARIF v2.1.0 โ€” the industry standard for security analysis results. Compatible with GitHub Advanced Security, GitLab, VS Code SARIF Viewer, and any SARIF-aware tool.


Generate SARIFโ€‹

# Write to file
squirex scan -d ./force-app --sarif results.sarif

# PR-scoped SARIF
squirex scan-pr -d ./force-app --base main --sarif results.sarif

Output Schemaโ€‹

{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [{
"tool": {
"driver": {
"name": "SquireX",
"version": "4.0.0",
"informationUri": "https://squirex.dev",
"rules": [...]
}
},
"results": [{
"ruleId": "AGENTFORCE-1.1",
"level": "error",
"message": {
"text": "GenAiFunction 'Submit_Case' invokes Apex target without requiresConfirmation: true"
},
"locations": [{
"physicalLocation": {
"artifactLocation": { "uri": "Submit_Case.genAiFunction-meta.xml" },
"region": { "startLine": 12 }
}
}]
}]
}]
}

Vulnerability Chainsโ€‹

When the chaining engine composes multiple findings into a reachable, trust-boundary-crossing attack path, every constituent finding is kept as its own result and a synthesized chain result is added. If the chain ends at a finding that is already reported (same rule, file and line), the chain is attached to that finding instead of being emitted separately: its message gains "This finding is also the end of a vulnerability chain: โ€ฆ", its severity is raised to the chain's, and it carries the chain properties below. Duplicate chains that end at the same place are folded into one.

{
"level": "error",
"message": { "text": "Vulnerability chain: 3 findings on a reachable path that crosses a trust boundary into an external-callout sink compose to critical severity." },
"relatedLocations": [
{ "physicalLocation": { "artifactLocation": { "uri": "FindingA.cls" } } },
{ "physicalLocation": { "artifactLocation": { "uri": "FindingB.cls" } } }
],
"properties": {
"chain": ["AgentEntry", "ChokeNode", "Sink"],
"chokePoint": "ChokeNode",
"constituentRuleIds": ["AGENTFORCE-1.1", "AGENTFORCE-7.2", "AGENTFORCE-12.3"]
}
}
  • relatedLocations makes the full path navigable in GitHub Advanced Security and the VS Code viewer.
  • properties.chokePoint is the single node to remediate first โ€” the CI-Native Agent targets it for the highest-leverage fix.

Folded and Merged Findingsโ€‹

To keep reports short without hiding anything, the engine folds and merges repeated findings. Every occurrence stays in the SARIF.

Folding (one finding per rule per repository). All findings of these hygiene rules, and the low/info findings of any rule, are folded into a single result at the most severe occurrence:

AGENTFORCE-7.1, AGENTFORCE-7.2, AGENTFORCE-7.3, AGENTFORCE-12.2, AGENTFORCE-15.1, AGENTFORCE-16.1, AGENTFORCE-23.1, AGENTFORCE-SC-01, SNOW-7.1, SNOW-12.1, SNOW-23.1, AGENTCFG-04

Medium-and-above findings of security rules are never folded. A folded result's message gives the count and the first locations, and it carries every other occurrence:

{
"ruleId": "AGENTFORCE-7.3",
"level": "note",
"relatedLocations": [ { "physicalLocation": { "artifactLocation": { "uri": "โ€ฆ/Billing.bot-meta.xml" } } } ],
"properties": {
"foldedCount": 5,
"foldedFindings": [
{ "ruleId": "AGENTFORCE-7.3", "severity": "low", "uri": "โ€ฆ/Billing.bot-meta.xml", "startLine": 1, "message": "โ€ฆ" }
]
}
}

foldedCount includes the primary result, so it is one more than the length of foldedFindings.

Cross-rule merges (one finding per asset). Some rules look at the same weakness from different angles. Within each group below, findings on the same asset collapse into the most severe one, and the other rule IDs are listed in properties.mergedRuleIds and named in the message:

GroupRules
Unconfirmed side effectAGENTFORCE-1.1, AGENTFORCE-FLOW-02
Record access without sharingAGENTFORCE-26.1, AGENTFORCE-APEX-02, AGENTFORCE-FLOW-01, AGENTFORCE-1.3, AGENTFORCE-25.6
FLS on writesAGENTFORCE-20.1, AGENTFORCE-APEX-01
Entry-point access (same line)AGENTFORCE-APEX-02, AGENTFORCE-APEX-01
Coding-agent settings fileAGENTCFG-01 โ€ฆ AGENTCFG-04
API version driftAGENTFORCE-12.2, AGENTFORCE-SC-01
Committed secret (same line)AGENTFORCE-SEC-01, AGENTFORCE-3.1, AGENTFORCE-MULE-01, AGENTFORCE-MCP-09, AGENTFORCE-SEC-05

Tool Notificationsโ€‹

Problems that are not findings are reported in runs[0].invocations[0].toolExecutionNotifications:

DescriptorLevelMeaning
SQUIREX-PARSEwarningA discovered file could not be parsed, so it was not analysed. squirex scan --strict exits 3 when any are present.
SQUIREX-LINKwarningA reference could not be resolved (for example an agent action pointing at a Flow that is not in the repository), so rules that follow that link did not run on it.

Rule Descriptorsโ€‹

tool.driver.rules lists every registered rule (154), plus a descriptor for any extra rule ID that appears in the results, such as a ServiceNow sub-check (SNOW-28.2). Each descriptor's helpUri is https://squirex.dev/rules/<ruleId>, which redirects to that rule's page under /docs/rules. Sub-check IDs have no page of their own: their helpUri redirects to the Sub-checks section of the parent rule's page (for example https://squirex.dev/rules/SNOW-28.2 opens SNOW-28.1). The 14 sub-check IDs are listed in mcp-server/src/generated/rules-subchecks.json.


Severity Mappingโ€‹

SquireX SeveritySARIF level
Criticalerror
Higherror
Mediumwarning
Lownote

GitHub Advanced Security Uploadโ€‹

- name: Upload SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
category: agentforce-capability
tip

SARIF uploads require permissions: security-events: write (plus actions: read on private repos) in your workflow, and code scanning / GitHub Advanced Security enabled on the repository.


VS Code Local Viewerโ€‹

Install the SARIF Viewer extension and open results.sarif directly.