fix(ci): optimize analysis jobs - #2811
Open
DerekRoberts wants to merge 10 commits into
Open
Conversation
… caching, and secret gates
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions Trivy security scan job to reduce unnecessary runs and tighten enforcement by gating secrets/misconfiguration findings while still publishing vulnerability results to the Security tab.
Changes:
- Adds
bcgov/actions/diff-triggerspath-based filtering to skip Trivy on non-impacting changes. - Updates the Trivy DB cache key to be derived from
hashFiles('.github/workflows/analysis.yml')instead of a hardcoded version string. - Splits Trivy scanning so secrets/misconfig failures gate the workflow (
exit-code: 1) while vulnerability reporting remains non-blocking (exit-code: 0) and still uploads SARIF.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
DerekRoberts
marked this pull request as draft
August 8, 2026 00:06
Signed-off-by: Derek Roberts <derek.roberts@gmail.com>
…ission from Trivy scan
DerekRoberts
marked this pull request as ready for review
August 8, 2026 00:26
… of hashing workflow file
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.
Summary
This PR consolidates the repository's test and security scanning logic into a single
reusable-analysis.ymlworkflow, eliminating redundancies and ensuring exact testing parity across all GitHub events.Architectural Changes:
backend-tests,frontend-tests, andtrivyscanning into.github/workflows/reusable-analysis.yml.analysis.ymlfile. PRs will now only triggerpr-open.yml(which calls the reusable workflow).resultscheck inpr-open.ymlto wait for both deployment jobs and the newanalysisworkflow call.diff-triggers), dynamic caching (hashFiles), and strict exit code gating (exit-code: 1) for secrets and misconfigurations.mainto requirePR Resultsinstead ofAnalysis Results.Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in:
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: