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(terraform): Removed duplicate check CKV_AZURE_60 #3928

Merged
merged 2 commits into from Nov 24, 2022

Conversation

tdefise
Copy link
Contributor

@tdefise tdefise commented Nov 23, 2022

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

Description

Fixes (#3916)

Description

There are two checks that check the same security setting

Fix

Remove one of the two (the one that is only available for Terraform as been removed as advised in the issue)

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

@gruebel gruebel changed the title fix: Removed duplicate check CKV_AZURE_60 fix(terraform): Removed duplicate check CKV_AZURE_60 Nov 23, 2022
@gruebel
Copy link
Contributor

gruebel commented Nov 23, 2022

nice work, you just need to adjust this test and a new condition with your removed check ID

for i in range(1, len(azure_checks) + 4):
if f'CKV_AZURE_{i}' == 'CKV_AZURE_46':
continue # this rule has been merged into a v2 graph implementation -> CKV_AZURE_24
if f'CKV_AZURE_{i}' == 'CKV_AZURE_51':
continue # https://github.com/bridgecrewio/checkov/pull/983
if f"CKV_AZURE_{i}" == "CKV_AZURE_90":
continue # duplicate of CKV_AZURE_53

@tdefise
Copy link
Contributor Author

tdefise commented Nov 24, 2022

Hey @gruebel,

Thanks for the hint, I just did what you advised

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.

thanks for the contribution 🍻

@gruebel gruebel linked an issue Nov 24, 2022 that may be closed by this pull request
@gruebel gruebel merged commit 85a61c9 into bridgecrewio:master Nov 24, 2022
mayblo pushed a commit to cider-rnd/checkov that referenced this pull request Nov 24, 2022
* removed duplicate check

* Added exception for CKV_AZURE_60
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.

Duplicate checks CKV_AZURE_3 & CKV_AZURE_60
3 participants