chore(security): raise CI npm audit to high and fix high-severity advisories - #1201
Conversation
…isories Raise the CI npm audit gate from moderate to high severity and resolve all high-severity advisories reported by `yarn npm audit --all --recursive`. - minimatch: refresh to 7.4.9 / 9.0.9 via in-range lockfile update (ReDoS) - path-to-regexp: refresh to 0.1.13 via in-range lockfile update (ReDoS) - ws: fix stale resolution selector ws@8.20.0 -> ws@^8.18.0 pinned to 8.21.0 - serialize-javascript: add resolution ^6.0.2 -> 7.0.3 override (RCE); terser-webpack-plugin has no release depending on serialize-javascript@7 yet, so this override is the workaround. Verified via a successful `yarn web:build:prod` (terser minification) and validated by copy-webpack-plugin already using serialize-javascript@7 in the same tree. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe CI workflow now fails ChangesCI and Dependency Resolution Updates
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
25-25: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winModerate vulnerabilities will no longer fail CI.
Raising the threshold from
moderatetohighis a deliberate security posture reduction — new moderate-severity advisories will silently pass CI. Consider adding a separate non-blocking audit step (e.g.,yarn npm audit --all --recursive --severity moderate --json || true) to keep visibility without gating the build, or document the rationale for future maintainers.🤖 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/ci.yml at line 25, The CI audit threshold in the workflow is being relaxed so moderate vulnerabilities no longer fail builds. Update the workflow step that runs the npm audit command to preserve visibility for moderate issues without blocking CI, ideally by adding a separate non-blocking audit step alongside the existing high-severity gate, and keep the change localized to the audit command entry in the workflow.
🤖 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 `@package.json`:
- Line 89: The override for serialize-javascript is forcing version 7.0.3 even
though terser-webpack-plugin@5.3.16 expects a 6.x release. Update
terser-webpack-plugin to 5.3.17 or later if you want to keep the override, or
change/remove the override in package.json so it stays on a compatible 6.x
version; use the serialize-javascript override entry and terser-webpack-plugin
dependency as the anchor points.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Line 25: The CI audit threshold in the workflow is being relaxed so moderate
vulnerabilities no longer fail builds. Update the workflow step that runs the
npm audit command to preserve visibility for moderate issues without blocking
CI, ideally by adding a separate non-blocking audit step alongside the existing
high-severity gate, and keep the change localized to the audit command entry in
the workflow.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a14e64f0-b6e0-4623-aadd-a4a6e45b0525
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock,!yarn.lock
📒 Files selected for processing (2)
.github/workflows/ci.ymlpackage.json
…-webpack-plugin terser-webpack-plugin >= 5.3.17 removed its serialize-javascript dependency, so refreshing it (in-range, webpack allows ^5.3.11) eliminates the vulnerable serialize-javascript@6 path entirely. The cross-major `serialize-javascript@^6.0.2 -> 7.0.3` resolution override is no longer needed and has been removed. Audit remains clean at --severity high; web:build:prod verified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
…isories (lichtblick-suite#1201) ## Summary Raises the CI `npm audit` gate from `moderate` to **`high`** severity and fixes every high-severity advisory currently reported by `yarn npm audit --all --recursive --severity high`. ## Changes - **CI** (`.github/workflows/ci.yml`): audit step now runs with `--severity high`. - **minimatch** `7.4.7`/`9.0.6` → `7.4.9`/`9.0.9` — in-range lockfile refresh (`yarn up -R`). ReDoS (GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74). - **path-to-regexp** `0.1.12` → `0.1.13` — in-range lockfile refresh. ReDoS (GHSA-37ch-88jc-xwx2). - **ws** `8.19.0` → `8.21.0` — corrected a stale resolution selector (`ws@8.20.0` never matched the real `^8.18.0` descriptor) to `ws@^8.18.0`. DoS (GHSA-96hv-2xvq-fx4p). - **serialize-javascript** `6.0.2` → `7.0.3` — `resolutions` override. RCE (GHSA-5c6j-r48x-rmvq). ## Workaround note: serialize-javascript All `6.x` are vulnerable; the first patched release is `7.0.3` (a major bump). `terser-webpack-plugin@5.3.16` still pins `serialize-javascript@^6.0.2` and upstream has not published a release depending on `7.x`, so an in-range fix is not possible. The `resolutions` override forces the patched major. Compatibility validated by: - a successful `yarn web:build:prod` (exercises terser minification), and - `copy-webpack-plugin@14` already using `serialize-javascript@7` in the same dependency tree. When terser-webpack-plugin ships a release depending on `serialize-javascript@^7`, this override becomes stale and can be removed. ## Validation - `yarn npm audit --all --recursive --severity high` → **clean** (`No audit suggestions`, exit 0). - `yarn web:build:prod` → **success**. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Tightened the security check threshold in CI: builds now fail on higher-severity audit findings. * Updated dependency resolution settings to improve compatibility while still keeping the targeted WebSocket library locked to the intended version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…isories (lichtblick-suite#1201) ## Summary Raises the CI `npm audit` gate from `moderate` to **`high`** severity and fixes every high-severity advisory currently reported by `yarn npm audit --all --recursive --severity high`. ## Changes - **CI** (`.github/workflows/ci.yml`): audit step now runs with `--severity high`. - **minimatch** `7.4.7`/`9.0.6` → `7.4.9`/`9.0.9` — in-range lockfile refresh (`yarn up -R`). ReDoS (GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74). - **path-to-regexp** `0.1.12` → `0.1.13` — in-range lockfile refresh. ReDoS (GHSA-37ch-88jc-xwx2). - **ws** `8.19.0` → `8.21.0` — corrected a stale resolution selector (`ws@8.20.0` never matched the real `^8.18.0` descriptor) to `ws@^8.18.0`. DoS (GHSA-96hv-2xvq-fx4p). - **serialize-javascript** `6.0.2` → `7.0.3` — `resolutions` override. RCE (GHSA-5c6j-r48x-rmvq). ## Workaround note: serialize-javascript All `6.x` are vulnerable; the first patched release is `7.0.3` (a major bump). `terser-webpack-plugin@5.3.16` still pins `serialize-javascript@^6.0.2` and upstream has not published a release depending on `7.x`, so an in-range fix is not possible. The `resolutions` override forces the patched major. Compatibility validated by: - a successful `yarn web:build:prod` (exercises terser minification), and - `copy-webpack-plugin@14` already using `serialize-javascript@7` in the same dependency tree. When terser-webpack-plugin ships a release depending on `serialize-javascript@^7`, this override becomes stale and can be removed. ## Validation - `yarn npm audit --all --recursive --severity high` → **clean** (`No audit suggestions`, exit 0). - `yarn web:build:prod` → **success**. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Tightened the security check threshold in CI: builds now fail on higher-severity audit findings. * Updated dependency resolution settings to improve compatibility while still keeping the targeted WebSocket library locked to the intended version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…isories (lichtblick-suite#1201) ## Summary Raises the CI `npm audit` gate from `moderate` to **`high`** severity and fixes every high-severity advisory currently reported by `yarn npm audit --all --recursive --severity high`. ## Changes - **CI** (`.github/workflows/ci.yml`): audit step now runs with `--severity high`. - **minimatch** `7.4.7`/`9.0.6` → `7.4.9`/`9.0.9` — in-range lockfile refresh (`yarn up -R`). ReDoS (GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74). - **path-to-regexp** `0.1.12` → `0.1.13` — in-range lockfile refresh. ReDoS (GHSA-37ch-88jc-xwx2). - **ws** `8.19.0` → `8.21.0` — corrected a stale resolution selector (`ws@8.20.0` never matched the real `^8.18.0` descriptor) to `ws@^8.18.0`. DoS (GHSA-96hv-2xvq-fx4p). - **serialize-javascript** `6.0.2` → `7.0.3` — `resolutions` override. RCE (GHSA-5c6j-r48x-rmvq). ## Workaround note: serialize-javascript All `6.x` are vulnerable; the first patched release is `7.0.3` (a major bump). `terser-webpack-plugin@5.3.16` still pins `serialize-javascript@^6.0.2` and upstream has not published a release depending on `7.x`, so an in-range fix is not possible. The `resolutions` override forces the patched major. Compatibility validated by: - a successful `yarn web:build:prod` (exercises terser minification), and - `copy-webpack-plugin@14` already using `serialize-javascript@7` in the same dependency tree. When terser-webpack-plugin ships a release depending on `serialize-javascript@^7`, this override becomes stale and can be removed. ## Validation - `yarn npm audit --all --recursive --severity high` → **clean** (`No audit suggestions`, exit 0). - `yarn web:build:prod` → **success**. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Tightened the security check threshold in CI: builds now fail on higher-severity audit findings. * Updated dependency resolution settings to improve compatibility while still keeping the targeted WebSocket library locked to the intended version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>



Summary
Raises the CI
npm auditgate frommoderatetohighseverity and fixes every high-severity advisory currently reported byyarn npm audit --all --recursive --severity high.Changes
.github/workflows/ci.yml): audit step now runs with--severity high.7.4.7/9.0.6→7.4.9/9.0.9— in-range lockfile refresh (yarn up -R). ReDoS (GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74).0.1.12→0.1.13— in-range lockfile refresh. ReDoS (GHSA-37ch-88jc-xwx2).8.19.0→8.21.0— corrected a stale resolution selector (ws@8.20.0never matched the real^8.18.0descriptor) tows@^8.18.0. DoS (GHSA-96hv-2xvq-fx4p).6.0.2→7.0.3—resolutionsoverride. RCE (GHSA-5c6j-r48x-rmvq).Workaround note: serialize-javascript
All
6.xare vulnerable; the first patched release is7.0.3(a major bump).terser-webpack-plugin@5.3.16still pinsserialize-javascript@^6.0.2and upstream has not published a release depending on7.x, so an in-range fix is not possible. Theresolutionsoverride forces the patched major. Compatibility validated by:yarn web:build:prod(exercises terser minification), andcopy-webpack-plugin@14already usingserialize-javascript@7in the same dependency tree.When terser-webpack-plugin ships a release depending on
serialize-javascript@^7, this override becomes stale and can be removed.Validation
yarn npm audit --all --recursive --severity high→ clean (No audit suggestions, exit 0).yarn web:build:prod→ success.Summary by CodeRabbit