Skip to content

feat(misconf): add ephemeral container checks to KSV022#534

Open
adityaupasani2 wants to merge 1 commit intoaquasecurity:mainfrom
adityaupasani2:fix/ksv022-ephemeral-containers
Open

feat(misconf): add ephemeral container checks to KSV022#534
adityaupasani2 wants to merge 1 commit intoaquasecurity:mainfrom
adityaupasani2:fix/ksv022-ephemeral-containers

Conversation

@adityaupasani2
Copy link

Summary

KSV022 currently checks only containers and initContainers for
disallowed capabilities, but Pod Security Standards also require
ephemeralContainers to be checked.

Changes

  • Extended getContainersWithDisallowedCaps in KSV022 to include ephemeralContainers
  • Updated recommended_action metadata to reflect the change
  • Added test cases for initContainers and ephemeralContainers

Related Issue

Closes #9936

@CLAassistant
Copy link

CLAassistant commented Feb 26, 2026

CLA assistant check
All committers have signed the CLA.

@nikpivkin
Copy link
Contributor

Hi @adityaupasani2 !

Thanks for the contribution!

Could you run the tests locally and fix them?

}

getContainersWithDisallowedCaps contains container if {
container := kubernetes.initContainers[_]
Copy link
Contributor

Choose a reason for hiding this comment

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

The incremental rule initContainers is not declared in the kubernetes package. How do you use it?

}

getContainersWithDisallowedCaps contains container if {
container := kubernetes.ephemeralContainers[_]
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

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