Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(general): handle fixes for cloned OOTB policies #3535

Merged
merged 4 commits into from
Sep 20, 2022

Conversation

mikeurbanski1
Copy link
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Handles a case where fixes get returned with a custom policy ID, when an OOTB fixable policy is cloned. Checkov would fail to map them to the correct record, and logged an error message. This also resulted in the IDE extensions thinking the scan failed.

This fixes the core issue and also logs the actual error, if it occurs, at a lower level, because it does not break the overall scan.

Checklist:

  • My code follows the style guidelines of this project
  • 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
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@mikeurbanski1 mikeurbanski1 changed the title fix(platform): handle fixes for cloned OOTB policies fix(general): handle fixes for cloned OOTB policies Sep 19, 2022
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻

@rotemavni rotemavni merged commit e15e9f0 into master Sep 20, 2022
@rotemavni rotemavni deleted the fix-cloned-policy-fixes branch September 20, 2022 07:06
achiar99 pushed a commit that referenced this pull request Sep 20, 2022
* handle fixes for cloned OOTB policies

* add mypy skip

* make ckv_id explicitly not none to be safe

* Update tests/common/integration_features/test_fixes_integration.py

Co-authored-by: Anton Grübel <[email protected]>

Co-authored-by: Anton Grübel <[email protected]>
achiar99 pushed a commit that referenced this pull request Sep 20, 2022
* handle fixes for cloned OOTB policies

* add mypy skip

* make ckv_id explicitly not none to be safe

* Update tests/common/integration_features/test_fixes_integration.py

Co-authored-by: Anton Grübel <[email protected]>

Co-authored-by: Anton Grübel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants