-
Notifications
You must be signed in to change notification settings - Fork 18
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
🧹 Fixes double mql issues: Mondoo Linux Policy #415
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3f53bd9
!= null > != empty
mm-weber bda5ff3
!= null > != empty++
mm-weber a590f88
fix: Ensure strong account password policy requirements are used
mm-weber b42ce80
fix/props: - uid: maxAccessKeyAgeMondoo
mm-weber 9a2227e
fix/props: - uid: ebsVolumeDeleteOnTerminationMondoo
mm-weber 277c871
fix/props: - uid: disallowedPortsSSHMondoo
mm-weber b20fca8
fix/props: - uid: disallowedPortsRDPMondoo
mm-weber 959572d
fix/props: - uid: disallowedPortsUDPMondoo
mm-weber 6253af5
fix/props: - uid: allowedCiphersMondoo
mm-weber 6cd829d
fix/props: - uid: auditFilesMondoo
mm-weber 7ad1f4c
fix/props: - uid: macAlgosMondoo
mm-weber 4f804cc
fix/props: - uid: kexAlgosMondoo
mm-weber 448ca1d
fix/props: - uid: sudoGroupMondoo
mm-weber f8285dd
fix/props: - uid: auditpolSuccessFailure etc.
mm-weber ae4147d
fix/versions
mm-weber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
policies: | ||
- uid: mondoo-azure-security | ||
name: Microsoft Azure Security | ||
version: 2.0.0 | ||
version: 2.0.1 | ||
license: BUSL-1.1 | ||
tags: | ||
mondoo.com/category: security | ||
|
@@ -216,7 +216,7 @@ queries: | |
title: Ensure that SSH access is restricted from the internet | ||
impact: 80 | ||
props: | ||
- uid: disallowedPortsSSH | ||
- uid: disallowedPortsSSHMondoo | ||
title: a list of disallowed TCP ports, by default SSH listens only on TCP port 22, add more ports as needed | ||
mql: | | ||
return [ | ||
|
@@ -305,7 +305,7 @@ queries: | |
&& properties.sourceAddressPrefix == /\*|0\.0\.0\.0|<nw>\/0|\/0|internet|any/ | ||
) | ||
allNsgTCP.all(properties.destinationPortRange != "*") | ||
props.disallowedPortsSSH { | ||
props.disallowedPortsSSHMondoo { | ||
disallowedPortSSH = _ | ||
disallowedPortSSH | ||
allNsgTCP.none(destinationPortRange.any(fromPort <= disallowedPortSSH && toPort >= disallowedPortSSH)) | ||
|
@@ -323,7 +323,7 @@ queries: | |
) | ||
) | ||
allNsgTCP.all(securityRules.all(properties.destinationPortRange != "*")) | ||
props.disallowedPortsSSH { | ||
props.disallowedPortsSSHMondoo { | ||
disallowedPortSSH = _ | ||
disallowedPortSSH | ||
allNsgTCP.all(securityRules.none(destinationPortRange.any(fromPort <= disallowedPortSSH && toPort >= disallowedPortSSH))) | ||
|
@@ -332,7 +332,7 @@ queries: | |
title: Ensure that RDP access is restricted from the internet | ||
impact: 80 | ||
props: | ||
- uid: disallowedPortsRDP | ||
- uid: disallowedPortsRDPMondoo | ||
title: a list of disallowed TCP ports, by default RDP listens only on TCP port 3389, add more ports as needed | ||
mql: | | ||
return [ | ||
|
@@ -419,7 +419,7 @@ queries: | |
&& properties.sourceAddressPrefix == /\*|0\.0\.0\.0|<nw>\/0|\/0|internet|any/ | ||
) | ||
allNsgTCP.all(properties.destinationPortRange != "*") | ||
props.disallowedPortsRDP { | ||
props.disallowedPortsRDPMondoo { | ||
disallowedPortRDP = _ | ||
disallowedPortRDP | ||
allNsgTCP.none(destinationPortRange.any(fromPort <= disallowedPortRDP && toPort >= disallowedPortRDP)) | ||
|
@@ -437,7 +437,7 @@ queries: | |
) | ||
) | ||
allNsgTCP.all(securityRules.all(properties.destinationPortRange != "*")) | ||
props.disallowedPortsRDP { | ||
props.disallowedPortsRDPMondoo { | ||
disallowedPortRDP = _ | ||
disallowedPortRDP | ||
allNsgTCP.all(securityRules.none(destinationPortRange.any(fromPort <= disallowedPortRDP && toPort >= disallowedPortRDP))) | ||
|
@@ -2081,7 +2081,7 @@ queries: | |
title: Ensure direct UDP access to Resources from the internet is restricted | ||
impact: 80 | ||
props: | ||
- uid: disallowedPortsUDP | ||
- uid: disallowedPortsUDPMondoo | ||
title: a list of disallowed UDP ports, by default covering common UDP services, add more as needed | ||
mql: | | ||
return [ | ||
|
@@ -2165,7 +2165,7 @@ queries: | |
&& properties.sourceAddressPrefix == /\*|0\.0\.0\.0|<nw>\/0|\/0|internet|any/ | ||
) | ||
allNsgUDP.all(properties.destinationPortRange != "*") | ||
props.disallowedPortsUDP { | ||
props.disallowedPortsUDPMondoo { | ||
disallowedPortUDP = _ | ||
disallowedPortUDP | ||
allNsgUDP.none(destinationPortRange.any(fromPort <= disallowedPortUDP && toPort >= disallowedPortUDP)) | ||
|
@@ -2183,7 +2183,7 @@ queries: | |
) | ||
) | ||
allNsgUDP.all(securityRules.all(properties.destinationPortRange != "*")) | ||
props.disallowedPortsUDP { | ||
props.disallowedPortsUDPMondoo { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same problem here, and overall! |
||
disallowedPortUDP = _ | ||
disallowedPortUDP | ||
allNsgUDP.all(securityRules.none(destinationPortRange.any(fromPort <= disallowedPortUDP && toPort >= disallowedPortUDP))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Thanks Manuel. I couldn't get why you changed the Azure properties name as we already considered the uniqueness of properties's name in the first place.
Beside if you justify the reasoning, then the name should also be reflected in the query!!!
example: