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

Updating GOV.UK Generic chart to be PSS restricted compliant. #1860

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

nsabri1
Copy link
Contributor

@nsabri1 nsabri1 commented Feb 23, 2024

Adding:

            capabilities:
              drop: ["ALL"]

            seccompProfile:
              type: "RuntimeDefault"

Currently deploying application using the current chart will give the following warnings results:

Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (containers "app", "nginx" must set securityContext.capabilities.drop=["ALL"]) deployment.apps/transition-pss created
Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (container "worker" must set securityContext.capabilities.drop=["ALL"]) deployment.apps/transition-pss-worker created
Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (containers "copy-assets-for-upload", "upload-assets" must set securityContext.capabilities.drop=["ALL"]), seccompProfile (pod or containers "copy-assets-for-upload", "upload-assets" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost") job.batch/transition-pss-upload-assets created
Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (container "dbmigrate" must set securityContext.capabilities.drop=["ALL"]), seccompProfile (pod or container "dbmigrate" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

After the applied changes the results are:

deployment.apps/transition-pss created
deployment.apps/transition-pss-worker created
job.batch/transition-pss-upload-assets created
job.batch/transition-pss-dbmigrate created

Warnings are corrected.

All apps will need to be tested to ensure that the changes do not cause any issues.

I have tested one app which came up without errors, nevertheless this will need to be rolled out to Integration and staging to discover issues.

#1883

Adding
seccomp defaults
drop all capabilities within running containers

Currently deploying application using the current chart will give the following
warnings results:

Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (containers "app", "nginx" must set securityContext.capabilities.drop=["ALL"])
deployment.apps/transition-pss created
Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (container "worker" must set securityContext.capabilities.drop=["ALL"])
deployment.apps/transition-pss-worker created
Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (containers "copy-assets-for-upload", "upload-assets" must set securityContext.capabilities.drop=["ALL"]), seccompProfile (pod or containers "copy-assets-for-upload", "upload-assets" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
job.batch/transition-pss-upload-assets created
Warning: would violate PodSecurity "restricted:latest": unrestricted capabilities (container "dbmigrate" must set securityContext.capabilities.drop=["ALL"]), seccompProfile (pod or container "dbmigrate" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")

After the applied changes the results are:

deployment.apps/transition-pss created
deployment.apps/transition-pss-worker created
job.batch/transition-pss-upload-assets created
job.batch/transition-pss-dbmigrate created

Warnings are corrected.

All apps will need to be tested to ensure that the chnages do not cause any issues - i have tested one app which came up without errors,
neverthless this will need to be rolled out to Integration and staging to discover issues.
Copy link
Contributor

@sengi sengi left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@sengi sengi linked an issue Mar 4, 2024 that may be closed by this pull request
@sengi sengi merged commit 725a7d6 into main Mar 18, 2024
4 checks passed
@sengi sengi deleted the nsabri1/updating-generic-chart-PSS-restricted branch March 18, 2024 10:59
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.

None yet

2 participants