Make FOSSA vulnerability gate report-only on pull_request events - #114
Draft
m9p909 wants to merge 1 commit into
Draft
Make FOSSA vulnerability gate report-only on pull_request events#114m9p909 wants to merge 1 commit into
m9p909 wants to merge 1 commit into
Conversation
The FOSSA vulnerability gate previously blocked on any context when vulnerability.mode=BLOCK, including pull_request runs. Exempt pull_request events from the blocking step so PRs always report (never fail) on critical/high vulnerabilities, while release and manual scans keep the BLOCK behavior. Summary wording and gate docs updated to match.
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.
What is the purpose of this change?
When a repo sets
sca_scanning.fossa.vulnerability.mode: BLOCK, the gate previously failed the build on critical/high vulnerabilities in every context — includingpull_requestruns. The intent of BLOCK is to gate releases (and manual full scans), not to fail contributor PRs. This change exemptspull_requestevents from the vulnerability blocking step so PRs always report (never fail) on vulns, while release/manual scans keep the BLOCK behavior.How is this accomplished?
One condition added to the
Block on FOSSA Vulnerability Failuresstep:if: | always() && + github.event_name != 'pull_request' && !inputs.skip_vulnerability_gate && steps.fossa_vulnerabilities.outcome == 'failure' && steps.config.outputs.fossa_vulnerability_mode == 'BLOCK'The vulnerability scan still runs on PRs and still posts its PR status check / comment (
enable_status_check/enable_pr_commentonpull_request), and the check itself is alreadycontinue-on-error: true— so PRs surface findings without failing the job. Two supporting edits keep the run output honest:The licensing gate is intentionally unchanged.
Anything reviews should focus on/be aware of?
sca-scan-and-guard.yamlthat runs it on PRs withvulnerability.mode: BLOCKwill see PR vuln gates become non-blocking after this merges. Today the PR vuln check runs in diff mode (only newly introduced critical/high vulns can fail), so the practical change is: a PR that introduces a new critical/high CVE will no longer be blocked at PR time — it will instead be caught at release. Confirm that matches the intended policy before merging.skip_vulnerability_gate, admin-only) and licensing gate are untouched.vulnerability.mode: BLOCKfor releases (SolaceDev/maas-core#4993) and wants PRs to remain report-only.