Repository navigation
CI: fail on High or Critical vulnerabilities in shipped packages (2.5) - #40
Merged
Merged
Conversation
Frontend: npm audit --omit=dev --audit-level=high after npm ci. Backend: dotnet restore audits all packages and treats NU1903 (High) and NU1904 (Critical) as errors, in CI only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtHpE5ByGuWvM7LpsNqxvn
…son 8.0.4 CI should fail at both new audit steps. Reverted in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtHpE5ByGuWvM7LpsNqxvn
The test proved both audit steps fail CI: NU1903 for System.Text.Json 8.0.4 and npm audit's high finding for lodash 4.17.20. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtHpE5ByGuWvM7LpsNqxvn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardening step 4, item 2.5: CI fails on known High or Critical vulnerabilities in what ships.
.github/workflows/ci.yml:Frontend build:npm audit --omit=dev --audit-level=highafternpm ci.--omit=devchecks only packages that end up in the browser bundle; build and test tools stay with Dependabot alerts and security updates.RestoreinBackend build and migration check:dotnet restore -p:NuGetAuditMode=all "-p:WarningsAsErrors=NU1903%3BNU1904". NuGet audits direct and transitive packages; High (NU1903) and Critical (NU1904) become errors in CI only, so a deploy onhomeserveris never blocked by an overnight advisory. Moderate and Low stay warnings.mainruleset already requires.Proven (commits 2 and 3 of this PR, net zero change):
lodash4.17.20 tofrontendandSystem.Text.Json8.0.4 tobackend. Both jobs failed at the new steps:error NU1903: Warning As Error: Package 'System.Text.Json' 8.0.4 has a known high severity vulnerabilityand npm audit's1 high severity vulnerability(lodash <=4.17.23).mainis onlyci.yml.Trade-off: if a High or Critical hole appears in a shipped package before a fix exists, every PR is blocked until it's fixed or the step is switched off for a while.
npm auditasks npm's servers, so an npm outage can fail the step; re-run the job.Nothing here runs on the server, so this doesn't need a test deploy.
Generated by Claude Code