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

🐛 Fix two Mondoo Linux SSH checks #466

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mm-weber
Copy link
Contributor

@mm-weber mm-weber commented Jan 15, 2025

Fixes the props for the following checks:

  • Ensure only strong ciphers are used
  • Ensure that strong Key Exchange algorithms are used

@mm-weber mm-weber self-assigned this Jan 15, 2025
@mm-weber mm-weber changed the title Manuel/fix linux ssh 454 🧹 Fix two Mondoo Linux checks Jan 15, 2025
@mm-weber mm-weber marked this pull request as draft January 15, 2025 16:20
@mm-weber mm-weber requested a review from AdamVB January 15, 2025 19:10
@mm-weber mm-weber marked this pull request as ready for review January 15, 2025 19:40
Signed-off-by: Manuel Weber <[email protected]>
@mm-weber
Copy link
Contributor Author

mm-weber commented Jan 16, 2025

Made the pattern more robust:

package('openssh-server').version.split("1:").where(_ != empty).first.split("~").where(_ != empty).first

Also added filters, so the check doesn't run if there isn't any openssh-server installed.
This case would lead to an error:

cnspec> semver(null)
x no service account configured
panic: interface conversion: interface {} is nil, not string [recovered]
	panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
go.mondoo.com/cnquery/v11/providers-sdk/v1/upstream/health.ReportPanic({0x2b7ab10, 0x6}, {0x30754a8, 0x7}, {0x30754b0, 0x

@tas50 tas50 changed the title 🧹 Fix two Mondoo Linux checks 🐛 : Fix two Mondoo Linux SSH checks Jan 17, 2025
@tas50 tas50 changed the title 🐛 : Fix two Mondoo Linux SSH checks 🐛 Fix two Mondoo Linux SSH checks Jan 17, 2025
mm-weber and others added 2 commits January 17, 2025 20:05
Co-authored-by: Tim Smith <[email protected]>
Signed-off-by: Manuel Weber <[email protected]>
Co-authored-by: Tim Smith <[email protected]>
Signed-off-by: Manuel Weber <[email protected]>
@mm-weber
Copy link
Contributor Author

mm-weber commented Feb 3, 2025

This would need something along the lines of that: mondoohq/cnquery#5160

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.

3 participants