Skip to content

Commit 3fe0b6e

Browse files
authored
Merge pull request #2233 from Particular/npm-audit
Add a step on the build so it will fail when there is CVEs
2 parents 819640c + b5c0481 commit 3fe0b6e

File tree

2 files changed

+41
-16
lines changed

2 files changed

+41
-16
lines changed

src/Frontend/package-lock.json

Lines changed: 34 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServicePulse.Host/build.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ if (Test-Path $AppOutputFolder) {
99
New-Item -ItemType Directory -Force -Path $AppOutputFolder
1010

1111
Push-Location $FrontendSourceFolder
12+
npm audit --audit-level=low
13+
14+
if ( $? -eq $false ) {
15+
exit $LastExitCode
16+
}
17+
1218
npm install
1319
npm run build
1420
Remove-Item -Path "./dist/mockServiceWorker.js"
@@ -18,4 +24,4 @@ Copy-Item -path $FrontendSourceFolder/dist/* -Destination $AppOutputFolder -Recu
1824

1925
if ( $? -eq $false ) {
2026
exit $LastExitCode
21-
}
27+
}

0 commit comments

Comments
 (0)