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(kubernetes): Create keyword and network policy edge builders #3763

Merged
merged 17 commits into from
Nov 6, 2022

Conversation

PelegLi
Copy link
Contributor

@PelegLi PelegLi commented Oct 30, 2022

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

Description

  • Added KeywordEdgeBuilder class for building edges for resources with specific named properties defined in ResourceKeywordIdentifier
  • Added NetworkPolicyEdgeBuilder class for building edges for NetworkPolicy resources (with Pods)
  • Updated _get_k8s_block_metadata to support creating labels for Service resources
  • Added FILTERED_RESOURCES_FOR_EDGE_BUILDERS to filter out resources with specific strategy from using builders with a generic strategy (e.g: filter NetworkPolicy from LabelSelectorEdgeBuilder)
  • Added unit tests

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

@PelegLi PelegLi changed the title feat(kubernetes): Create keyword edge builder feat(kubernetes): Create keyword and network policy edge builders Oct 31, 2022
@PelegLi PelegLi marked this pull request as ready for review November 2, 2022 09:10
Copy link
Contributor

@YaaraVerner YaaraVerner left a comment

Choose a reason for hiding this comment

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

Nice work! 👑

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.

great work 💪

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.

@PelegLi PelegLi merged commit c146656 into master Nov 6, 2022
@PelegLi PelegLi deleted the create-KeywordEdgeBuilder branch November 6, 2022 06:02
pj991207 pushed a commit to init-cloud/checkov that referenced this pull request Nov 6, 2022
…idgecrewio#3763)

* added KeywordEdgeBuilder class

* added unit test for KeywordEdgeBuilder

* important linter fix

* added some inline method documentation

* added unit test

* handle Service and NetworkPolicy resources

* ok linter

* hi flake8

* hi mypy

* shut up mypy

* yeah whatever mypy

* just stop it mypy

* just stop it mypy

* fixed lists handling in KeywordEdgeBuilder; added test case for fix

* hi mypy

* omg mypy just leave me alone
pj991207 pushed a commit to init-cloud/checkov that referenced this pull request Nov 6, 2022
…idgecrewio#3763)

* added KeywordEdgeBuilder class

* added unit test for KeywordEdgeBuilder

* important linter fix

* added some inline method documentation

* added unit test

* handle Service and NetworkPolicy resources

* ok linter

* hi flake8

* hi mypy

* shut up mypy

* yeah whatever mypy

* just stop it mypy

* just stop it mypy

* fixed lists handling in KeywordEdgeBuilder; added test case for fix

* hi mypy

* omg mypy just leave me alone
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.

4 participants