~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
Add Dockle container image security linting
LearningCircuita63e3fee0085
diff --git a/.github/workflows/dockle.yml b/.github/workflows/dockle.ymlnew file mode 100644index 0000000000..b2a1eaedbd--- /dev/null+++ b/.github/workflows/dockle.yml@@ -0,0 +1,162 @@+name: Dockle Container Security Linting++on:+ push:+ branches: [ main, dev ]+ paths:+ - 'Dockerfile'+ - 'docker-compose*.yml'+ - '.github/workflows/dockle.yml'+ pull_request:+ branches: [ main, dev ]+ paths:+ - 'Dockerfile'+ - 'docker-compose*.yml'+ workflow_dispatch:+ schedule:+ # Run weekly on Tuesday at 10 AM UTC (staggered with other container scans)+ - cron: '0 10 * * 2'++permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions++jobs:+ dockle:+ name: Dockle Container Image Security+ runs-on: ubuntu-latest+ permissions:+ contents: read+ security-events: write++ steps:+ - name: Harden the runner (Audit all outbound calls)+ uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3+ with:+ egress-policy: audit++ - name: Checkout repository+ uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1++ with:+ persist-credentials: false++ - name: Set up Docker Buildx+ uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3++ - name: Build Docker image for scanning+ uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6+ with:+ context: .+ push: false+ load: true+ tags: local-deep-research:dockle-scan+ cache-from: type=gha+ cache-to: type=gha,mode=max++ - name: Run Dockle security scan+ id: dockle+ run: |+ echo "=== Running Dockle Container Image Security Scan ==="+ # Run Dockle with SARIF output for GitHub Security tab+ # Exit code 1 means issues found, but we don't fail the workflow+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \+ goodwithtech/dockle:v0.4.14 \+ --format sarif \+ --output dockle-results.sarif \+ local-deep-research:dockle-scan || {+ DOCKLE_FOUND_ISSUES=true+ echo "Dockle found security or best practice issues"+ }++ if [ "$DOCKLE_FOUND_ISSUES" = "true" ]; then+ echo "DOCKLE_FOUND_ISSUES=true" >> "$GITHUB_ENV"+ fi+ continue-on-error: true++ - name: Run Dockle with human-readable output+ if: always()+ run: |+ echo "=== Dockle Scan Results ==="+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \+ goodwithtech/dockle:v0.4.14 \+ --output text \+ local-deep-research:dockle-scan || true++ - name: Upload Dockle results to GitHub Security tab+ uses: github/codeql-action/upload-sarif@32f7c15247fa6542dc765bd40f6a15dc2caeed89 # v4.31.2+ if: always()+ with:+ sarif_file: dockle-results.sarif+ category: dockle++ - name: Upload Dockle results as artifact+ uses: actions/upload-artifact@b7c566a772e6bfb58ed0dc250532a479d7789f # v6.0.0+ if: always()+ with:+ name: dockle-results+ path: dockle-results.sarif+ retention-days: 7 # Reduced for security++ - name: Display Dockle summary+ if: always()+ run: |+ {+ echo "## 🐋 Dockle Container Image Security Summary"+ echo ""+ echo "### What is Dockle?"+ echo "Dockle is a container image linting tool that checks for:"+ echo ""+ echo "#### 🎯 Security Checks:"+ echo "- **Sensitive Files**: Keys, certificates, passwords in image"+ echo "- **Root User**: Warning if running as root"+ echo "- **Clear-text Passwords**: Detects plaintext secrets"+ echo "- **CIS Benchmarks**: Container security best practices"+ echo "- **Outdated Packages**: Vulnerable base images"+ echo ""+ echo "#### 📊 Dockle vs Hadolint:"+ echo "- **Hadolint**: Checks Dockerfile source code (best practices)"+ echo "- **Dockle**: Scans built container image (runtime security)"+ echo "- **Both Complement**: Check different stages of container lifecycle"+ echo ""+ echo "#### 🔍 Scan Results:"+ } >> "$GITHUB_STEP_SUMMARY"++ if [ "$DOCKLE_FOUND_ISSUES" = "true" ]; then+ echo "⚠️ **Issues Found**" >> "$GITHUB_STEP_SUMMARY"+ echo ""+ echo "Dockle detected security or best practice issues:" >> "$GITHUB_STEP_SUMMARY"+ echo "" >> "$GITHUB_STEP_SUMMARY"+ echo "**Common Issues:**" >> "$GITHUB_STEP_SUMMARY"+ echo "- Running as root user (consider USER directive)" >> "$GITHUB_STEP_SUMMARY"+ echo "- Sensitive files potentially included in image" >> "$GITHUB_STEP_SUMMARY"+ echo "- Missing security labels or metadata" >> "$GITHUB_STEP_SUMMARY"+ echo "- Outdated base image packages" >> "$GITHUB_STEP_SUMMARY"+ echo "" >> "$GITHUB_STEP_SUMMARY"+ echo "📋 **Detailed Results:**" >> "$GITHUB_STEP_SUMMARY"+ echo "- GitHub Security tab: SARIF results uploaded" >> "$GITHUB_STEP_SUMMARY"+ echo "- Artifacts: Full SARIF report available" >> "$GITHUB_STEP_SUMMARY"+ echo "- Check output above for human-readable format" >> "$GITHUB_STEP_SUMMARY"+ else+ echo "✅ **No Issues Found!**" >> "$GITHUB_STEP_SUMMARY"+ echo "" >> "$GITHUB_STEP_SUMMARY"+ echo "Container image passed all Dockle security checks." >> "$GITHUB_STEP_SUMMARY"+ fi++ {+ echo ""+ echo "#### 🔗 Resources:"+ echo "- [Dockle GitHub](https://github.com/goodwithtech/dockle)"+ echo "- [CIS Docker Benchmark](https://www.cisecurity.org/benchmark/docker)"+ echo "- [Security Tab](https://github.com/${{ github.repository }}/security/code-scanning)"+ echo ""+ echo "#### 💡 Best Practices:"+ echo "- Use multi-stage builds to reduce image size"+ echo "- Add USER directive to run as non-root"+ echo "- Don't include secrets or keys in image"+ echo "- Keep base images updated"+ echo "- Scan images with both Dockle (runtime) and Hadolint (build)"+ } >> "$GITHUB_STEP_SUMMARY"++ - name: Clean up Docker image+ if: always()+ run: |+ docker rmi local-deep-research:dockle-scan || true