SARIF Report Import
SARIF (Static Analysis Results Interchange Format) is the industry-standard format for exchanging static analysis results. Wisec supports SARIF v2.1.0 import, allowing you to bring findings from any compatible security scanner into your notarized build record.
Why Import SARIF Reports?
Wisec's built-in engine already scans your dependencies for CVEs and detects behavioral anomalies. SARIF import lets you go further by incorporating findings from your existing tools - code quality, container scanning, SAST - without replacing them.
Once imported, SARIF findings are:
- Included in the signed manifest (SHA-256 hash of the report is cryptographically anchored)
- Visible as anomalies in your Wisec dashboard
- Classified by severity (CRITICAL, HIGH, MEDIUM, LOW)
- Deduplicated by rule and file location
Supported Scanners
Any tool that outputs SARIF v2.1.0 is compatible:
| Tool | Category |
|---|---|
| CodeQL | SAST (GitHub Advanced Security) |
| Semgrep | SAST / Custom rules |
| Snyk | Dependency & code vulnerabilities |
| Trivy | Container & filesystem scanning |
| Checkov | Infrastructure as Code |
| ESLint (with SARIF reporter) | Code quality |
| Any SARIF v2.1.0 tool | - |
Setup
Set the WISEC_SCAN_REPORT_PATH environment variable to the path of your SARIF file before running the Wisec agent. The agent will automatically detect and process it.
export WISEC_SCAN_REPORT_PATH="/path/to/results.sarif"
./wisec-agent
Severity Mapping
Wisec maps SARIF severity to its own classification in this order:
-
CVSS
security-severityproperty (preferred when present):≥ 9.0→ CRITICAL≥ 7.0→ HIGH≥ 4.0→ MEDIUM< 4.0→ LOW
-
SARIF
levelfield (fallback):error→ HIGHwarning→ MEDIUMnote/info/none→ LOW
GitLab CI Example
stages:
- scan
- wisec
semgrep:
stage: scan
image: returntocorp/semgrep
script:
- semgrep --sarif --output $CI_PROJECT_DIR/results.sarif .
artifacts:
paths:
- results.sarif
run_wisec:
stage: wisec
image: alpine
before_script:
- apk add --no-cache git curl tar wget
- wget -q https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz -O gitleaks.tar.gz
- tar -xzf gitleaks.tar.gz gitleaks && chmod +x gitleaks && mv gitleaks /usr/local/bin/
- curl -fsSLO https://wisec-downloads.s3.fr-par.scw.cloud/wisec-agent-v1.5.0-linux-amd64
- curl -fsSL https://wisec-downloads.s3.fr-par.scw.cloud/wisec-agent-v1.5.0-linux-amd64.sha256 | sha256sum -c -
- mv wisec-agent-v1.5.0-linux-amd64 wisec-agent
- chmod +x wisec-agent
script:
- ./wisec-agent
variables:
WISEC_SCAN_REPORT_PATH: "$CI_PROJECT_DIR/results.sarif"
GitHub Actions Example
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Semgrep
run: semgrep --sarif --output results.sarif .
- name: Setup Wisec Agent
run: |
curl -fsSLO https://wisec-downloads.s3.fr-par.scw.cloud/wisec-agent-v1.5.0-linux-amd64
curl -fsSL https://wisec-downloads.s3.fr-par.scw.cloud/wisec-agent-v1.5.0-linux-amd64.sha256 | sha256sum -c -
mv wisec-agent-v1.5.0-linux-amd64 wisec-agent
chmod +x wisec-agent
wget -q https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz -O gitleaks.tar.gz
tar -xzf gitleaks.tar.gz gitleaks && chmod +x gitleaks && sudo mv gitleaks /usr/local/bin/
- name: Run Wisec Agent
env:
WISEC_PROJECT_ID: ${{ secrets.WISEC_PROJECT_ID }}
AGENT_PRIVATE_KEY_HEX: ${{ secrets.AGENT_PRIVATE_KEY_HEX }}
WISEC_API_ENDPOINT: ${{ secrets.WISEC_API_ENDPOINT }}
WISEC_SCAN_REPORT_PATH: "${{ github.workspace }}/results.sarif"
run: ./wisec-agent
What Appears in the Dashboard
Each SARIF finding becomes an anomaly entry in your build, showing:
- Rule ID (e.g.
javascript/sql-injection) - Message from the scanner
- File and line location
- Severity (mapped as described above)
- Source identified as the originating scanner tool
Findings are deduplicated by (ruleId, file URI) - running the same scanner twice on the same code will not create duplicate alerts.
Integrity Guarantee
The SARIF file itself is not stored by Wisec - only its SHA-256 hash is included in the signed manifest anchored to IPFS. This means:
- The report content stays in your infrastructure
- Its integrity is cryptographically provable via the Wisec public registry
- Any modification of the report after the build is detectable