Skip to content

Configure test pod to comply with Pod Security Standard#6181

Closed
bcrochet wants to merge 1 commit into
operator-framework:masterfrom
bcrochet:fixes/5939
Closed

Configure test pod to comply with Pod Security Standard#6181
bcrochet wants to merge 1 commit into
operator-framework:masterfrom
bcrochet:fixes/5939

Conversation

@bcrochet

Copy link
Copy Markdown
Contributor

Description of the change:
The test pod is not yet created in accordance with the Pod Security Standard enforced in k8s 1.24. For compliance, the main pod security context needs:

RunAsNonRoot: true
SeccompProfile:
Type: RuntimeDefault

And each container needs:

SecurityContext:
AllowPrivilegeEscalation: false
Capabilities:
Drop:
'ALL'

Fixes #5939

Signed-off-by: Brad P. Crochet brad@redhat.com

Motivation for the change:
Scorecard tests would not run under k8s 1.24 or OpenShift 4.12. This re-enables that functionality.

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@bcrochet

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Nov 17, 2022

Copy link
Copy Markdown

@bcrochet: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 13:36 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 13:36 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
@bcrochet bcrochet temporarily deployed to deploy November 18, 2022 14:16 Inactive
The test pod is not yet created in accordance with the Pod Security
Standard enforced in k8s 1.24. For compliance, the main pod security
context needs:

RunAsNonRoot: true
SeccompProfile:
  Type: RuntimeDefault

And each container needs:

SecurityContext:
  AllowPrivilegeEscalation: false
  Capabilities:
    Drop:
      'ALL'

Fixes operator-framework#5939

Signed-off-by: Brad P. Crochet <brad@redhat.com>
@jmrodri

jmrodri commented Nov 19, 2022

Copy link
Copy Markdown
Member

@bcrochet So this looks like it enables the security context all the time. I think this needs to be hidden behind a flag. We have another PR that adds a flag. #6187

@jberkhahn

Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci Bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 21, 2022
@bcrochet

Copy link
Copy Markdown
Contributor Author

@bcrochet So this looks like it enables the security context all the time. I think this needs to be hidden behind a flag. We have another PR that adds a flag. #6187

It does. And it looks like we are mostly doing the same thing. I'll close this and comment/review the other.

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

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scorecard container is not config as restricted and would violate the Pod Security Standard

4 participants