Repository navigation
Add Trivy security scan workflow and README badge - #927
Merged
Merged
Conversation
Scans the repository (NuGet, npm, Dockerfile, secrets) and the built Docker image with Trivy. Every finding is uploaded as SARIF to code scanning; the job fails only on fixable HIGH and CRITICAL findings, so the badge shows whether a known fix is waiting to be applied. A weekly run keeps the badge current as new CVEs are published.
Contributor
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This was referenced Oct 15, 2026
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.
Type: feature
Issue
The repository has CodeQL for the C# source, but nothing checks third-party dependencies (NuGet, npm) or the published Docker image for known vulnerabilities, and the README has no badge for it.
Solution
New workflow
.github/workflows/trivy.ymlwith two parallel jobs:trivy fs: NuGet (Directory.Packages.props), npm (package-lock.jsonof vueapp and adminapp), Dockerfile misconfiguration, committed secrets.Dockerfile(no push) and runstrivy imageon OS packages and the published app.Each job runs Trivy twice:
trivy-fs,trivy-image); never fails the job,Triggers: push to
main/develop, PRs todevelop, weekly cron (new CVEs appear without commits), manual dispatch. Workflow permissions default to none; jobs getcontents: read+security-events: write. All actions are pinned to commit SHAs. SARIF upload is skipped for fork PRs (read-only token).README:
Trivybadge next to CodeQL, fordevelop.Expected state after merge: the repository job is red. Trivy 0.70.0 run locally reports
System.Security.Cryptography.Xml10.0.12 with three HIGH CVEs (CVE-2026-96958/96959/96960), fixed in 10.0.13. The package bump comes in a separate PR, after which the badge turns green. The image job has not run yet and may report additional findings.Breaking changes
None.
Testing
actionlint1.7.7 on the workflow – no findings.trivy fs --scanners vuln,misconfig,secret --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 .– exit 1, the three findings above; npm and Dockerfile clean.Trivyrun – both jobs execute, SARIF results show up under Security → Code scanning with thetrivy-fs/trivy-imagecategories.