CCM-1725: grype report #207
Conversation
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
…how language Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
There was a problem hiding this comment.
Pull request overview
This PR enhances the dependency vulnerability scanning workflow by adding a post-processing step that turns the Grype JSON report into a human-readable markdown summary, publishes that summary to the GitHub job summary and as an artifact, and fails the pipeline when Critical/High vulnerabilities are detected.
Changes:
- Add a new
parse-vulnerabilities.shscript to render a markdown summary (counts + tables + priority packages) from the Grype JSON report. - Update the
scan-dependenciescomposite action to generate/upload the summary and to fail the job if Critical/High findings exist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
scripts/reports/parse-vulnerabilities.sh |
New script to transform the Grype JSON report into a markdown summary. |
.github/actions/scan-dependencies/action.yaml |
Runs the parser, appends output to $GITHUB_STEP_SUMMARY, uploads the summary artifact, and fails on Critical/High findings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
refactor script Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@timireland have a look at https://github.com/NHSDigital/nhs-notify-repository-template/blob/main/.github/workflows/cicd-1-pull-request.yaml for how we did the label to bypass this new methodology blocking all contributors while someone is working on this |
aidenvaines-cgi
left a comment
There was a problem hiding this comment.
worth adding the thing to prevernt merge if the label isnt present? as it stands this will entirely block progress while someone fixes the problem
https://github.com/NHSDigital/nhs-notify-repository-template/blob/main/.github/workflows/cicd-1-pull-request.yaml for how we did it with trivy
Description
Updated scripts so that a readable summary of findings is produced from grype, and will fail pipeline if there are any finding with severity HIGH
Context
Trivy was previously used - however this tool is currently on the AVOID list on the Tech Radar.
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.