Skip to content
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

Configure test pod to comply with Pod Security Standard #6181

Closed
wants to merge 1 commit into from

Conversation

bcrochet
Copy link
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
Contributor Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Nov 17, 2022

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

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
Copy link
Member

jmrodri commented Nov 19, 2022

@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
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
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