Commit 0f6126b
Add npm audit security check to CI pipeline (#1662)
Fixes CI-126.
## Additional Notes
Added a dedicated `audit` job to the CI pipeline that runs `npm audit
--audit-level=critical` after dependency installation. Build fails if
critical vulnerabilities are detected.
**Implementation:**
- New job positioned after `install` job, before other checks
- Reuses `node_modules` cache from install step via same cache key
- No conditional execution—runs on every build regardless of cache
status
- Follows the same permission structure as other jobs (lint, test,
build) for consistency
## Testing Checklist
Check all that apply:
- [x] I tested the feature thoroughly, including edge cases
- [x] I verified all affected areas still work as expected
- [x] Automated tests were added/updated if necessary
- [x] Changes are backwards compatible with any existing data, otherwise
a migration script is provided
## Visual Changes (if applicable)
N/A - CI pipeline configuration only
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> Update the CI pipeline so that, after NPM dependencies are installed,
an explicit npm audit step is run. The audit step must fail the build if
any vulnerabilities of medium or higher severity are detected. The audit
job should reuse the dependency installation cache created by the NPM
install job, but the audit job itself must always execute regardless of
cache hit status (i.e. it should run on every build, not be skipped if
the cache is restored). In the pull request body, include the statement:
"Fixes CI-126."
</details>
*This pull request was created as a result of the following prompt from
Copilot chat.*
> Update the CI pipeline so that, after NPM dependencies are installed,
an explicit npm audit step is run. The audit step must fail the build if
any vulnerabilities of medium or higher severity are detected. The audit
job should reuse the dependency installation cache created by the NPM
install job, but the audit job itself must always execute regardless of
cache hit status (i.e. it should run on every build, not be skipped if
the cache is restored). In the pull request body, include the statement:
"Fixes CI-126."
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: maor-rozenfeld <49363375+maor-rozenfeld@users.noreply.github.com>1 parent d72e077 commit 0f6126b
4 files changed
Lines changed: 24 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
28 | 43 | | |
29 | 44 | | |
30 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11834 | 11834 | | |
11835 | 11835 | | |
11836 | 11836 | | |
11837 | | - | |
| 11837 | + | |
11838 | 11838 | | |
11839 | 11839 | | |
11840 | 11840 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
0 commit comments