Skip to content

ci: gate releases on scoped dependency security scans - #31746

Closed
nwparker wants to merge 7 commits into
mainfrom
nwparker/cargo-deny
Closed

nwparker wants to merge 7 commits into
mainfrom
nwparker/cargo-deny

Conversation

@nwparker

@nwparker nwparker commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Releases now check their dependencies for known security problems before they can publish. High/critical JavaScript findings, Rust advisory failures, and incomplete scans stop the release; lower-severity JavaScript findings stay visible in reports.

What Changed

Release path Dependencies checked
Desktop cut + standalone macOS build Desktop, embedded mobile web, audit tools, native Rust
iOS + Android Mobile pnpm graph
Docs production Docs pnpm graph
Relay/fence new images + push gateway Cloud pnpm graph
  • Resolve release sources to immutable SHAs; scan with policy/tooling from the workflow commit, read-only credentials, and script-free frozen installs. Publication jobs depend on success. Reports upload on failures.
  • Protect recovered draft publication: accept the scanned commit or its direct child with only a root package version bump.
  • Add reusable pnpm audit/license tooling for all five workspaces and pinned cargo-deny 0.20.2. Broader dependency-policy CI runs on dependency changes and daily, with JavaScript inventories on macOS/Linux/Windows. Register it for obsolete-run cleanup and cancel scans when a PR becomes a draft.
  • Recognize the patches already merged in fix: remediate dependency security advisories across workspaces #31681 only through exact advisory/package/workspace exceptions, verified patch registrations and SHA-256 hashes, expiring 2026-11-20. No blanket baseline or license exceptions.

Rollout: release checks use security-only mode, so license findings are reported without blocking releases. JavaScript dependency-policy CI also uses security-only mode while collecting license inventories; the local full-policy command still enforces license review. Rust CI retains full policy checks. These checks are not added to branch protection.

Why

Checking the actual release graph at publication time catches newly disclosed advisories without blocking unrelated release surfaces. Trusted tooling prevents older candidate refs from weakening the gate. Existing-image mirrors/rollbacks retain their digest-based paths; a source lockfile scan cannot certify an already published image.

Scope: pnpm dependencies (including development/optional) and native Rust. Container/OS layers, downloaded binaries, CocoaPods, Gradle, and Ruby dependencies need separate coverage.

Linked Issue

Maintainer-requested follow-up to merged #31681.

Visual Proof

N/A — CI and release tooling only; no product UI or interaction changes. HTML explainers remain local and are not included.

Testing

  • Manually exercised locally on macOS: all five pnpm security scans and both native Rust projects passed, including scanning a separate source checkout with trusted local tooling.
  • Automated policy/release tests added/updated. The latest local CI-contract/policy/editor run passed 514 tests; 37 cloud deployment/docs checks also passed.
  • Changed-file code quality, workflow actionlint (existing custom runner labels excluded), and diff whitespace checks passed. Frozen dependency install and internal package build passed.
  • Full GitHub CI passed: Linux/macOS/Windows dependency scans, Rust policy, static analysis, typechecks, unit shards, packaging, Electron E2E, and the final PR checks passed gate. No failed or pending checks. No release or deployment was triggered.

Review

  • Self-reviewed release dependencies, immutable source selection, failure handling, and expiring exceptions.
  • Cross-platform scanner execution considered; no application remote/mobile compatibility changes.

Agent skill upstream boundary

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

@nwparker
nwparker requested a review from Jinwoo-H as a code owner October 22, 2026 00:55
@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: 2be2e68a-2e56-402f-96f7-eaf7e424818f
📥 Commits

Reviewing files that changed from the base of the PR and between 0834610 and ebe7f5f.

⛔ Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 24
  • .github/workflows/cloud-publish-relay-production.yml
  • .github/workflows/cloud-push-deploy.yml
  • .github/workflows/dependency-policy.yml
  • .github/workflows/docs.yml
  • .github/workflows/mobile-android-release.yml
  • .github/workflows/mobile-ios-release.yml
  • .github/workflows/release-cut.yml
  • .github/workflows/release-dependency-security.yml
  • .github/workflows/release-mac-build.yml
  • cloud/dev/scripts/push-gateway-workflow.test.mjs
  • config/cargo-deny.toml
  • config/dependency-policy.json
  • config/dependency-policy.md
  • config/scripts/check-dependencies.mjs
  • config/scripts/dependency-patch-exceptions.mjs
  • config/scripts/dependency-patch-exceptions.test.mjs
  • config/scripts/dependency-policy.mjs
  • config/scripts/dependency-policy.test.mjs
  • config/scripts/mac-notarization-builder-contract.test.mjs
  • config/scripts/publish-complete-draft-releases.mjs
  • config/scripts/publish-complete-draft-releases.test.mjs
  • config/scripts/release-cut-token-permissions.test.mjs
  • config/scripts/release-dependency-security.test.mjs
  • package.json

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

📝 Walkthrough

The changes add JavaScript and Rust dependency policy checks, a reusable security workflow, and a scheduled dependency-policy workflow. Selected cloud, documentation, mobile, macOS, and release-cut workflows now run security checks against a specified source commit and gate build or publication jobs on the results. Release-cut also checks out recovery scripts from the workflow revision and uses them to validate release tags.

Priority: ⚪ Pending latest changes

Merge Risk: ⚪ Minimal · up to ebe7f

No actionable release-gate risk was established. The change is mergeable 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 16 functions across 11 files. (13 skipped:… 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 describes the primary change: release publication is gated by scoped dependency security scans.
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 mostly complete. It covers the user-facing change, implementation scope, rationale, linked prior issue, visual proof, testing, review, and agent-skill boundary. The maintainer follo…
Full details: Description check

Explanation

The description is mostly complete. It covers the user-facing change, implementation scope, rationale, linked prior issue, visual proof, testing, review, and agent-skill boundary. The maintainer follow-up references merged issue #31681, which satisfies the repository’s maintainer exception. The Notes and Checklist sections are not included, but this is non-critical because the relevant security, cross-platform, testing, and scope information appears elsewhere.

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 16 functions across 11 files. (13 skipped: 13 unsupported.)

Resolution

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

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • 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.

# Conflicts:
#	src/renderer/src/components/native-chat/NativeChatQueuedMessageEditor.test.tsx
#	src/renderer/src/i18n/locales/pt.json
@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded by #31858 at maintainer request. The replacement starts with Linux CI/daily vulnerability checks across the five JavaScript lockfiles and direct native Rust advisory checks, with saved reports. It removes the license-policy subsystem, platform matrix, and release gates, and fixes exception handling so removed/fixed dependencies do not remain blocked by stale exceptions.

Independent adversarial review of the replacement found no blockers. Closing this broader proposal in favor of the smaller first increment.

@nwparker nwparker closed this Oct 22, 2026
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