Skip to content

[Kubernetes STIG v1r10] 242415 rule: add new option to select pods to accept#61

Merged
dimityrmirchev merged 3 commits intogardener:mainfrom
AleksandarSavchev:add-options-242415
Nov 20, 2023
Merged

[Kubernetes STIG v1r10] 242415 rule: add new option to select pods to accept#61
dimityrmirchev merged 3 commits intogardener:mainfrom
AleksandarSavchev:add-options-242415

Conversation

@AleksandarSavchev
Copy link
Copy Markdown
Member

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Added new option `acceptedPods` to DISA Kubernetes STIGS `242415` rule which allows the user to configure environment variables for selected pods to be accepted.
A bug causing rule `242414` to crash when no options for the rule were set was fixed.

@AleksandarSavchev AleksandarSavchev requested a review from a team as a code owner November 6, 2023 12:44
@gardener-robot gardener-robot added needs/review size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 6, 2023
Copy link
Copy Markdown
Member

@dimityrmirchev dimityrmirchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one suggestion.

passed := true
for _, container := range pod.Spec.Containers {
if container.Ports != nil && container.Env != nil {
if container.Env != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this check is not necessary since range over nil will not panic.

Copy link
Copy Markdown
Member

@dimityrmirchev dimityrmirchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants