feat(general): Issue 6536 - example checkovignore file to skip specific Checkov checks with expiry dates on azure devops pipeline #6718
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.
User description
This PR request shows a working implementation of the
.checkovignore
file to skip specific Checkov checks with expiry dates as requested in the issue: #6536.Description
This pull request implements a
.checkovignore
file for managing skip-checks in Checkov scans. The.checkovignore
file holds rule IDs to skip, expiration dates for the skips, and optional reasons for skipping. This feature is similar to the.trivyignore
file in Trivy and centralizes the handling of skip-checks, automating the removal of expired skips.Main Changes:
CHECKOV_IGNORE.py
) was introduced to process the.checkovignore
file, dynamically setting the--skip-check
flag for Checkov runs in Azure DevOps pipelines..checkovignore
file and run Checkov with the appropriate skip-checks.Benefits:
.checkovignore
file.Fixes #6536
New/Edited Policies
Description
This feature adds the ability to skip specific Checkov rules by specifying them in the
.checkovignore
file, along with an optional expiry date and reason for skipping. This feature is useful for development teams who want to manage skip-checks centrally and enforce the expiration of old skips.Fix
The skip-checks can be defined in a
.checkovignore
YAML file. A Python script processes this file, filtering out expired checks, and dynamically sets the--skip-check
parameter for Checkov commands in pipelines. By integrating this into a CI/CD pipeline (e.g., Azure DevOps), developers can manage their skip-checks in a more organized manner.Checklist:
Generated description
Dear maintainer, below is a concise technical summary of the changes proposed in this PR:
Implement a
.checkovignore
file to manage skip-checks in Checkov scans, allowing for centralized control over which checks to skip, with expiration dates and optional reasons. Thecheckov_ignore.py
script processes this file, dynamically setting the--skip-check
flag for Checkov runs in Azure DevOps pipelines. This ensures expired skips are automatically removed. An example integration into an Azure DevOps pipeline is provided, demonstrating the use of this feature..checkovignore
file to manage skip-checks in Checkov scans, allowing for centralized control over which checks to skip, with expiration dates and optional reasons. Thecheckov_ignore.py
script processes this file, dynamically setting the--skip-check
flag for Checkov runs in Azure DevOps pipelines. This ensures expired skips are automatically removed. An example integration into an Azure DevOps pipeline is provided, demonstrating the use of this feature.Modified files (3)
Latest Contributors(0)
Modified files (1)
Latest Contributors(0)