fix: update prisma scan to remove blocking on compliance#69
fix: update prisma scan to remove blocking on compliance#69artyom-morozov wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
✨ PR Review
The PR introduces grace period functionality for vulnerabilities and makes compliance blocking optional. The changes are generally well-structured, but there are concerns about error handling transparency and a significant security behavior change.
2 issues detected:
🧹 Maintainability - Error suppression makes it impossible to distinguish between successful parsing and various failure modes
Details: The vulnerability counting logic suppresses all jq errors with
2>/dev/nulland falls back to counting all vulnerabilities when parsing fails. This hides JSON format issues, date parsing failures, and API response changes, making debugging difficult. Any jq failure (malformed JSON, unexpected date format, missing fields) is silently handled by blocking all vulnerabilities, which could mask underlying issues.
File:prisma-cloud-scan/action.yml🔒 Security - Default value weakens security posture by silently disabling compliance blocking 🛠️
Details: The new
block_on_complianceinput defaults to "false", changing from previous behavior where critical/high compliance issues always blocked releases. Without explicit configuration, compliance issues will now be ignored, potentially allowing insecure releases. This is a significant security policy change that users may not notice when upgrading.
File:prisma-cloud-scan/action.yml (32-32)
🛠️ A suggested code correction is included in the review comments.
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how
| block_on_compliance: | ||
| description: "Block release on compliance issues (high/critical)" | ||
| required: false | ||
| default: "false" |
There was a problem hiding this comment.
🔒 Security - Behavior Change: Consider changing the default to "true" to maintain backward compatibility and security-first approach, or explicitly document this breaking change in the PR description and migration guide.
| default: "false" | |
| default: "true" |
Is this review accurate? Use 👍 or 👎 to rate it
If you want to tell us more, use /gs feedback e.g. /gs feedback this review doesn't make sense, I disagree, and it keeps repeating over and over
|
Please mark whether you used Copilot to assist coding in this PR
|
What is the purpose of this change?
Remove deprecated WhiteSource security scanning integration and enhance Prisma Cloud vulnerability scanning with configurable grace periods and compliance blocking controls to provide more flexible security policy enforcement in the CI/CD pipeline.
How is this accomplished?
whitesource_product_name,whitesource_project_name), secrets (WHITESOURCE_API_KEY), and two complete job steps (Run WhiteSource Policy GateandRun WhiteSource Vulnerability Gate) from the GitHub Actions workflowvulnerability_grace_period_daysinput (default: 7 days) that filters vulnerabilities by theirpublishedDatetimestamp, only blocking on vulnerabilities older than the grace periodblock_on_complianceinput (default: false) to make compliance issue blocking opt-in rather than mandatory, separating compliance checks from vulnerability checksBLOCKING_VULN_CRITICALandBLOCKING_VULN_HIGHby comparing vulnerability publish dates against the grace period threshold, while tracking grace-period vulnerabilities separately for informational reportingAnything reviewers should focus on/be aware of?
whitesource_product_nameorwhitesource_project_nameinputs - dependent repositories must migrate to Prisma-only scanningpublishedDateincludes fallback logic for both numeric timestamps and ISO date strings (split("T")[0] | strptime("%Y-%m-%d") | mktime) - verify this handles all Prisma Cloud date formats correctlyblock_on_compliancedefaults to false), which may reduce security enforcement unless teams explicitly opt inGRACE_PERIOD_DAYS * 86400) and relies on vulnerabilitypublishedDateaccuracy - vulnerabilities without valid dates fall back to total counts, potentially bypassing grace period logicGenerated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how