Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

🐛 Fix two Mondoo Linux SSH checks #466

Closed
wants to merge 5 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions core/mondoo-linux-security.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2588,11 +2588,14 @@ queries:
- uid: mondoo-linux-security-only-strong-ciphers-are-used
title: Ensure only strong ciphers are used
impact: 100
filters: package('openssh-server').installed == true
props:
- uid: mondooLinuxSecuritySshdCiphers
title: Define the hardened ciphers for all SSH configurations
mql: |
if( package('openssh-server').version == /6./ ) {
sshVersionExtracted = package('openssh-server').version.split("1:").where(_ != empty).first.split("~").where(_ != empty).first

if( semver(sshVersionExtracted) >= semver("6") && semver(sshVersionExtracted) < semver("7") ) {
return ["aes256-ctr", "aes192-ctr", "aes128-ctr"]
}
return ["[email protected]","[email protected]","[email protected]","aes256-ctr","aes192-ctr","aes128-ctr"]
Expand Down Expand Up @@ -2634,17 +2637,20 @@ queries:
- uid: mondoo-linux-security-only-strong-kex-algorithms-are-used
title: Ensure that strong Key Exchange algorithms are used
impact: 100
filters: package('openssh-server').installed == true
props:
- uid: mondooLinuxSecurityKexAlgos
title: Define the hardened key exchange algorithms for all SSH configurations
mql: |
if( package('openssh-server').version == /6./) {
sshVersionExtracted = package('openssh-server').version.split("1:").where(_ != empty).first.split("~").where(_ != empty).first

if( semver(sshVersionExtracted) >= semver("6") && semver(sshVersionExtracted) < semver("7") ) {
return ["[email protected]"]
}
if( package('openssh-server').version == /7./) {
if( semver(sshVersionExtracted) >= semver("7") && semver(sshVersionExtracted) < semver("8") ) {
return ["[email protected]","diffie-hellman-group18-sha512"]
}
if( package('openssh-server').version == /8\.[0|1|2|3|4|5]/ ) {
if( semver(sshVersionExtracted) >= semver("8") && semver(sshVersionExtracted) < semver("9") ) {
return ["[email protected]","[email protected]","diffie-hellman-group18-sha512"]
}
return ["[email protected]","[email protected]","diffie-hellman-group18-sha512"]
Expand Down
Loading