Integration
CI/CD Integration
Gate deployments on Sigil scan results. Block PRs that introduce risky dependencies. Automated supply chain security in every pipeline.
GitHub Actions
Add Sigil to any GitHub Actions workflow. Scans run on every push or pull request and block merges when findings exceed your threshold.
Basic setup
1name: Sigil Security Scan2on:3 pull_request:4 push:5 branches: [main]67jobs:8 sigil:9 runs-on: ubuntu-latest10 steps:11 - uses: actions/checkout@v41213 - name: Run Sigil scan14 uses: NOMARJ/sigil@main15 with:16 path: "."17 threshold: medium18 fail-on-findings: true
Inputs
| Input | Default | Description |
|---|---|---|
| path | . | Directory to scan |
| threshold | medium | Minimum verdict level to trigger a failure |
| fail-on-findings | true | Exit with non-zero code when findings exceed threshold |
| format | text | Output format: text, json, sarif |
| phases | all | Comma-separated list of phases to run, or all |
| upload-sarif | false | Upload SARIF results to GitHub Code Scanning |
| sigil-token | — | API token for cloud threat intelligence (Pro/Team) |
Outputs
| Output | Description |
|---|---|
| verdict | Scan verdict: low, medium, high, critical |
| score | Numeric risk score |
| findings-count | Total number of findings detected |
| report-path | Path to the generated report file |
SARIF upload
Enable upload-sarif to push results to GitHub Code Scanning. Findings appear as inline annotations on pull requests.
1name: Sigil Security Scan2on:3 pull_request:4 push:5 branches: [main]67jobs:8 sigil:9 runs-on: ubuntu-latest10 steps:11 - uses: actions/checkout@v41213 - name: Run Sigil scan14 uses: NOMARJ/sigil@main15 with:16 path: "."17 threshold: medium18 fail-on-findings: true19 upload-sarif: true
Scan only changed files
Speed up PR scans by only analyzing files that changed in the pull request.
1name: Sigil Diff Scan2on:3 pull_request:45jobs:6 sigil:7 runs-on: ubuntu-latest8 steps:9 - uses: actions/checkout@v410 with:11 fetch-depth: 01213 - name: Get changed files14 id: changed15 run: |16 echo "files=$(git diff --name-only origin/${GITHUB_BASE_REF} HEAD | tr '\n' ',')" >> $GITHUB_OUTPUT1718 - name: Run Sigil scan on changed files19 uses: NOMARJ/sigil@main20 with:21 path: ${{ steps.changed.outputs.files }}22 threshold: medium23 fail-on-findings: true
Block merge on high-risk
Add the Sigil scan as a required status check in your branch protection rules. PRs cannot merge until the scan passes.
sigil) as a required status check. PRs with HIGH or CRITICAL findings will be blocked from merging.Authenticated scans
Pass your Sigil API token for cloud threat intelligence lookups (Pro and Team plans).
1- name: Run Sigil scan2 uses: NOMARJ/sigil@main3 with:4 path: "."5 threshold: medium6 fail-on-findings: true7 sigil-token: ${{ secrets.SIGIL_TOKEN }}
GitLab CI
Include the remote Sigil template to add scanning to any GitLab pipeline. Scan results are stored as job artifacts.
Basic setup
1include:2 - remote: "https://raw.githubusercontent.com/NOMARJ/sigil/main/.gitlab/sigil.yml"34sigil-scan:5 stage: test6 variables:7 SIGIL_SCAN_PATH: "."8 SIGIL_THRESHOLD: "medium"9 SIGIL_FAIL_ON_FINDINGS: "true"10 SIGIL_FORMAT: "json"11 artifacts:12 paths:13 - sigil-report.json14 when: always
Variables
| Variable | Default | Description |
|---|---|---|
| SIGIL_SCAN_PATH | . | Directory to scan |
| SIGIL_THRESHOLD | medium | Minimum verdict level to trigger a failure |
| SIGIL_FAIL_ON_FINDINGS | true | Exit with non-zero code when findings exceed threshold |
| SIGIL_FORMAT | text | Output format: text, json, sarif |
| SIGIL_TOKEN | — | API token for cloud threat intelligence (Pro/Team) |
Generic CI/CD
Sigil works in any CI environment that can run shell commands — Jenkins, CircleCI, Bitbucket Pipelines, or anything else. Three steps: install, scan, gate.
1. Install
# Install via shell script
curl -sSL https://sigilsec.ai/install.sh | sh
# Or pull the Docker image
docker pull ghcr.io/nomarj/sigil:latest2. Run scan
sigil scan . --format json > sigil-report.json3. Exit codes
Use exit codes to gate pipeline stages. Each verdict maps to a specific exit code.
| Exit Code | Verdict | Pipeline Action |
|---|---|---|
| 0 | LOW RISK | Pipeline passes |
| 4 | LOW RISK | Pass with warning |
| 3 | MEDIUM RISK | Pass or fail (configurable) |
| 2 | HIGH RISK | Fail pipeline |
| 1 | CRITICAL RISK | Fail pipeline |
Exit code gate script
sigil scan . --format json > sigil-report.json
EXIT_CODE=$?
if [ $EXIT_CODE -ge 2 ]; then
echo "Sigil detected HIGH or CRITICAL findings. Failing pipeline."
exit 1
fi
echo "Scan passed (exit code: $EXIT_CODE)"
exit 0Jenkins
Declarative pipeline example with Sigil scan and artifact archiving.
1pipeline {2 agent any34 stages {5 stage('Checkout') {6 steps {7 checkout scm8 }9 }10 stage('Install Sigil') {11 steps {12 sh 'curl -sSL https://sigilsec.ai/install.sh | sh'13 }14 }15 stage('Sigil Scan') {16 steps {17 sh '''18 sigil scan . --format json > sigil-report.json19 EXIT_CODE=$?20 if [ $EXIT_CODE -ge 2 ]; then21 echo "Sigil detected HIGH or CRITICAL findings."22 exit 123 fi24 '''25 }26 }27 }28 post {29 always {30 archiveArtifacts artifacts: 'sigil-report.json', allowEmptyArchive: true31 }32 }33}
CircleCI
CircleCI config with Docker executor, Sigil install, scan, and artifact storage.
1version: 2.123jobs:4 sigil-scan:5 docker:6 - image: cimg/base:stable7 steps:8 - checkout9 - run:10 name: Install Sigil11 command: curl -sSL https://sigilsec.ai/install.sh | sh12 - run:13 name: Run Sigil scan14 command: |15 sigil scan . --format json > sigil-report.json16 EXIT_CODE=$?17 if [ $EXIT_CODE -ge 2 ]; then18 echo "Sigil detected HIGH or CRITICAL findings."19 exit 120 fi21 - store_artifacts:22 path: sigil-report.json23 destination: sigil-report2425workflows:26 security:27 jobs:28 - sigil-scan
Bitbucket Pipelines
Bitbucket Pipelines config with Sigil scan on every pull request.
1image: atlassian/default-image:423pipelines:4 pull-requests:5 '**':6 - step:7 name: Sigil Security Scan8 script:9 - curl -sSL https://sigilsec.ai/install.sh | sh10 - sigil scan . --format json > sigil-report.json11 - EXIT_CODE=$?12 - |13 if [ $EXIT_CODE -ge 2 ]; then14 echo "Sigil detected HIGH or CRITICAL findings."15 exit 116 fi17 artifacts:18 - sigil-report.json
Docker-Based CI
Run Sigil as a Docker container for hermetic, reproducible scans in any pipeline.
Volume mount
Mount your workspace into the container and scan it directly.
docker run --rm -v "$(pwd):/workspace" ghcr.io/nomarj/sigil:latest scan /workspaceMulti-stage build
Scan your application as part of a multi-stage Docker build. The scanner stage gates the production image — if findings exceed the threshold, the build fails.
1# Stage 1: Build2FROM node:20-alpine AS builder3WORKDIR /app4COPY package*.json ./5RUN npm ci6COPY . .7RUN npm run build89# Stage 2: Sigil Scan10FROM ghcr.io/nomarj/sigil:latest AS scanner11COPY --from=builder /app /workspace12RUN sigil scan /workspace --format json > /sigil-report.json1314# Stage 3: Production15FROM node:20-alpine AS production16WORKDIR /app17COPY --from=builder /app/dist ./dist18COPY --from=builder /app/node_modules ./node_modules19COPY --from=scanner /sigil-report.json ./sigil-report.json20EXPOSE 300021CMD ["node", "dist/index.js"]
Alert Notifications
Configure alerts to notify your team when CI scans detect high-risk or critical findings.
Slack webhook
curl -X POST https://api.sigilsec.ai/v1/settings/alerts \
-H "Authorization: Bearer $SIGIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "slack",
"webhook_url": "https://hooks.slack.com/services/T00/B00/xxxxx",
"events": ["scan.high", "scan.critical"]
}'Email alerts
curl -X POST https://api.sigilsec.ai/v1/settings/alerts \
-H "Authorization: Bearer $SIGIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "email",
"email": "security@yourcompany.com",
"events": ["scan.high", "scan.critical"]
}'Generic webhook
curl -X POST https://api.sigilsec.ai/v1/settings/alerts \
-H "Authorization: Bearer $SIGIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "webhook",
"url": "https://yourcompany.com/webhooks/sigil",
"secret": "whsec_your_signing_secret",
"events": ["scan.high", "scan.critical"]
}'scan.high and scan.critical. Alerts fire for any CI scan that produces a matching verdict.Output Formats
Sigil supports three output formats. Use --format to select the format that fits your pipeline.
Text (default)
Human-readable output with colored verdicts. Best for terminal use and quick triage.
sigil scan . --format textJSON
Machine-readable JSON output for scripting, dashboards, and CI/CD integration.
sigil scan . --format json1{2 "verdict": "medium",3 "score": 14,4 "findings": [5 {6 "severity": "medium",7 "phase": "code_patterns",8 "rule": "dynamic-execution",9 "file": "src/utils/loader.js",10 "line": 42,11 "snippet": "eval(atob(encodedPayload))",12 "weight": 513 }14 ],15 "files_scanned": 312,16 "duration_ms": 214017}
SARIF
Static Analysis Results Interchange Format (SARIF 2.1.0). Compatible with GitHub Code Scanning, VS Code SARIF Viewer, and other SARIF-compatible tools.
sigil scan . --format sarif > results.sarifNeed help?
Ask a question in GitHub Discussions or check the troubleshooting guide.