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

feat(general): Add resource attributes to omit arg #4193

Merged
merged 76 commits into from
Jan 10, 2023

Conversation

pazbechor
Copy link
Contributor

@pazbechor pazbechor commented Jan 4, 2023

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

Description

Adding the option to supply Checkov a config file (JSON format) that has resource to attributes.
By using this config, one can mask desired values from is scanning (for example: Secret values in the config)
*

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

achiar99 and others added 30 commits December 13, 2022 14:02
This reverts commit ced5447.
…r]] instead of Dict[str, List[str]]. \n 2 - replace plan runner hardcoded RESOURCE_ATTRIBUTES_TO_OMIT with the runner filter one (I updated the runner filter accordingly).\n 3 - Remove redundant print in runner filter.
…r]] instead of Dict[str, List[str]]. \n 2 - replace plan runner hardcoded RESOURCE_ATTRIBUTES_TO_OMIT with the runner filter one (I updated the runner filter accordingly).\n 3 - Remove redundant print in runner filter.
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.

I'm actually not sure, if should allow passing '*' for resource types, also the these are not all runners and some runners have both Python checks and graph checks.

README.md Outdated Show resolved Hide resolved
checkov/terraform/plan_runner.py Show resolved Hide resolved
dogfood_tests/test_checkov_dogfood.py Outdated Show resolved Hide resolved
checkov/common/util/secrets.py Outdated Show resolved Hide resolved
@pazbechor pazbechor force-pushed the add-resource-attr-to-omit-arg branch from 3cef6fb to cc04bba Compare January 9, 2023 12:22
Copy link
Collaborator

@arielkru arielkru left a comment

Choose a reason for hiding this comment

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

🚀

README.md Outdated Show resolved Hide resolved
Co-authored-by: arielkru <63583491+arielkru@users.noreply.github.com>
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.

🍻

@pazbechor pazbechor merged commit 145ac53 into main Jan 10, 2023
@pazbechor pazbechor deleted the add-resource-attr-to-omit-arg branch January 10, 2023 10:26
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.

None yet

4 participants