-
Notifications
You must be signed in to change notification settings - Fork 45
feat(misconf): Add Azure Network checks #507
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
base: main
Are you sure you want to change the base?
Conversation
|
I created a PR to fix an issue with the AVD-AZU-0066 check |
|
|
||
| import data.lib.cloud.metadata | ||
|
|
||
| networkinterfaces := input.azure.network.networkinterfaces |
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.
input.azure.network.networkinterfaces is used only once, does it make sense to make it a variable?
|
|
||
| import data.lib.cloud.metadata | ||
|
|
||
| networkinterfaces := input.azure.network.networkinterfaces |
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.
ditto
|
|
||
| import data.lib.cloud.metadata | ||
|
|
||
| flowlogs := input.azure.network.networkwatcherflowlogs |
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.
ditto
|
|
||
| deny contains res if { | ||
| some flowlog in flowlogs | ||
| not flowlog.enabled.value |
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.
you need to use the helper function value.is_false, as the value may be unknown.
| import data.lib.net | ||
|
|
||
| # Sensitive ports that should not be exposed to broad networks | ||
| sensitive_ports := {20, 21, 23, 25, 53, 110, 135, 139, 143, 161, 389, 636, 993, 995, 1433, 1521, 3306, 5432, 6379} |
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.
Can you add a comment to each port to understand which protocol or service uses them?
checks/cloud/azure/network/sensitive_port_exposed_to_network.rego
Outdated
Show resolved
Hide resolved
Co-authored-by: Nikita Pivkin <[email protected]>
Co-authored-by: Nikita Pivkin <[email protected]>
Co-authored-by: Nikita Pivkin <[email protected]>
Add Azure Network checks AVD-AZU-0073 - AVD-AZU-0076