diff --git a/tasks/git-clone-checkout/task.yaml b/tasks/git-clone-checkout/task.yaml index c353a0a..a734891 100644 --- a/tasks/git-clone-checkout/task.yaml +++ b/tasks/git-clone-checkout/task.yaml @@ -1,5 +1,5 @@ --- -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1 kind: Task metadata: name: git-clone-checkout @@ -101,15 +101,6 @@ spec: value: $(workspaces.ssl-ca-directory.bound) - name: WORKSPACE_SSL_CA_DIRECTORY_PATH value: $(workspaces.ssl-ca-directory.path) - securityContext: - allowPrivilegeEscalation: false - runAsNonRoot: true - capabilities: - drop: - - ALL - seccompProfile: - type: RuntimeDefault - script: | #!/usr/bin/env sh set -eu @@ -152,4 +143,17 @@ spec: RESULT_COMMITTER_DATE="$(git log -1 --pretty=%ct)" printf "%s" "${RESULT_COMMITTER_DATE}" > "$(results.committer-date.path)" printf "%s" "${RESULT_SHA}" > "$(results.commit.path)" - printf "%s" "${PARAM_URL}" > "$(results.url.path)" \ No newline at end of file + printf "%s" "${PARAM_URL}" > "$(results.url.path)" + + podTemplate: + securityContext: + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + container: + securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true + capabilities: + drop: + - ALL \ No newline at end of file