Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .tekton/cli-e2e-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/conforma/cli?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/cancel-in-progress: "true"
pipelinesascode.tekton.dev/max-keep-runs: "2"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main"
labels:
appstudio.openshift.io/application: ec-main
appstudio.openshift.io/component: cli-main
pipelines.appstudio.openshift.io/type: test
name: cli-e2e-on-pull-request
namespace: rhtap-contract-tenant
spec:
params:
- name: git-url
value: https://github.com/conforma/e2e-tests.git
- name: revision
value: main
- name: oci-container-repo
value: quay.io/conforma/e2e-tests
- name: oci-container-repo-credentials-secret
value: konflux-test-infra
- name: aws-credentials-secret

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[medium] secret-exposure

Secret references (konflux-test-infra and mapt-kind-secret) are passed as parameters to a pipeline fetched from an unpinned mutable git ref (revision main). A compromised upstream pipeline definition could exfiltrate these secrets. This is a direct consequence of the unpinned pipeline ref. See also: [unpinned-pipeline-ref] finding at this location.

Suggested fix: Pin the pipeline ref revision to a specific commit SHA to prevent a compromised upstream from accessing these secrets.

value: mapt-kind-secret
- name: deprovision-aws-credentials-secret
Comment thread
cuipinghuo marked this conversation as resolved.
value: mapt-kind-secret
pipelineRef:
resolver: git
params:
- name: url
value: https://github.com/conforma/e2e-tests.git

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[medium] unpinned-pipeline-ref

The pipelineRef uses the Tekton git resolver to fetch a pipeline from https://github.com/conforma/e2e-tests.git at revision main without a commit-SHA pin. A compromise of the main branch of conforma/e2e-tests (or a force-push) would silently change what pipeline definition executes in this tenant. The existing .tekton files pin every task reference to an immutable bundle digest. See also: [secret-exposure] finding at this location.

Suggested fix: Pin the git resolver revision parameter to a specific commit SHA instead of the mutable branch name main. Update the SHA deliberately when the upstream pipeline changes.

- name: revision
value: main
- name: pathInRepo
value: .tekton/pipelines/conforma-e2e/pipeline.yaml
taskRunTemplate:
serviceAccountName: konflux-integration-runner
Comment thread
cuipinghuo marked this conversation as resolved.
Loading