Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

ci: Add Checkov for Infrastructure as Code security scanning (#1142)

LearningCircuit569f27b6d283
diff --git a/.github/workflows/checkov.yml b/.github/workflows/checkov.yml
new file mode 100644
index 0000000000..8b58b0c0b4
--- /dev/null
+++ b/.github/workflows/checkov.yml
@@ -0,0 +1,109 @@
+name: Checkov IaC Security Scan
+
+on:
+ push:
+ branches: [main, dev, develop]
+ paths:
+ - 'Dockerfile'
+ - 'docker-compose*.yml'
+ - '.github/workflows/*.yml'
+ pull_request:
+ branches: [main, dev, develop]
+ paths:
+ - 'Dockerfile'
+ - 'docker-compose*.yml'
+ - '.github/workflows/*.yml'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ security-events: write # For uploading SARIF results
+
+jobs:
+ checkov:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+
+ steps:
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+
+ - name: Set up Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: '3.11'
+
+ - name: Install Checkov
+ run: |
+ pip install checkov
+
+ - name: Run Checkov on Dockerfiles
+ id: checkov-docker
+ run: |
+ echo "=== Scanning Dockerfiles ==="
+ checkov --framework dockerfile \
+ --file Dockerfile \
+ --output cli \
+ --output sarif \
+ --output-file-path console,checkov-docker.sarif \
+ --soft-fail || echo "DOCKER_ISSUES=true" >> "$GITHUB_ENV"
+
+ - name: Run Checkov on docker-compose files
+ id: checkov-compose
+ run: |
+ echo "=== Scanning docker-compose files ==="
+ checkov --framework docker_compose \
+ --file docker-compose.yml \
+ --file docker-compose.gpu.override.yml \
+ --file docker-compose.tts.yml \
+ --file docker-compose.unraid.yml \
+ --output cli \
+ --output sarif \
+ --output-file-path console,checkov-compose.sarif \
+ --soft-fail || echo "COMPOSE_ISSUES=true" >> "$GITHUB_ENV"
+
+ - name: Run Checkov on GitHub Actions workflows
+ id: checkov-workflows
+ run: |
+ echo "=== Scanning GitHub Actions workflows ==="
+ checkov --framework github_actions \
+ --directory .github/workflows \
+ --output cli \
+ --output sarif \
+ --output-file-path console,checkov-workflows.sarif \
+ --soft-fail || echo "WORKFLOW_ISSUES=true" >> "$GITHUB_ENV"
+
+ - name: Upload Dockerfile SARIF results
+ if: always()
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: checkov-docker.sarif
+ category: checkov-dockerfile
+ continue-on-error: true
+
+ - name: Upload docker-compose SARIF results
+ if: always()
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: checkov-compose.sarif
+ category: checkov-compose
+ continue-on-error: true
+
+ - name: Upload GitHub Actions SARIF results
+ if: always()
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: checkov-workflows.sarif
+ category: checkov-workflows
+ continue-on-error: true
+
+ - name: Summary
+ if: always()
+ run: |
+ echo "=== Checkov IaC Security Scan Summary ==="
+ if [[ "$DOCKER_ISSUES" == "true" || "$COMPOSE_ISSUES" == "true" || "$WORKFLOW_ISSUES" == "true" ]]; then
+ echo "⚠️ Security issues found (see details above)"
+ echo "📊 SARIF results uploaded to GitHub Security tab"
+ echo "Note: Using --soft-fail to not block CI"
+ else
+ echo "✅ No security issues found"
+ fi