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.

refactor(ci): consolidate security + test gates into unified release gate (#2226)

LearningCircuita71e96b02011
diff --git a/.github/workflows/bearer.yml b/.github/workflows/bearer.yml
index 6cc8c0b48b..09b2940672 100644
--- a/.github/workflows/bearer.yml
+++ b/.github/workflows/bearer.yml
@@ -2,7 +2,7 @@ name: Bearer Security Scan
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
# Run security scan daily at 4 AM UTC
- cron: '0 4 * * *'
diff --git a/.github/workflows/checkov.yml b/.github/workflows/checkov.yml
index 72d3180810..b932ca2196 100644
--- a/.github/workflows/checkov.yml
+++ b/.github/workflows/checkov.yml
@@ -2,7 +2,7 @@ name: Checkov IaC Security Scan
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index ad6f575784..e0866ff52c 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -18,7 +18,7 @@ on:
branches: [main]
schedule:
- cron: '45 5 * * 0'
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
workflow_dispatch:
permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions
diff --git a/.github/workflows/container-security.yml b/.github/workflows/container-security.yml
index 29e1abf5ea..feb38145c5 100644
--- a/.github/workflows/container-security.yml
+++ b/.github/workflows/container-security.yml
@@ -1,7 +1,7 @@
name: Container Security
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
workflow_dispatch:
permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions
diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml
index 79252b2167..5b38269eb4 100644
--- a/.github/workflows/devskim.yml
+++ b/.github/workflows/devskim.yml
@@ -2,7 +2,7 @@ name: DevSkim Security Linter
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
# Run security linter daily at 10 AM UTC
- cron: '0 10 * * *'
diff --git a/.github/workflows/dockle.yml b/.github/workflows/dockle.yml
index 5458d52b8b..4b38297803 100644
--- a/.github/workflows/dockle.yml
+++ b/.github/workflows/dockle.yml
@@ -2,7 +2,7 @@ name: Dockle Container Security Linting
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
# Run weekly on Tuesday at 10 AM UTC (staggered with other container scans)
- cron: '0 10 * * 2'
diff --git a/.github/workflows/gitleaks-main.yml b/.github/workflows/gitleaks-main.yml
index bfffdf2df6..b6910807f6 100644
--- a/.github/workflows/gitleaks-main.yml
+++ b/.github/workflows/gitleaks-main.yml
@@ -5,7 +5,7 @@ name: Gitleaks Main Branch Scan
# from feature branches with intentional test data.
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
workflow_dispatch:
permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions
diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml
index f8c57524e7..a4f5df2486 100644
--- a/.github/workflows/hadolint.yml
+++ b/.github/workflows/hadolint.yml
@@ -2,7 +2,7 @@ name: Hadolint Dockerfile Linting
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
# Run weekly on Tuesday at 9 AM UTC
- cron: '0 9 * * 2'
diff --git a/.github/workflows/npm-audit.yml b/.github/workflows/npm-audit.yml
index 1d2bc7d0fa..748e58ec8a 100644
--- a/.github/workflows/npm-audit.yml
+++ b/.github/workflows/npm-audit.yml
@@ -2,7 +2,7 @@ name: npm Security Audit
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
permissions:
contents: read
diff --git a/.github/workflows/ossar.yml b/.github/workflows/ossar.yml
index 35d12ac9a1..103de8e7bc 100644
--- a/.github/workflows/ossar.yml
+++ b/.github/workflows/ossar.yml
@@ -9,7 +9,7 @@
name: OSSAR
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
- cron: '39 12 * * 1' # Weekly scan for early detection
workflow_dispatch: # Manual trigger for debugging/verification
diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.yml
index f661d590e5..e46c0d542c 100644
--- a/.github/workflows/osv-scanner.yml
+++ b/.github/workflows/osv-scanner.yml
@@ -6,11 +6,11 @@
# OSV-Scanner for detecting vulnerabilities in dependencies.
# Runs on PRs to catch vulnerable dependencies before merge (shift-left security).
#
-# NOTE: This workflow is NOT included in security-release-gate.yml because
+# NOTE: This workflow is NOT included in release-gate.yml because
# GitHub Actions limits reusable workflow nesting to 2 levels. Since this
# workflow calls google/osv-scanner-reusable.yml, including it in the gate
# would create 4 levels of nesting and cause startup_failure:
-# release.yml → security-release-gate.yml → osv-scanner.yml → google/osv-scanner-reusable.yml
+# release.yml → release-gate.yml → osv-scanner.yml → google/osv-scanner-reusable.yml
#
# For more examples and options, including how to ignore specific vulnerabilities,
# see https://google.github.io/osv-scanner/github-action/
diff --git a/.github/workflows/owasp-zap-scan.yml b/.github/workflows/owasp-zap-scan.yml
index 299bb34c8a..1305f2f670 100644
--- a/.github/workflows/owasp-zap-scan.yml
+++ b/.github/workflows/owasp-zap-scan.yml
@@ -1,9 +1,9 @@
name: OWASP ZAP Security Scan
-# Baseline and API scans - called by security-release-gate.yml
+# Baseline and API scans - called by release-gate.yml
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
workflow_dispatch:
# Restrict top-level permissions (jobs define their own)
diff --git a/.github/workflows/puppeteer-e2e-tests.yml b/.github/workflows/puppeteer-e2e-tests.yml
index 321cf344d2..a59dda5c13 100644
--- a/.github/workflows/puppeteer-e2e-tests.yml
+++ b/.github/workflows/puppeteer-e2e-tests.yml
@@ -3,7 +3,7 @@ name: Puppeteer E2E Tests
on:
pull_request:
types: [labeled]
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
secrets:
OPENROUTER_API_KEY:
required: false
diff --git a/.github/workflows/security-release-gate.yml b/.github/workflows/release-gate.yml
similarity index 91%
rename from .github/workflows/security-release-gate.yml
rename to .github/workflows/release-gate.yml
index 598166fa79..91d16f050d 100644
--- a/.github/workflows/security-release-gate.yml
+++ b/.github/workflows/release-gate.yml
@@ -1,9 +1,9 @@
-name: Security Release Gate
+name: Release Gate
# IMPORTANT: This workflow is the ONLY path to publishing releases.
#
# Security model:
-# - All security scans must pass before any release artifacts are published
+# - All security scans and functional tests must pass before any release artifacts are published
# - Docker and PyPI publish workflows are triggered ONLY via repository_dispatch
# from release.yml, which depends on this gate passing
# - Direct release creation via GitHub UI will NOT trigger publishing
@@ -12,7 +12,7 @@ name: Security Release Gate
# If you need to publish manually, use workflow_dispatch on release.yml
# which will run this security gate first.
#
-# This workflow runs all security scans.
+# This workflow runs all security scans and functional tests.
# Used by release workflow and also runs daily to catch issues early.
#
# Philosophy:
@@ -21,6 +21,11 @@ name: Security Release Gate
on:
workflow_call: # Called by release.yml
+ secrets:
+ OPENROUTER_API_KEY:
+ required: false
+ SERPER_API_KEY:
+ required: false
workflow_dispatch: # Manual trigger
schedule:
# Run daily at 2 AM UTC to catch security issues early
@@ -89,7 +94,7 @@ jobs:
# NOTE: OSV-Scanner is intentionally NOT included in this gate.
#
# GitHub Actions limits reusable workflow nesting to 2 levels. Since:
- # release.yml → security-release-gate.yml → osv-scanner.yml → google/osv-scanner-reusable.yml
+ # release.yml → release-gate.yml → osv-scanner.yml → google/osv-scanner-reusable.yml
# would create 4 levels, this causes startup_failure.
#
# OSV-Scanner runs on PRs instead (see osv-scanner.yml), which is better
@@ -191,11 +196,20 @@ jobs:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
SERPER_API_KEY: ${{ secrets.SERPER_API_KEY }}
+ # ============================================
+ # UI Browser Tests
+ # ============================================
+ playwright-webkit-tests:
+ uses: ./.github/workflows/playwright-webkit-tests.yml
+ permissions:
+ contents: read
+ checks: write
+
# ============================================
# Summary job that reports overall status
# ============================================
- security-gate-summary:
- name: Security Gate Summary
+ release-gate-summary:
+ name: Release Gate Summary
runs-on: ubuntu-latest
needs:
# Existing scans
@@ -225,6 +239,8 @@ jobs:
- backwards-compatibility
# E2E functional tests
- puppeteer-e2e-tests
+ # UI browser tests
+ - playwright-webkit-tests
if: always()
permissions:
contents: read
@@ -276,6 +292,7 @@ jobs:
check_result "${{ needs.security-headers-scan.result }}" || true
check_result "${{ needs.backwards-compatibility.result }}" || true
check_result "${{ needs.puppeteer-e2e-tests.result }}" || true
+ check_result "${{ needs.playwright-webkit-tests.result }}" || true
TOTAL=$((PASS_COUNT + FAIL_COUNT))
@@ -285,8 +302,8 @@ jobs:
if [ -z "$FAILED" ]; then
echo "# :white_check_mark: RELEASE GATE: PASSED"
echo ""
- echo "> **All $TOTAL security scans passed successfully.**"
- echo "> This release is approved from a security perspective."
+ echo "> **All $TOTAL checks passed successfully.**"
+ echo "> This release is approved for publishing."
else
echo "# :x: RELEASE GATE: FAILED"
echo ""
@@ -483,6 +500,19 @@ jobs:
FAILED="true"
fi
+ # ============================================
+ # Playwright Webkit Tests
+ # ============================================
+ echo ""
+ echo "### Playwright Webkit Tests"
+
+ if [ "${{ needs.playwright-webkit-tests.result }}" = "success" ]; then
+ echo "✅ **Playwright Webkit**: Passed"
+ else
+ echo "❌ **Playwright Webkit**: ${{ needs.playwright-webkit-tests.result }}"
+ FAILED="true"
+ fi
+
# ============================================
# Final result with prominent summary
# ============================================
@@ -509,5 +539,5 @@ jobs:
echo "| **Gate** | :white_check_mark: **APPROVED** |"
echo "| **Passed** | $PASS_COUNT / $TOTAL |"
echo ""
- echo "_All security scans passed. E2E tests run as advisory gate in release pipeline._"
+ echo "_All checks passed. Release approved._"
fi
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 14a7acdf25..3f6b5e3a3e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,59 +12,33 @@ permissions: {} # Minimal permissions at workflow level for OSSF Scorecard
jobs:
# ============================================================================
- # SECURITY GATE - All security scans must pass before release proceeds
+ # RELEASE GATE - All checks must pass before release proceeds
# ============================================================================
- # This gate runs container-security, owasp-zap, semgrep, and security-tests.
- # The build job depends on this gate, ensuring no release can be created
- # without passing all security checks.
+ # This gate runs all security scans and functional tests (including Playwright
+ # WebKit, Puppeteer E2E). The build job depends on this gate, ensuring no
+ # release can be created without passing all checks.
#
# NOTE: Docker/PyPI publishing only happens via repository_dispatch from this
# workflow. Creating a release via GitHub UI will NOT trigger publishing
# (this is by design to prevent security gate bypass).
# ============================================================================
- security-gate:
- uses: ./.github/workflows/security-release-gate.yml
+ release-gate:
+ uses: ./.github/workflows/release-gate.yml
permissions:
contents: read
security-events: write
actions: read
- pull-requests: write # needed by hadolint-scan
- packages: read # needed by codeql-scan
-
- # ============================================================================
- # TEST GATE (Advisory) - WebKit tests run but don't block releases
- # ============================================================================
- # Cosmetic rendering differences in WebKit should not block releases.
- # This gate is advisory: failures are logged but the release proceeds.
- # ============================================================================
- test-gate:
- # Runs in parallel with security-gate (no dependency)
- uses: ./.github/workflows/playwright-webkit-tests.yml
- permissions:
- contents: read
- checks: write
-
- # ============================================================================
- # E2E TEST GATE (Advisory) - Puppeteer functional tests
- # ============================================================================
- # Verifies UI search workflow via real API calls (OpenRouter + Serper).
- # Advisory: external API flakiness should not block releases.
- # ============================================================================
- e2e-test-gate:
- # Runs in parallel with security-gate (no dependency)
- uses: ./.github/workflows/puppeteer-e2e-tests.yml
- permissions:
- contents: read
pull-requests: write
+ packages: read
+ checks: write
issues: write
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
SERPER_API_KEY: ${{ secrets.SERPER_API_KEY }}
build:
- needs: [security-gate, test-gate, e2e-test-gate]
- # Advisory: test gates don't block the release (only security-gate is required)
- if: ${{ !cancelled() && needs.security-gate.result == 'success' }}
+ needs: [release-gate]
+ if: ${{ needs.release-gate.result == 'success' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
diff --git a/.github/workflows/retirejs.yml b/.github/workflows/retirejs.yml
index c69dfe3899..5a83e010df 100644
--- a/.github/workflows/retirejs.yml
+++ b/.github/workflows/retirejs.yml
@@ -2,14 +2,14 @@ name: Retire.js Security Scan
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
# Run weekly security scan on Mondays at 4 AM UTC
- cron: '0 4 * * 1'
permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions
-# Note: No concurrency block - this workflow is called by security-release-gate.yml
+# Note: No concurrency block - this workflow is called by release-gate.yml
# and concurrency settings can cause unexpected cancellations for reusable workflows
jobs:
diff --git a/.github/workflows/security-headers-validation.yml b/.github/workflows/security-headers-validation.yml
index 4317ff84e1..704e50788d 100644
--- a/.github/workflows/security-headers-validation.yml
+++ b/.github/workflows/security-headers-validation.yml
@@ -1,7 +1,7 @@
name: Security Headers Validation
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
- cron: '0 3 * * *' # Daily scan for early detection
workflow_dispatch: # Manual trigger for debugging/verification
diff --git a/.github/workflows/security-tests.yml b/.github/workflows/security-tests.yml
index 3f4bb1ea53..99a6a8e5b8 100644
--- a/.github/workflows/security-tests.yml
+++ b/.github/workflows/security-tests.yml
@@ -1,7 +1,7 @@
name: Security Tests
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
workflow_dispatch:
permissions:
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
index d51acd297b..f5d24b13e2 100644
--- a/.github/workflows/semgrep.yml
+++ b/.github/workflows/semgrep.yml
@@ -1,7 +1,7 @@
name: Semgrep Security Scan
on:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
workflow_dispatch:
permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissions
diff --git a/.github/workflows/zizmor-security.yml b/.github/workflows/zizmor-security.yml
index 9cb71d1108..2407192edc 100644
--- a/.github/workflows/zizmor-security.yml
+++ b/.github/workflows/zizmor-security.yml
@@ -2,7 +2,7 @@ name: Zizmor GitHub Actions Security
on:
workflow_dispatch:
- workflow_call: # Called by security-release-gate.yml
+ workflow_call: # Called by release-gate.yml
schedule:
# Run security audit weekly on Monday at 9 AM UTC
- cron: '0 9 * * 1'
diff --git a/README.md b/README.md
index 80d319d6c1..d1082a6dc1 100644
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ Every research session finds valuable sources. Download them directly into your
<div align="center">
<!-- Comprehensive Security Scanning -->
-[![🛡️ Security Release Gate](https://github.com/LearningCircuit/local-deep-research/actions/workflows/security-release-gate.yml/badge.svg?branch=main)](https://github.com/LearningCircuit/local-deep-research/actions/workflows/security-release-gate.yml)
+[![🛡️ Release Gate](https://github.com/LearningCircuit/local-deep-research/actions/workflows/release-gate.yml/badge.svg?branch=main)](https://github.com/LearningCircuit/local-deep-research/actions/workflows/release-gate.yml)
<!-- Static Analysis (additional scanners beyond CodeQL/Semgrep) -->
[![DevSkim](https://github.com/LearningCircuit/local-deep-research/actions/workflows/devskim.yml/badge.svg?branch=main)](https://github.com/LearningCircuit/local-deep-research/actions/workflows/devskim.yml)