BCH 1033: More alert checks for vulnerabilities.#3
Merged
jonathandavies-CS merged 13 commits intomainfrom Sep 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements comprehensive vulnerability checking policies for security alerts. It adds new OPA policies to enforce governance rules around vulnerability management including patch availability, dismissal dates, dismissal counts, and authorization requirements.
Key changes:
- Adds four new vulnerability policies with comprehensive test coverage
- Restructures existing vulnerability count policies from legacy format to new structure
- Updates example JSON files to match new input format with alerts array and security team members
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| policies/vulnerability_patch_available/ | New policy to prevent dismissing vulnerabilities when patches are available |
| policies/vulnerability_dismissal_date/ | New policy to limit age of dismissed vulnerabilities to 90 days |
| policies/vulnerability_dismissal_count/ | New policy to limit total number of dismissed vulnerabilities to 10 |
| policies/vulnerabilities_dismissed_by_security_team/ | New policy requiring security team authorization for dismissals |
| policies/utils/time_ext/ | Utility functions for working day calculations |
| policies/*_vulnerabilities_dismissal/ | New time-based dismissal policies for critical/high/medium/low severity levels |
| policies/*_vulnerabilities_count/ | Restructured count policies from legacy format |
| examples/ | Updated JSON examples to match new input structure |
Comments suppressed due to low confidence (2)
policies/vulnerability_dismissal_count/vulnerability_dimissal_count_test.rego:1
- The function name contains a typo: 'dimissed' should be 'dismissed'.
package vulnerability_dismissal_count_test
policies/vulnerability_dismissal_count/vulnerability_dimissal_count_test.rego:1
- The function name contains a typo: 'dimissed' should be 'dismissed'.
package vulnerability_dismissal_count_test
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
policies/vulnerability_dismissal_count/vulnerability_dimissal_count_test.rego
Outdated
Show resolved
Hide resolved
policies/vulnerability_dismissal_count/vulnerability_dimissal_count_test.rego
Outdated
Show resolved
Hide resolved
policies/critical_vulnerabilities_dismissal/critical_vulnerabilities_dismissal_test.rego
Outdated
Show resolved
Hide resolved
policies/critical_vulnerabilities_dismissal/critical_vulnerabilities_dismissal.rego
Outdated
Show resolved
Hide resolved
policies/medium_vulnerabilities_count/medium_vulnerabilities_count_test.rego
Outdated
Show resolved
Hide resolved
policies/critical_vulnerabilities_count/critical_vulnerabilities_count_test.rego
Outdated
Show resolved
Hide resolved
…lities_dismissal.rego Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ount_test.rego Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…es_count_test.rego Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.