Skip to content

[cherry-pick: release-v0.82.x] Allow runtime/default seccomp on pipelines-scc SecurityContextConstraints - #4501

Merged
tekton-robot merged 1 commit into
release-v0.82.xfrom
cherry-pick-4497-to-release-v0.82.x
Nov 24, 2026
Merged

tekton-robot merged 1 commit into
release-v0.82.xfrom
cherry-pick-4497-to-release-v0.82.x

Conversation

@tekton-robot

Copy link
Copy Markdown
Contributor

This is a cherry-pick of #4497


With set-security-context enabled, Tekton injects seccompProfile: RuntimeDefault on init containers. OpenShift rejects the pod unless pipelines-scc lists that profile, which causes SCC admission failures.

Upstream Pipeline changes : tektoncd/pipeline#9589

Issue:

task clone-git-repo has failed: pods "clone-and-success-qgpz4-clone-git-repo-pod" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, metadata.annotations[container.seccomp.security.alpha.kubernetes.io/prepare]: Forbidden: seccomp may not be set, metadata.annotations[container.seccomp.security.alpha.kubernetes.io/place-scripts]: Forbidden: seccomp may not be set, metadata.annotations[container.seccomp.security.alpha.kubernetes.io/working-dir-initializer]: Forbidden: seccomp may not be set, provider restricted-v2: .containers[0].runAsUser: Invalid value: 65532: must be in the ranges: [1000840000, 1000849999], provider restricted-v3: .spec.hostUsers: Invalid value: null: Host Users must be set to false, provider "restricted": Forbidden: not usable by user or serviceaccount, provider "nested-container": Forbidden: not usable by user or serviceaccount, provider "nonroot-v2": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount, provider "logging-scc": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid-v2": Forbidden: not usable by user or serviceaccount, provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount, provider "hostnetwork-v2": Forbidden: not usable by user or serviceaccount, provider "hostnetwork": Forbidden: not usable by user or serviceaccount, provider "hostaccess": Forbidden: not usable by user or serviceaccount, provider "insights-runtime-extractor-scc": Forbidden: not usable by user or serviceaccount, provider "node-exporter": Forbidden: not usable by user or serviceaccount, provider "privileged": Forbidden: not usable by user or serviceaccount] --- getting this error because this change https://github.com/tektoncd/pipeline/pull/9589 is there related to pipeline

Verification:

  • Verified by creating sample Pipelinerun which contains git-clone task
  • Verified SCC set
oc get scc pipelines-scc -o yaml | grep -A5 seccomp         

seccompProfiles:
- runtime/default
- '*'
supplementalGroups:
  type: RunAsAny
userNamespaceLevel: AllowHostLevel

Changes

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

If set-security-context is true ensure SecurityContextConstraints have   
seccompProfiles:
- '*'

so TaskRuns work with set-security-context enabled.

Today Tekton injects seccompProfile: RuntimeDefault on init containers when set-security-context is true. Without this SCC update, OpenShift admission can reject TaskRun pods. 
The operator now configures pipelines-scc automatically with 
seccompProfiles:
- '*'

But If user using different SCC name ensure to add 
seccompProfiles:
- '*'

…ints

With set-security-context enabled, Tekton injects seccompProfile: RuntimeDefault on init containers.
OpenShift rejects the pod unless pipelines-scc lists that profile, which causes SCC admission failures.

Signed-off-by: savitaashture <sashture@redhat.com>
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 24, 2026
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 24, 2026

@jkhelil jkhelil left a comment

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.

/approve
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 24, 2026
@tekton-robot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkhelil

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

The pull request process is described 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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 24, 2026
@tekton-robot
tekton-robot merged commit 305f160 into release-v0.82.x Nov 24, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants