Skip to content

[Pod Security Standards] Add ruleset documentation#755

Draft
AleksandarSavchev wants to merge 2 commits into
gardener:mainfrom
AleksandarSavchev:add-pss-docu
Draft

[Pod Security Standards] Add ruleset documentation#755
AleksandarSavchev wants to merge 2 commits into
gardener:mainfrom
AleksandarSavchev:add-pss-docu

Conversation

@AleksandarSavchev

Copy link
Copy Markdown
Member

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:
Adds documentation for the new Pod Security Standards ruleset. This ruleset will check pods running in a managed Kubernetes cluster against the official Kubernetes Pod Security Standards, covering both the Baseline (PSS-B001 to PSS-B012) and Restricted (PSS-R001 to PSS-R006) profiles.

Which issue(s) this PR fixes:
Part of #754

Special notes for your reviewer:

Release note:

Add documentation for the Pod Security Standards ruleset.

@gardener-prow

gardener-prow Bot commented Jul 2, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-prow gardener-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement Enhancement, improvement, extension labels Jul 2, 2026
@gardener-prow

gardener-prow Bot commented Jul 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dimityrmirchev for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Jul 2, 2026
severity: "HIGH"
- id: PSS-B004
name: "Capabilities (Baseline)"
description: "Adding additional capabilities beyond those listed below must be disallowed."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should probably list the capabilities?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I have now added the list

The description field were taken directly from the k8s PSP documentation from the policy field, but specific one cannot be left without the list.

description: "Adding additional capabilities beyond those listed below must be disallowed."
severity: "HIGH"
- id: PSS-B005
name: "HostPath Volumes"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Either that or we should adapt other similar names to be consistent across naming. Or was this taken from the k8s documentation?

Suggested change
name: "HostPath Volumes"
name: "Host Path Volumes"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These names were take directly from the k8s PSS documentation, as the name of the policy. I agree that there is an inconsistency, but should we fix it or stick to the way they are written in k8s?

Comment on lines +60 to +83
- id: PSS-R001
name: "Volume Types"
description: "The Restricted policy only permits the following volume types: configMap, csi, downwardAPI, emptyDir, ephemeral, persistentVolumeClaim, projected, secret."
severity: "MEDIUM"
- id: PSS-R002
name: "Privilege Escalation"
description: "Privilege escalation (such as via set-user-ID or set-group-ID file mode) should not be allowed. This is Linux only policy in v1.25+."
severity: "MEDIUM"
- id: PSS-R003
name: "Running as Non-root"
description: "Containers must be required to run as non-root users."
severity: "MEDIUM"
- id: PSS-R004
name: "Running as Non-root user"
description: "Containers must not set runAsUser to 0."
severity: "MEDIUM"
- id: PSS-R005
name: "Seccomp (Restricted)"
description: "Seccomp profile must be explicitly set to RuntimeDefault or Localhost. Unconfined profiles and the absence of a profile are prohibited."
severity: "MEDIUM"
- id: PSS-R006
name: "Capabilities (Restricted)"
description: "Containers must drop ALL capabilities, and are only permitted to add back NET_BIND_SERVICE."
severity: "MEDIUM"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I cannot decide if those should be MEDIUM or HIGH. Privilege escalation and runnning as non-root seem like a HIGH requirements to me. How can we decide what to change? The other options is to set everything to high?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Some of these rules have more restrictive versions in the baseline policies. Such are: PSS-R001 < PSS-B005; PSS-R005 < PSS-B011; PSS-R006 < PSS-B004.

We can also say that PSS-R004 < PSS-R003.

I agree that we can set PSS-R002 & PSS-R003 to HIGH

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

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement Enhancement, improvement, extension size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants