Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
[//]: # "
PR Title
We use the title to create changelog automatically and therefore only allow specific prefixes
- break: to indicate a breaking change, this supersedes any of the other types
- feat: to indicate new features or checks
- fix: to indicate a bugfix or handling of edge cases of existing checks
- docs: to indicate an update to our documentation
- chore: to indicate adjustments to workflow files or dependency updates
- platform: to indicate a change needed for the platform
Each prefix should be accompanied by a scope that specifies the targeted framework. If uncertain, use 'general'.
#
Allowed prefixs:
ansible|argo|arm|azure|bicep|bitbucket|circleci|cloudformation|dockerfile|github|gha|gitlab|helm|kubernetes|kustomize|openapi|sast|sca|secrets|serverless|terraform|general|graph|terraform_plan|terraform_json
#
ex.
feat(terraform): add CKV_AWS_123 to ensure that VPC Endpoint Service is configured for Manual Acceptance
"
Description
range_includes can handle ranges in the value like [4,10-20]
Checklist:
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] I have added tests that prove my feature, policy, or fix is effective and works
[x] New and existing tests pass locally with my changes
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Enhance the RangeIncludesAttributeSolver class to support range values in the value parameter, allowing for more flexible attribute checks. This update processes range strings (e.g., "10-20") by converting them into a list of integers, thus enabling the solver to handle both single values and ranges effectively. Additionally, new test cases have been added to validate this functionality, ensuring that both range_includes and range_not_includes operations work correctly with the updated logic.
<table><tr><th>Topic</th><th>Details</th><tr><td><a href=https://baz.co/changes/bridgecrewio/checkov/6867?tool=ast&topic=Testing+Enhancements>Testing Enhancements</a>
</td><td>Add test cases to validate the new range handling logic in <code>RangeIncludesAttributeSolver</code>, ensuring both <code>range_includes</code> and <code>range_not_includes</code> operations work correctly.<details><summary>Modified files (6)</summary><ul><li>tests/terraform/graph/checks_infra/attribute_solvers/range_not_includes_solver/test_solver.py</li>
Enhance the RangeIncludesAttributeSolver to support range values in the value parameter, allowing for more flexible attribute checks.Modified files (1)
User description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
[//]: # "
PR Title
"
Description
range_includes can handle ranges in the value like [4,10-20]
Checklist:
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Enhance the
RangeIncludesAttributeSolver
class to support range values in thevalue
parameter, allowing for more flexible attribute checks. This update processes range strings (e.g., "10-20") by converting them into a list of integers, thus enabling the solver to handle both single values and ranges effectively. Additionally, new test cases have been added to validate this functionality, ensuring that bothrange_includes
andrange_not_includes
operations work correctly with the updated logic.Latest Contributors(2)
RangeIncludesAttributeSolver
to support range values in thevalue
parameter, allowing for more flexible attribute checks.Modified files (1)
Latest Contributors(2)