Skip to content

fix(ci): make dependency audit non-blocking - #2048

Merged
Eli Bosley (elibosley) merged 1 commit into
mainfrom
fix/ci-audit-non-blocking
Jul 22, 2026
Merged

fix(ci): make dependency audit non-blocking#2048
Eli Bosley (elibosley) merged 1 commit into
mainfrom
fix/ci-audit-non-blocking

Conversation

@elibosley

@elibosley Eli Bosley (elibosley) commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

The Audit Dependencies job (pnpm run audit --prod) fails the entire CI - Main (API) workflow whenever a transitive production dependency has an open advisory. This turned the 4.36.0 release run red over unrelated advisories (hono, fast-uri, immutable) and required manual recovery of the production publish. This change marks the audit job continue-on-error so it can never block a release again.

Why This Exists

audit is not in any publish job's needs, so it doesn't gate publishing through the dependency graph — it blocks by turning the aggregate workflow conclusion red, which branch protection, downstream workflow_run gates, and humans all key off of. This is the same class of failure already patched for PR plugin previews in #2046, whose commit note reads: "an Audit Dependencies failure made the aggregate workflow conclusion fail." Rather than papering over the three current advisories in the ignore list, this keeps the audit fully decoupled from the publish path.

Resolution

Add continue-on-error: true to the audit job. The audit still runs on every PR and push and still surfaces vulnerable dependencies as step annotations and logs, but a finding no longer fails the workflow.

Behavior Changes

  • A dependency advisory no longer fails CI - Main (API) or blocks a release/publish.
  • The Audit Dependencies job now reports success (with the failing step annotated) even when advisories are present.

Trade-off

The audit becomes advisory-only: a genuinely high/critical advisory will also no longer block a release. Individual advisories can still be triaged/suppressed via the existing pnpm.auditConfig (ignoreCves / ignoreGhsas) mechanism in package.json if a hard gate on specific CVEs is ever wanted.

Verification

  • actionlint .github/workflows/main.yml reports only pre-existing shellcheck/type notes in untouched jobs; no new issues from this change.

Summary by CodeRabbit

  • Chores
    • Dependency audit checks are now advisory and will no longer block the workflow when issues are detected.

The Audit Dependencies job runs pnpm audit --prod and fails the whole
CI - Main (API) workflow whenever a transitive prod dependency has an
open advisory (currently hono/fast-uri/immutable). Because publishing
and downstream gates key off the aggregate workflow conclusion, an
unrelated audit finding turned the 4.36.0 release run red and required
manual recovery. This is the same class of failure previously patched
for PR plugin previews in #2046.

Mark the audit job continue-on-error so it stays advisory: vulnerable
dependencies are still surfaced as annotations and logs on every PR and
push, but a finding no longer fails the workflow or blocks a release.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The dependency audit job is marked advisory-only, allowing the workflow to continue when the audit reports vulnerable dependencies or otherwise fails.

Changes

Advisory dependency audit

Layer / File(s) Summary
Allow audit failures
.github/workflows/main.yml
The audit job adds comments documenting its advisory role and sets continue-on-error: true.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a rabbit with ears held high,
Audit warnings now drift by.
They still appear, both loud and clear,
But won’t stop the workflow here.
Hop, hop—green checks persevere!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: making the CI dependency audit advisory-only and non-blocking.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-audit-non-blocking

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/main.yml:
- Around line 169-171: Move continue-on-error: true from the audit job
configuration to the Audit production dependencies step, leaving checkout and
setup failures able to fail the job while only audit findings are ignored.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fb93858a-3f5e-4ab3-8860-b452a97d6dda

📥 Commits

Reviewing files that changed from the base of the PR and between 689620c and c2a8bd4.

📒 Files selected for processing (1)
  • .github/workflows/main.yml

Comment on lines +169 to +171
# Advisory-only: surface vulnerable dependencies without failing the
# workflow, so an audit finding can never block a release or publish.
continue-on-error: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant workflow section with line numbers.
sed -n '150,210p' .github/workflows/main.yml | cat -n

# Inspect whether continue-on-error appears at job or step scope elsewhere in the workflow.
rg -n "continue-on-error" .github/workflows/main.yml

Repository: unraid/api

Length of output: 2836


🌐 Web query:

GitHub Actions job-level continue-on-error step failures workflow behavior

💡 Result:

In GitHub Actions, the behavior of continue-on-error differs significantly depending on whether it is applied at the step level or the job level [1][2]. Step-Level Behavior When you set continue-on-error: true on a specific step, the workflow will continue to the next step even if that step fails [3][2]. The failed step will be reported with a "success" or "neutral" outcome in the workflow logs (though its outcome will be failure, its conclusion will be success), which allows subsequent steps to execute [2]. - If you use a conditional like if: failure in a subsequent step, it may not trigger as expected because the previous step is technically not marked as a "failure" by the runner [2]. - To check if a specific step with continue-on-error failed, you should use the step's outcome context: if: steps.<step_id>.outcome!= 'success' [2]. Job-Level Behavior Applying continue-on-error: true at the job level is designed to allow the workflow to proceed with other jobs even if the current job fails [4][5]. However, unlike step-level usage, this does not "silently" hide the failure of the job itself in the GitHub UI [5]. A job with continue-on-error: true will still be reported as a failure in the pull request and workflow summary UI if any of its steps fail, even if the workflow continues to execute subsequent dependent jobs [5]. Key Considerations - Status Checks: Because job-level continue-on-error still marks the job as a failure in the UI, it can impact status checks and branch protection rules that require specific jobs to pass [5]. - Workarounds: If you need to detect a failure in a step while still allowing the job to continue, or if you need to ensure a job fails despite a "continue-on-error" setting, you can manually exit the job in a subsequent step (e.g., run: exit 1) based on the outcome of the previous step [3][2].

Citations:


🌐 Web query:

site:docs.github.com GitHub Actions continue-on-error job level step level semantics

💡 Result:

In GitHub Actions, the continue-on-error property functions differently depending on whether it is applied at the step level or the job level [1][2]. Step-Level Semantics When continue-on-error is set to true for an individual step, it prevents the job from failing when that specific step fails [1][2]. - The workflow execution continues to subsequent steps in the job [1][2]. - The outcome property of the step will be failure, but the final conclusion property will be success [3][4][5]. - This allows the job to proceed even if a non-critical step fails [6]. Job-Level Semantics When continue-on-error is set to true at the job level, it prevents the entire workflow run from failing if that specific job fails [1][7][8]. - If a job with continue-on-error: true fails, the job itself is considered successful regarding the overall workflow status [1]. - This is particularly useful when using a job matrix where certain experimental jobs might fail without needing to invalidate the entire workflow run [1][7][8]. In summary, step-level continue-on-error keeps a job running despite a failing step, while job-level continue-on-error keeps a workflow running despite a failing job [1]. Both properties accept boolean values and can be dynamically set using expressions [9][7][8].

Citations:


Scope continue-on-error to the audit step.
Keeping it at job scope makes the entire audit job non-blocking, so checkout/setup failures won’t fail the workflow. Move it to Audit production dependencies so only audit findings are ignored.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/main.yml around lines 169 - 171, Move continue-on-error:
true from the audit job configuration to the Audit production dependencies step,
leaving checkout and setup failures able to fail the job while only audit
findings are ignored.

@elibosley
Eli Bosley (elibosley) merged commit 9db6c38 into main Jul 22, 2026
8 of 9 checks passed
@elibosley
Eli Bosley (elibosley) deleted the fix/ci-audit-non-blocking branch July 22, 2026 03:09
@github-actions

Copy link
Copy Markdown
Contributor

This plugin has been deployed to Cloudflare R2 and is available for testing.
Download it at this URL:

https://preview.dl.unraid.net/unraid-api/tag/PR2048/dynamix.unraid.net.plg

Eli Bosley (elibosley) added a commit that referenced this pull request Jul 22, 2026
## Summary
Clears every finding from `pnpm run audit --prod` (which now exits 0
with zero advisories), addressing the vulnerabilities that turned the
[4.36.0 release
run](https://github.com/unraid/api/actions/runs/29869430785) red.
Companion to #2048, which stops audit findings from blocking publishing;
this one removes the findings themselves.

## Changes
| Advisory | Package | Fix |
|---|---|---|
|
[GHSA-4c8g-83qw-93j6](GHSA-4c8g-83qw-93j6)
(high) | `fast-uri` (via `api > fastify`) | Bump `pnpm.overrides` pin
`3.1.2 → 3.1.4` |
|
[GHSA-w62v-xxxg-mg59](GHSA-w62v-xxxg-mg59)
(mod, XSS) | `hono` (via MCP SDK) | Add `pnpm.overrides` pin `4.12.31` |
|
[GHSA-xvcm-6775-5m9r](GHSA-xvcm-6775-5m9r)
(high, DoS) | `immutable` (via `@graphql-codegen/client-preset`) | Move
`client-preset` to `devDependencies` |
|
[GHSA-frvp-7c67-39w9](GHSA-frvp-7c67-39w9)
(mod, path traversal) | `@hono/node-server` (via `shadcn-vue`) | Move
`shadcn-vue` to `devDependencies` |

## Why the dependency moves (instead of forcing overrides)
`immutable` has no patched 3.x (fix requires the 4.x major) and
`@hono/node-server` requires the 2.x major — forcing either global
override risks breaking the codegen/relay-compiler and MCP SDK
toolchains. Both advisories reach `--prod` only because their carriers
were mislabeled as runtime dependencies:

- **`@graphql-codegen/client-preset`** backs `preset: 'client'` in
`api/codegen.ts` (build-time codegen) and is never imported at runtime.
Its eight sibling `@graphql-codegen/*` packages — and `web`'s copy of
`client-preset` itself — are already `devDependencies`. This just fixes
the inconsistency.
- **`shadcn-vue`** is a component-scaffolding CLI referenced only in
`unraid-ui`'s README and `components.json`; it is never imported by the
built library.

Moving them to `devDependencies` is correct hygiene and takes both
advisories out of the production graph without a risky major bump. They
remain installed for dev/CI, so codegen and component scaffolding are
unaffected.

## Verification
- `pnpm install --lockfile-only` succeeds; lockfile resolves
`fast-uri@3.1.4` and `hono@4.12.31`.
- `pnpm run audit --prod` → exit 0, `{info:0, low:0, moderate:0, high:0,
critical:0}`.
- Confirmed neither moved package is imported in runtime source (grep
across `api/src` and `unraid-ui/src`).
Eli Bosley (elibosley) pushed a commit that referenced this pull request Jul 22, 2026
🤖 I have created a release *beep* *boop*
---


## [4.36.1](v4.36.0...v4.36.1)
(2026-07-22)


### Bug Fixes

* **ci:** make dependency audit non-blocking
([#2048](#2048))
([9db6c38](9db6c38))
* **deps:** resolve production audit advisories
([#2049](#2049))
([e5654cc](e5654cc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.92%. Comparing base (689620c) to head (c2a8bd4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2048   +/-   ##
=======================================
  Coverage   52.92%   52.92%           
=======================================
  Files        1035     1035           
  Lines       72122    72122           
  Branches     8313     8312    -1     
=======================================
+ Hits        38169    38170    +1     
+ Misses      33826    33825    -1     
  Partials      127      127           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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