-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
checkov/kubernetes/graph_builder/graph_components/edge_builders/KeywordEdgeBuilder.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 👑
checkov/kubernetes/graph_builder/graph_components/ResourceKeywordIdentifier.py
Outdated
Show resolved
Hide resolved
checkov/kubernetes/graph_builder/graph_components/edge_builders/KeywordEdgeBuilder.py
Outdated
Show resolved
Hide resolved
checkov/kubernetes/graph_builder/graph_components/edge_builders/LabelSelectorEdgeBuilder.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work 💪
checkov/kubernetes/graph_builder/graph_components/ResourceKeywordIdentifier.py
Outdated
Show resolved
Hide resolved
checkov/kubernetes/graph_builder/graph_components/edge_builders/LabelSelectorEdgeBuilder.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☕
…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
…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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
KeywordEdgeBuilder
class for building edges for resources with specific named properties defined inResourceKeywordIdentifier
NetworkPolicyEdgeBuilder
class for building edges for NetworkPolicy resources (with Pods)_get_k8s_block_metadata
to support creating labels forService
resourcesFILTERED_RESOURCES_FOR_EDGE_BUILDERS
to filter out resources with specific strategy from using builders with a generic strategy (e.g: filterNetworkPolicy
fromLabelSelectorEdgeBuilder
)Checklist: