-
Notifications
You must be signed in to change notification settings - Fork 57
Trigger conforma e2e tests on cli pull requests #3334
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| value: mapt-kind-secret | ||
| - name: deprovision-aws-credentials-secret | ||
|
cuipinghuo marked this conversation as resolved.
|
||
| value: mapt-kind-secret | ||
| pipelineRef: | ||
| resolver: git | ||
| params: | ||
| - name: url | ||
| value: https://github.com/conforma/e2e-tests.git | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Suggested fix: Pin the git resolver revision parameter to a specific commit SHA instead of the mutable branch name |
||
| - name: revision | ||
| value: main | ||
| - name: pathInRepo | ||
| value: .tekton/pipelines/conforma-e2e/pipeline.yaml | ||
| taskRunTemplate: | ||
| serviceAccountName: konflux-integration-runner | ||
|
cuipinghuo marked this conversation as resolved.
|
||
There was a problem hiding this comment.
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-infraandmapt-kind-secret) are passed as parameters to a pipeline fetched from an unpinned mutable git ref (revisionmain). 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.