Skip to content

Conversation

@MahatiC
Copy link
Member

@MahatiC MahatiC commented Nov 10, 2025

Prior to this change, Security policy verification of CIM layers (via EnforceVerifiedCIMsPolicy) occurred only during the ResourceTypeWCOWBlockCims type request. When a new container reused an already-mounted merged block CIM, it did not issue a new ResourceTypeWCOWBlockCims type request and therefore it wouldn't get recorded in the policy metadata. This PR will fix that and will enforce the CIMs on all containers including the ones that have the CIMs mounted already.

@MahatiC MahatiC marked this pull request as ready for review November 11, 2025 11:21
@MahatiC MahatiC requested a review from a team as a code owner November 11, 2025 11:21
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
containerID, settings.CombinedLayers.ContainerRootPath, settings.CombinedLayers.Layers, settings.CombinedLayers.ScratchPath)

// The layers size is only one, this is just defensive checking
if len(settings.CombinedLayers.Layers) == 1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

feels like we should do something if it's not 1? The request is coming from the host, so this can be set to anything?

Copy link
Contributor

Choose a reason for hiding this comment

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

also, consider reducing the nested ifs, by returning error early.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants