Skip to content

fix: resolve Node.js audit CI failures#274

Merged
CybotTM merged 1 commit intomainfrom
fix/node-audit-findings
Apr 3, 2026
Merged

fix: resolve Node.js audit CI failures#274
CybotTM merged 1 commit intomainfrom
fix/node-audit-findings

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented Apr 3, 2026

Summary

  • Add missing .nvmrc file (Node 22) required by the reusable node-audit.yml workflow, which defaults node-version-file to .nvmrc
  • Fix 3 npm audit findings (2 high, 1 moderate) via npm audit fix:

Root cause

The Security workflow calls netresearch/.github/.github/workflows/node-audit.yml which defaults node-version-file to .nvmrc. Since the repo had no .nvmrc, actions/setup-node failed before npm audit ever ran. Even if setup-node had succeeded, the audit would have failed on the lodash and path-to-regexp high-severity findings.

Test plan

  • Verify Node.js Audit CI check passes (.nvmrc found, npm audit clean)
  • Verify CI workflow still passes (no breaking dependency changes)

Add missing .nvmrc (Node 22) required by the reusable node-audit
workflow and fix npm audit findings:

- lodash <=4.17.23: Code Injection via _.template (GHSA-r5fr-rjxr-66jc)
  and Prototype Pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh)
- path-to-regexp <0.1.13: ReDoS via multiple route params (GHSA-37ch-88jc-xwx2)
- ajv <6.14.0: ReDoS when using $data option (GHSA-2g4f-4pwh-qvx6)
@CybotTM CybotTM merged commit 9d24074 into main Apr 3, 2026
5 checks passed
@CybotTM CybotTM deleted the fix/node-audit-findings branch April 3, 2026 07:33
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Node.js version to 22 and increments several dependency versions in package-lock.json, including ajv, lodash, and path-to-regexp. Feedback was provided regarding the unintended change of the package name to 'fix-timetracker-audit' in the lock file, which should be reverted to maintain consistency.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.49%. Comparing base (7847733) to head (2323b23).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #274   +/-   ##
=========================================
  Coverage     81.49%   81.49%           
  Complexity     2579     2579           
=========================================
  Files           172      172           
  Lines          7107     7107           
=========================================
  Hits           5792     5792           
  Misses         1315     1315           
Flag Coverage Δ
integration 47.47% <ø> (ø)
unit 50.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

CybotTM added a commit that referenced this pull request Apr 3, 2026
## Summary
- Fix `package-lock.json` name from `fix-timetracker-audit` (branch
name) to `timetracker`
- Caused by `npm audit fix` using the working directory name as package
name
- Addresses review comments on PR #274

## Test plan
- [ ] Verify package-lock.json has correct name
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