-
Notifications
You must be signed in to change notification settings - Fork 8
[Security Hardened Shoot Cluster] Rule 1001 Implementation #462
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
[Security Hardened Shoot Cluster] Rule 1001 Implementation #462
Conversation
…rdened Shoot Cluster ruleset. Fix typos
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! Just some nits.
pkg/provider/garden/ruleset/securityhardenedshoot/rules/1001.go
Outdated
Show resolved
Hide resolved
pkg/provider/garden/ruleset/securityhardenedshoot/rules/1001_test.go
Outdated
Show resolved
Hide resolved
pkg/provider/garden/ruleset/securityhardenedshoot/rules/options.go
Outdated
Show resolved
Hide resolved
pkg/provider/garden/ruleset/securityhardenedshoot/rules/1001.go
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.
/lgtm
return rule.Result(r, checkResult), nil | ||
} | ||
return rule.Result(r, rule.ErroredCheckResult("kubernetes version not found in cloudProfile", target)), nil | ||
} else { |
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.
No need for additional nesting here - else
can be removed
case slices.Contains(r.acceptedClassifications(), *version.Classification): | ||
return rule.PassedCheckResult("Shoot uses a Kubernetes version with an allowed classification.", target.With("classification", string(*version.Classification))), true | ||
default: | ||
return rule.FailedCheckResult("Shoot uses a Kubernetes version with a non-allowed classification.", target.With("classification", string(*version.Classification))), true |
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.
return rule.FailedCheckResult("Shoot uses a Kubernetes version with a non-allowed classification.", target.With("classification", string(*version.Classification))), true | |
return rule.FailedCheckResult("Shoot uses a Kubernetes version with a forbidden classification.", target.With("classification", string(*version.Classification))), true |
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.
/lgtm
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.
/lgtm
What this PR does / why we need it:
This PR implements and registers rule 1001 of the
Security Hardened Shoot
ruleset for theGarden
provider. The rule checks the shoot spec for it's Kubernetes version and evaluates it's support based on theCloudProfile/NamespacedCloudProfile
in the projectWhich issue(s) this PR fixes:
Fixes #432
Special notes for your reviewer:
Release note: