~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
ci: add code scanning alert check to release gate (#1913)
LearningCircuit655147dd3bd0
diff --git a/.github/workflows/release-gate.yml b/.github/workflows/release-gate.ymlindex 674cbda066..9ff9f44a10 100644--- a/.github/workflows/release-gate.yml+++ b/.github/workflows/release-gate.yml@@ -172,6 +172,111 @@ jobs:permissions:contents: read+ # ============================================+ # Check for open code scanning alerts+ # This runs after all SARIF uploads complete and fails if+ # high/critical/medium severity alerts exist from ANY tool+ # ============================================+ check-code-scanning-alerts:+ name: Check Code Scanning Alerts+ runs-on: ubuntu-latest+ needs:+ # Wait for all SARIF-uploading scans to complete+ - codeql-scan+ - semgrep-scan+ - devskim-scan+ - bearer-scan+ - ossar-scan+ - security-tests+ - container-security+ - owasp-zap-scan+ - retirejs-scan+ - dockle-scan+ - hadolint-scan+ - checkov-scan+ - zizmor-scan+ - gitleaks-scan+ permissions:+ security-events: read+ steps:+ - name: Harden the runner (Audit all outbound calls)+ uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2+ with:+ egress-policy: audit++ - name: Check for open security alerts+ env:+ GH_TOKEN: ${{ github.token }}+ run: |+ echo "Checking for open code scanning alerts..."++ # Query all open code scanning alerts with pagination+ ALERTS="[]"+ PAGE=1+ while true; do+ RESPONSE=$(gh api \+ -H "Accept: application/vnd.github+json" \+ -H "X-GitHub-Api-Version: 2022-11-28" \+ "/repos/${{ github.repository }}/code-scanning/alerts?state=open&per_page=100&page=${PAGE}" \+ 2>&1) || {+ echo "::error::Failed to query code scanning API (page ${PAGE}): ${RESPONSE}"+ exit 1+ }++ # Validate response is a JSON array+ if ! echo "$RESPONSE" | jq -e 'type == "array"' > /dev/null 2>&1; then+ echo "::error::Unexpected API response (not a JSON array): ${RESPONSE}"+ exit 1+ fi++ COUNT=$(echo "$RESPONSE" | jq 'length')+ if [ "$COUNT" -eq 0 ]; then+ break+ fi++ # Merge page results into ALERTS+ ALERTS=$(echo "$ALERTS" "$RESPONSE" | jq -s '.[0] + .[1]')+ PAGE=$((PAGE + 1))+ done++ TOTAL_ALERTS=$(echo "$ALERTS" | jq 'length')+ echo "Fetched ${TOTAL_ALERTS} open alert(s) across $((PAGE - 1)) page(s)."++ # Count alerts by severity+ CRITICAL=$(echo "$ALERTS" | jq '[.[] | select(.rule.security_severity_level == "critical")] | length')+ HIGH=$(echo "$ALERTS" | jq '[.[] | select(.rule.security_severity_level == "high")] | length')+ MEDIUM=$(echo "$ALERTS" | jq '[.[] | select(.rule.security_severity_level == "medium")] | length')++ {+ echo ""+ echo "## Code Scanning Alert Summary"+ echo ""+ echo "| Severity | Count |"+ echo "|----------|-------|"+ echo "| Critical | $CRITICAL |"+ echo "| High | $HIGH |"+ echo "| Medium | $MEDIUM |"+ echo ""+ } >> "$GITHUB_STEP_SUMMARY"++ TOTAL=$((CRITICAL + HIGH + MEDIUM))++ if [ "$TOTAL" -gt 0 ]; then+ BLOCKING_FILTER='select(.rule.security_severity_level == "critical" or .rule.security_severity_level == "high" or .rule.security_severity_level == "medium")'+ {+ echo "❌ **Found $TOTAL blocking alerts (Critical: $CRITICAL, High: $HIGH, Medium: $MEDIUM)**"+ echo ""+ echo "### Blocking Alerts:"+ echo "$ALERTS" | jq -r ".[] | ${BLOCKING_FILTER} | \"- [\\(.rule.security_severity_level | ascii_upcase)] \\(.rule.description) ([#\\(.number)](\\(.html_url)))\""+ } >> "$GITHUB_STEP_SUMMARY"+ echo ""+ echo "::error::Security gate failed: Found $TOTAL open code scanning alerts (Critical: $CRITICAL, High: $HIGH, Medium: $MEDIUM)"+ exit 1+ else+ echo "✅ **No critical, high, or medium severity alerts found**" >> "$GITHUB_STEP_SUMMARY"+ echo "No blocking code scanning alerts found."+ fi+# ============================================# Summary job that reports overall status# ============================================@@ -203,6 +308,8 @@ jobs:- gitleaks-scan# Runtime security- security-headers-scan+ # Alert check (fails if any critical/high/medium alerts exist)+ - check-code-scanning-alertsif: always()permissions:contents: read@@ -253,6 +360,7 @@ jobs:check_result "${{ needs.zizmor-scan.result }}" || truecheck_result "${{ needs.gitleaks-scan.result }}" || truecheck_result "${{ needs.security-headers-scan.result }}" || true+ check_result "${{ needs.check-code-scanning-alerts.result }}" || trueTOTAL=$((PASS_COUNT + FAIL_COUNT))@@ -441,6 +549,19 @@ jobs:FAILED="true"fi+ # ============================================+ # Code scanning alerts check+ # ============================================+ echo ""+ echo "### Code Scanning Alerts"++ if [ "${{ needs.check-code-scanning-alerts.result }}" = "success" ]; then+ echo "✅ **Alert Check**: No critical/high/medium alerts"+ else+ echo "❌ **Alert Check**: ${{ needs.check-code-scanning-alerts.result }} - Open alerts found!"+ FAILED="true"+ fi+# ============================================# Final result with prominent summary# ============================================