Skip to content

feat(deps): block CI on high/critical CVEs + Renovate security fast-track (#1498) - #1784

Merged
yannickmonney merged 3 commits into
mainfrom
feat/ci-cve-gate-and-renovate-security-fasttrack
Jun 1, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
feat/ci-cve-gate-and-renovate-security-fasttrack

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Turns the (previously non-blocking) security scanning into a real gate and gives Renovate a security fast-track.

Renovate fast-track (.github/renovate.json)

  • vulnerabilityAlerts: minimumReleaseAge: null (skips the 90-day cushion), schedule: [] (any time, not just Monday), prCreation: "immediate", security label — advisory fixes open PRs within hours.
  • osvVulnerabilityAlerts: true for OSV-database coverage on top of GitHub advisories.

CI gate (.github/workflows/security.yml)

  • bun audit now has a report step (all severities → job summary) plus a gate step (--audit-level=critical, pipefail) that fails the build on CRITICAL production advisories.
  • Trivy keeps its informational HIGH+CRITICAL SARIF upload (all scanners → Security tab), plus a vuln-only CRITICAL gate (exit-code: 1, ignore-unfixed, same .trivyignore.yaml).

Why CRITICAL now, not HIGH

Running the gate on this PR surfaced a pre-existing backlog of 13 HIGH advisories, 0 CRITICAL — see the tracking comment on #1498. They're mostly transitive/dev (picomatch, tar via jsdom, lodash/axios via swagger-ui-react & commitizen) plus xlsx/SheetJS (no fixed npm release). Hard-blocking HIGH today would red-line all of CI, and unilaterally suppressing 13 real advisories isn't the right call.

So this lands the gate at CRITICAL (green today, blocks the worst new CVEs) while keeping HIGH fully visible (bun audit summary + Trivy SARIF) and tracked. The gate ratchets to HIGH once the backlog is remediated.

Verification

  • renovate.json + security.yml parse (JSON/YAML); Renovate fields are standard options.
  • The Security workflow runs on this PR (it touches security.yml) — the CRITICAL gate is green; the report step lists the HIGH backlog.

Part of #1498 (kept open for the HIGH ratchet).

Summary by CodeRabbit

  • Chores
    • Enhanced vulnerability detection configuration with expanded coverage across all services.
    • Updated CI/CD security gates to block builds when critical dependency vulnerabilities are detected.

…rack

The Security workflow already ran Trivy and bun audit, but both were
non-blocking (exit-code 0 / continue-on-error), and Renovate's 90-day
stabilization cushion delayed security patches.

- bun audit now runs with --audit-level=high and fails the job on
  HIGH/CRITICAL production advisories (pipefail so tee can't mask the exit).
- Trivy keeps its informational all-scanner SARIF upload, then a vuln-only
  HIGH/CRITICAL gate (ignore-unfixed, same path-scoped ignores) fails the build
  on a fixable dependency CVE. Secret/misconfig stay informational to avoid
  blocking on scanner noise.
- Renovate gains a vulnerabilityAlerts fast-track: no minimumReleaseAge cushion,
  immediate PR creation, any-time schedule, a `security` label, plus
  osvVulnerabilityAlerts for OSV-database coverage — so advisory fixes open PRs
  within hours instead of waiting out the 90-day window.

Closes #1498
@coderabbitai

coderabbitai Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c42838ba-0068-4e60-bb94-56a7402f0881

📥 Commits

Reviewing files that changed from the base of the PR and between 30baa77 and af0cf7d.

⛔ Files ignored due to path filters (1)
  • services/crawler/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/renovate.json
  • .github/workflows/security.yml

📝 Walkthrough

Walkthrough

This PR enhances security automation by configuring Renovate to immediately surface dependency vulnerability alerts and expanding the GitHub Actions security workflow to scan and gate all microservices. Renovate's vulnerability alert settings enable immediate PR creation with security-related labels. The workflow path filters broaden from rag-specific paths to all service directories. Two new CI gates are added: a Bun audit gate that blocks builds on CRITICAL production advisories, and a Trivy gate that blocks on CRITICAL fixable dependency vulnerabilities, while keeping informational findings (secrets, misconfigs) in the existing SARIF scan.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a clear summary and rationale, but the pre-merge checklist is entirely unchecked or incomplete, which is a requirement per the template. Complete the pre-merge checklist by checking each applicable item or marking with N/A; at minimum verify that bun run check was executed and document the test plan.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: blocking CI on CVEs (security gate) and enabling Renovate security fast-track.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-cve-gate-and-renovate-security-fasttrack

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Running the new gate on this PR surfaced a pre-existing backlog of 13 HIGH
advisories (mostly transitive/dev — picomatch, tar via jsdom, lodash/axios via
swagger-ui-react & commitizen — plus xlsx/SheetJS, which has no fixed npm
release). Hard-blocking HIGH immediately would red-line all of CI.

So the blocking gate is CRITICAL for now (bun audit --audit-level=critical;
Trivy severity CRITICAL), which is green today and blocks the most severe new
CVEs. HIGH stays fully visible — the bun audit report step prints all
severities to the job summary, and Trivy's SARIF still uploads HIGH+CRITICAL to
the Security tab. The gate ratchets to HIGH once the backlog is remediated.
The new CRITICAL CVE gate (#1498) caught a fixable critical: nltk 3.9.2 has a
Zip Slip → code-execution flaw (CVE-2025-14009, fixed in 3.9.3). Bumped the
transitive nltk in services/crawler to 3.9.4 via `uv lock --upgrade-package`.

Also broadened the Security workflow's path filter from services/rag/* to
services/*/{uv.lock,pyproject.toml} so any Python service's dependency changes
(crawler included) trigger the scan — the crawler lockfile wasn't covered,
which is why this CVE could land without a PR-time scan.
@yannickmonney
yannickmonney merged commit 78ad9c2 into main Jun 1, 2026
30 checks passed
@yannickmonney
yannickmonney deleted the feat/ci-cve-gate-and-renovate-security-fasttrack branch June 1, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant