Skip to content

ci: check dependency vulnerabilities on PRs and stable releases - #31858

Merged
nwparker merged 4 commits into
mainfrom
nwparker/dependency-security-ci
Oct 22, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/dependency-security-ci

Conversation

@nwparker

@nwparker nwparker commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Check known dependency vulnerabilities when dependencies change and before publishing a stable desktop release. No daily schedule.

What Changed

  • One reusable Linux workflow audits JavaScript lockfiles and native Rust advisories with pinned cargo-deny 0.20.2. Reports upload even on failure.
  • Dependency-change PRs and manual runs audit all five pnpm lockfiles. Stable desktop releases audit the exact release tag's desktop and bundled mobile-web lockfiles plus native Rust, in parallel with builds. Publication requires success; RCs skip this gate. Unrelated cloud/docs/audit-tool findings do not block desktop releases.
  • Release scanner tooling and exception policy come from the workflow commit. Only candidate lockfiles, workspace patch registrations, Rust manifests, and patch bytes are extracted. Package manifests, pnpm/Cargo configuration, toolchain overrides, and symlinks are excluded; the candidate is never installed. This prevents pnpm package-manager switching and Cargo metadata wrappers from executing candidate code. This also supports release refs that predate the scanner scripts.
  • High/critical JavaScript findings and scanner errors fail the check. Existing reviewed patches are exempted only for the exact workspace/package/version/advisory after verifying patch bytes, registration, locked hash and every snapshot. Expired actual exceptions block; obsolete exceptions do not fail clean scans.
  • Rust scans use locked manifests, all features, no target restriction and no advisory ignores. Scanner binaries are cached; advisory data is refreshed. Registry/advisory failures block stable publication until a successful rerun.
  • Draft/obsolete PR cancellation follows existing conventions. Release concurrency is separate from PR/manual runs.

No new project dependencies, license enforcement, platform matrix, daily/main-push runs, or branch-protection changes. Replaces the broader #31746.

Performance

The prior CI run measured 2 seconds for all five JavaScript audits and 1 second for both Rust audits. Full jobs took 44 seconds and 2m04s, including a cold Rust scanner installation. Release scans fetch only the release data needed for the audit and overlap the release builds.

Linked Issue

Maintainer-requested replacement for #31746.

Visual Proof

N/A — CI and command-line tooling only.

Testing

  • 60 focused tests passed, covering advisory/patch exceptions, scanner failures, PR cancellation, release permissions, stable publication failure cases, RC skipping and existing signing/ref guards.
  • Extraction regression runs the actual action command against a Git fixture and verifies Rust/patch data is included while candidate executable configuration and package manifests are excluded. Candidate archive attributes cannot omit inputs, and missing required lockfiles/workspace YAMLs fail rather than falling back to the tooling workspace.
  • Live JavaScript and Rust scans passed against extracted candidate data. The release scan also passed with cloud/docs/audit-tools and candidate policy files absent; hooks did not run and no candidate node_modules was created.
  • Node typecheck, changed-code quality, formatting, workflow syntax and diff checks passed.
  • Independent adversarial review of final commit ab930a3: no remaining blockers; extraction bypass and candidate-configuration findings were fixed and regression-tested.
  • Prior workflow CI passed both scanner jobs; the updated commit will run PR CI again.

Review

Stable release scans cover desktop build dependencies as well as runtime dependencies and the bundled mobile web app. Cloud/docs/audit-tool scans remain PR/manual checks. Existing process wrappers preserve local cross-platform invocation; no remote, mobile runtime, or folder-workspace behavior changes.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer source or assets copied.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 367109ea-bfb1-4fe9-abf5-ba5a3e31ff23
📥 Commits

Reviewing files that changed from the base of the PR and between 76ff5c8 and f392d38.

📒 Files selected for processing: 6
  • .github/workflows/dependency-security.yml
  • .github/workflows/release-cut.yml
  • config/dependency-security.md
  • config/scripts/check-dependency-security.mjs
  • config/scripts/dependency-security-release.test.mjs
  • config/scripts/release-cut-token-permissions.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The change adds JavaScript and Rust dependency audits. JavaScript findings are checked against validated exceptions for reviewed patches. A new workflow runs the audits for relevant pull requests and stable releases, and stable release publication depends on a successful check. The change also adds Cargo Deny configuration, audit documentation, workflow tests, and PR workflow-cancellation handling.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to f392d

No identified issue blocks merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely summarizes the main change: dependency vulnerability checks for pull requests and stable releases.
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.
Description check Passed The description is detailed and covers the change, rationale, linked issue reference, visual proof, testing, review scope, and agent boundary. It omits an explicit "## Why" heading and the template's …
Full details: Description check

Explanation

The description is detailed and covers the change, rationale, linked issue reference, visual proof, testing, review scope, and agent boundary. It omits an explicit "## Why" heading and the template's Notes and Checklist sections, but the required information is largely present and the omissions are non-critical.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 6 files. (3 skipped: 3 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@nwparker nwparker changed the title ci: add Linux dependency vulnerability checks ci: check dependency vulnerabilities on PRs and stable releases Oct 22, 2026
@nwparker
nwparker merged commit 2078db9 into main Oct 22, 2026
57 of 58 checks passed
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.

2 participants