Skip to main content

Scanning Basics

The squirex scan command runs all security rules against your Salesforce project metadata and outputs SARIF v2.1.0.


Basic Scanโ€‹

squirex scan -d ./force-app

SquireX discovers all supported metadata types under the directory recursively. On completion it prints a summary and the SARIF JSON to stdout.


Save to Fileโ€‹

squirex scan -d ./force-app --sarif results.sarif

The --sarif flag writes results to a file instead of stdout, which is required for CI/CD upload steps.


Run Specific Rulesโ€‹

# Single rule
squirex scan -d ./force-app --rules AGENTFORCE-1.1

# Comma-separated list
squirex scan -d ./force-app --rules AGENTFORCE-1.1,AGENTFORCE-9.1,AGENTFORCE-SC-01

Supported Metadata Typesโ€‹

FormatFile Extensions
Agent Scripts.agent
GenAiFunction.genAiFunction-meta.xml
GenAiPlugin.genAiPlugin-meta.xml
GenAiPlanner.genAiPlannerBundle-meta.xml
PromptTemplate.genAiPromptTemplate-meta.xml
PromptTemplateActv.genAiPromptTemplateActv-meta.xml
JSON Schemaschema.json
Apex Classes.cls
Flows.flow-meta.xml
AiEvaluationDefinition.aiEvaluationDefinition-meta.xml
Custom Field.field-meta.xml
Apex Trigger.trigger
LWC Component.js (in lwc/ dirs)
Connected App.connectedApp-meta.xml
Named Credential.namedCredential-meta.xml
MCP Server Config.mcp.json, .mcp-config.json
Agent Fabricagent-network.yaml, agent-network.yml
Project Configsfdx-project.json, package.xml

Scan Outputโ€‹

๐Ÿ” SquireX Agent Capability Scan Results
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Files scanned: 24
Rules evaluated: (all)
Duration: 340ms
Violations: 3
๐Ÿšจ Critical: 1
๐Ÿ”ด High: 2
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
โŒ SCAN FAILED โ€” 3 violation(s) found

Exit Codesโ€‹

CodeMeaning
0Scan passed โ€” no violations
1Scan failed โ€” violations found
2Scan error โ€” file discovery or parse failure

Use exit code 1 to block CI pipelines on violations.


Next Stepsโ€‹