-
Notifications
You must be signed in to change notification settings - Fork 60
[DNM] Add dummy task, pipeline, and ITS for EC-2011 POC #3476
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 |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ permissions: | |
| jobs: | ||
|
|
||
| Test: | ||
| if: false # skipped for POC branch | ||
|
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. [high] CI coverage regression The Suggested fix: Remove the 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. [high] CI coverage regression Adding if: false to the Test, Acceptance, and Upload jobs disables all test and coverage CI for every PR and push to main. The release workflow (release.yaml) triggers on workflow_run with conclusion=='success'. Since the Tools job still runs and skipped jobs do not fail the workflow, the overall conclusion will be 'success', meaning releases could proceed on every main push without any test validation. Suggested fix: Do not merge if: false on the main branch. Keep these changes on a separate POC branch, use path-based conditions, or disable the release workflow trigger as well. 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] scope-creep Disabling all three CI jobs is beyond the stated intent of adding a dummy task/pipeline. The PR is marked [DNM] but is not a draft, increasing the risk of accidental merge. No documented cleanup plan or expiration date exists for the POC artifacts. Suggested fix: Remove CI workflow changes from this PR, or convert to a draft PR. 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. [high] CI coverage regression All three CI jobs (Test, Acceptance, Upload) are unconditionally disabled with if: false. This workflow runs on PRs and pushes to main and release-* branches. If merged, all Go unit tests, integration tests, acceptance tests, code generation checks, and code coverage uploads would be permanently disabled for all future PRs and pushes to main. Suggested fix: Do not merge the if: false changes to main. If this POC branch needs to skip these checks, use a branch-specific condition or keep this change on a non-main branch only. 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. [high] protected-path This PR modifies a file under the .github/ protected path. The PR has no linked GitHub issue and the description does not explain why CI jobs need to be disabled. Changes to governance and infrastructure files require human approval. Suggested fix: Create a linked GitHub issue explaining the rationale for disabling CI jobs, or move this change to a non-main branch. 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. [high] CI coverage regression All three CI jobs (Test, Acceptance, Upload) are unconditionally disabled with if: false. The PR is not marked as draft and targets main. If merged, all unit tests, integration tests, acceptance tests, and code coverage uploads from this workflow are disabled for subsequent PRs. The [DNM] title convention is not enforced by branch protection. Suggested fix: Mark this PR as a draft to prevent accidental merge, or remove the CI-disabling changes from this PR entirely. 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. [high] CI coverage regression All three CI jobs (Test, Acceptance, Upload) are unconditionally disabled with 'if: false'. This workflow runs on pull_request and push to main and release-* branches. If merged to main, all subsequent PRs will lack unit test, acceptance test, and code-coverage CI signal. No other workflow provides equivalent coverage. Suggested fix: Do not merge these 'if: false' guards to main. Either scope the skip to the POC branch with a conditional expression, or remove the guards before merging. 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. [high] CI coverage regression Adding Suggested fix: Scope the skip to the POC branch only (e.g., 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. [high] ci-safety-guard-disabled All CI test jobs (Test, Acceptance, Upload) are unconditionally disabled with if: false. If accidentally merged or cherry-picked, CI protection for the repository is silently removed. Suggested fix: Use a branch-conditional guard (e.g., if: github.ref != 'refs/heads/reqd-task-its-poc') instead of if: false. 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. [high] CI coverage regression Adding Suggested fix: Mark the PR as draft or use a branch-scoped condition (e.g., 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. [high] protected-path Files under the protected Suggested fix: Link a GitHub issue that authorizes the CI workflow modifications, or remove the 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] CI-coverage-regression Adding Suggested fix: Use a branch-scoped condition such as 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] scope-creep Disabling all CI quality gates via Suggested fix: Remove the 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. [high] CI coverage regression Adding if: false to the Test, Acceptance, and Upload jobs unconditionally disables all unit tests, acceptance tests, and code coverage uploads. If merged, code could land on main without test or coverage signal. The if: false approach is branch-unaware. Suggested fix: Replace if: false with a branch-conditional guard or move POC artifacts to a separate branch without modifying shared CI workflows. 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. [high] CI coverage regression Adding if: false unconditionally disables the Test, Acceptance, and Upload Coverage jobs. This workflow provides unit test, integration test, acceptance test, and code coverage gate signal on PRs and pushes to main/release-* branches. If merged, all PRs and pushes to main would land without these CI checks. Suggested fix: Use a branch-name condition instead of if: false, or move CI-disabling to a separate workflow file on the POC branch. 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. [low] scope-coherence Disabling CI jobs with if: false is scope creep beyond the POC's stated purpose of testing Tekton pipelines and artifacts in Konflux. Suggested fix: Remove the if: false additions or use branch-level filtering in workflow triggers. 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. [high] protected-path Protected path modified: .github/workflows/checks-codecov.yaml and .github/workflows/codeql.yaml are under the .github/ protected path. The PR has no linked GitHub issue and does not explain why CI workflow files need to be modified. Human approval is always required for changes to governance and infrastructure files. Suggested fix: Link a GitHub issue authorizing the CI workflow changes, or remove the if: false modifications from the protected workflow files. 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] CI coverage regression if: false unconditionally disables the Test, Acceptance, and Upload jobs. These guards are not branch-scoped, so accidental merge would disable all tests and coverage for the repository. Suggested fix: Use a branch-scoped condition like if: github.head_ref != reqd-task-its-poc rather than if: false. 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] scope-creep Disabling CI workflows is outside the PRs stated scope of add dummy task, pipeline, and ITS for EC-2011 POC. Suggested fix: Remove the if: false guards. Use [skip ci] in individual commit messages if CI is too slow for iteration. 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. [high] protected-path PR modifies files under the protected .github/ path (.github/workflows/checks-codecov.yaml, .github/workflows/codeql.yaml). No linked issue exists and the PR description does not specifically explain why CI workflow files are being modified. Human approval is always required for protected-path changes. Suggested fix: Link a GitHub issue authorizing the CI workflow changes, or remove the workflow modifications from this PR. 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] CI coverage regression Adding if: false unconditionally disables the Test, Acceptance, and Upload jobs for all branches. The comment says 'skipped for POC branch' but if: false is not branch-conditional, so if merged it would disable CI for all branches. Suggested fix: Replace if: false with a branch-scoped condition or keep these changes out of the workflow files entirely. 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] scope-mismatch CI disabling is a significant scope expansion beyond the stated intent of adding dummy task/pipeline/ITS. The CI changes are unnecessary for the POC goal. Suggested fix: Remove the if: false additions. Use per-commit skip mechanisms instead. 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] CI coverage regression All three jobs (Test, Acceptance, Upload) are unconditionally disabled with if: false, removing unit tests, acceptance tests, and code coverage uploads for all PRs and pushes to main/release branches. Suggested fix: Remove the CI workflow changes. CI failures on a draft POC branch are acceptable; blanket if: false is unnecessary. 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] scope-creep Disabling all CI checks goes beyond the stated intent of adding a dummy task, pipeline, and ITS for EC-2011 POC. CI disabling is a separate concern from adding test pipeline artifacts. Suggested fix: Remove the if: false additions from the CI workflow files. 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. [high] CI-coverage-regression All three jobs (Test, Acceptance, Upload) are disabled with Suggested fix: Use branch-scoped conditions (e.g., 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] scope-creep Disabling all CI jobs (tests, coverage, CodeQL) goes beyond the stated scope of 'add dummy task, pipeline, and ITS.' This represents significant scope expansion. Suggested fix: Remove the CI-disabling changes or use branch-level workflow filtering. 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] CI-coverage-regression Adding if: false unconditionally disables the Test, Acceptance, and Upload jobs. These jobs gate unit tests, acceptance tests, code generation checks, and coverage uploads. If merged, subsequent PRs to main would land without this CI signal. 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] CI coverage regression if: false unconditionally disables the Test, Acceptance, and Upload Coverage jobs for all PRs and pushes to main/release-* branches. |
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Harden Runner | ||
|
|
@@ -96,6 +97,7 @@ jobs: | |
| retention-days: 1 | ||
|
|
||
| Acceptance: | ||
| if: false # skipped for POC branch | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| # Disabled until we figure out the "Could not resolve host: github.com" in | ||
|
|
@@ -164,6 +166,7 @@ jobs: | |
|
|
||
| Upload: | ||
| name: "Upload Coverage Statistics" | ||
| if: false # skipped for POC branch | ||
| runs-on: ubuntu-latest | ||
| needs: [Test, Acceptance] | ||
| steps: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ permissions: | |
|
|
||
| jobs: | ||
| analyze: | ||
| if: false # skipped for POC branch | ||
|
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. [high] CI coverage regression / Security scanning bypass Adding Suggested fix: Scope the condition to the POC branch or do not merge this workflow change to main. 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. [high] ci-safety-guard-disabled CodeQL security scanning is disabled via if: false on the analyze job. If merged, the repository would lose automated SAST for Go code on pushes, pull requests, and scheduled scans. Suggested fix: Use a branch-conditional guard instead of if: false, or leave the workflow unmodified. 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. [high] CI coverage regression Adding Suggested fix: Use a branch-scoped condition or mark PR as draft to prevent accidental merge. 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] CI-coverage-regression The Suggested fix: Scope the skip condition to this branch only, or remove the CI modification. 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] CI-security-regression Disabling CodeQL removes automated static analysis security scanning for the repository if merged. Suggested fix: Do not disable CodeQL scanning on the main branch. Use branch-specific conditions or keep changes on a non-protected branch. 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. [high] CI coverage regression The CodeQL security analysis job is unconditionally disabled with if: false. This removes static security scanning for any branch carrying this commit, including the weekly scheduled scan on main. Suggested fix: Use a branch-conditional guard or avoid modifying shared CI workflows in POC branches. 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. [high] CI coverage regression Adding if: false disables the CodeQL security analysis job. This workflow runs on PRs to main, pushes to main, and on a weekly schedule. If merged, it would eliminate static analysis security scanning and the weekly scheduled scan entirely. Suggested fix: Use a branch-specific condition or keep CI modifications out of the PR entirely. 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] CI coverage regression if: false unconditionally disables CodeQL security analysis. Same accidental-merge risk as the checks-codecov workflow. Suggested fix: Use a branch-scoped condition or remove this change entirely. 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] CI coverage regression Adding if: false unconditionally disables the CodeQL security analysis job for all triggers including the weekly cron. Suggested fix: Use a branch-conditional skip or remove this change. 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] CI coverage regression The CodeQL security analysis job is unconditionally disabled with if: false, removing SAST coverage for all PRs, pushes to main, and the scheduled weekly scan. Suggested fix: Remove this change from the PR. 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. [high] CI-coverage-regression CodeQL security analysis job disabled with Suggested fix: Use branch-scoped conditions or keep this change off the PR. 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] CI-coverage-regression Adding if: false unconditionally disables the CodeQL security analysis job. If merged, no CodeQL scanning would run for future PRs, pushes, or the weekly schedule. 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] CI coverage regression if: false disables CodeQL security scanning for all branches and the weekly schedule. |
||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright The Conforma Contributors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
|
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. [low] pattern-inconsistency License header URL indentation uses 5 spaces vs repo convention of 6 spaces. Affects all 3 new files. |
||
| # | ||
|
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. [low] license-header-formatting License header uses 5-space indentation for URL line. Dominant convention (60+ files) uses 6-space indentation. Suggested fix: Add one space to URL indentation. |
||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Creates (or deletes) the dummy IntegrationTestScenario for the EC-2011 POC. | ||
| # | ||
| # This script ONLY manages the IntegrationTestScenario object. The ITS pipeline's | ||
| # attest-test-result step also needs push access, which requires patching the | ||
| # shared konflux-integration-runner ServiceAccount — a separate, security- | ||
| # sensitive, namespace-wide change handled by hack/modify-sa-for-dummy-its.sh. | ||
| # Run that script after this one to grant push access. | ||
|
|
||
| set -euo pipefail | ||
|
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. [low] Shell option style Uses short-form set -euo pipefail while the majority of shell scripts in hack/ use the long-form convention (set -o errexit, set -o nounset, set -o pipefail, one per line). Suggested fix: Replace with the long-form convention for consistency. 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. [low] shell-idiom Uses short-form set -euo pipefail whereas the established convention in hack/ scripts is long-form set -o errexit, set -o nounset, set -o pipefail on separate lines. |
||
|
|
||
|
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. [low] naming-convention Script uses set -euo pipefail but repo convention is long-form (set -o errexit; set -o nounset; set -o pipefail). 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] shell set-option idiom The script uses set -euo pipefail (compact form), but every existing script in hack/ uses the long-form set -o errexit, set -o nounset, set -o pipefail on separate lines. Suggested fix: Replace set -euo pipefail with separate set -o errexit, set -o nounset, set -o pipefail lines. 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. [low] shell set-options idiom Uses compact set -euo pipefail; convention in hack/ is long-form set -o errexit, set -o nounset, set -o pipefail. 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. [low] shell-idiom Uses set -euo pipefail (short form), while the overwhelming majority of hack/ scripts use long-form set -o errexit, set -o nounset, set -o pipefail. Suggested fix: Replace with long-form set options to match project convention. 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. [low] shell-options-idiom Uses set -euo pipefail (short-form) while all other hack/ scripts use long-form (set -o errexit, set -o nounset, set -o pipefail). Suggested fix: Replace with long-form flags matching hack/ convention. 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. [low] shell-strict-mode Uses Suggested fix: Replace with three separate long-form lines for consistency with existing scripts. 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. [low] shell-idiom Uses short-form set -euo pipefail while the majority (30 of 34) of hack/ scripts use long-form (set -o errexit, set -o nounset, set -o pipefail). Suggested fix: Use long-form set flags for consistency with the existing codebase. 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. [low] naming-convention Uses short-form set -euo pipefail where repo convention is long-form (set -o errexit, etc.). 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. [low] shell-idiom-consistency Script uses set -euo pipefail while every other hack/ script uses long-form set -o errexit; set -o nounset; set -o pipefail on separate lines. 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. [low] shell-idiom-consistency Uses set -euo pipefail while all other hack/ scripts use the expanded set -o errexit, set -o nounset, set -o pipefail form. 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. [low] shell-options-idiom Uses compact Suggested fix: Replace with three separate |
||
| NAMESPACE="${NAMESPACE:-rhtap-contract-tenant}" | ||
|
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. [low] injection oc apply heredoc interpolates environment variables directly into YAML without escaping. 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. [low] shell style idiom Uses short-form set -euo pipefail while other hack/ scripts use long-form set -o errexit, set -o nounset, set -o pipefail. Suggested fix: Use long-form for consistency. |
||
| APPLICATION="${APPLICATION:-ec-main}" | ||
| ITS_NAME="${ITS_NAME:-reqd-task-poc-ec2011}" | ||
|
|
||
| GIT_URL="${GIT_URL:-https://github.com/simonbaird/conforma-cli}" | ||
|
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] permission-expansion The IntegrationTestScenario defaults GIT_URL to a personal fork and GIT_REVISION to a mutable branch. The ITS instructs Konflux to fetch and execute pipeline definitions from this external source. Suggested fix: Pin GIT_REVISION to a specific commit SHA. |
||
| GIT_REVISION="${GIT_REVISION:-reqd-task-its-poc}" | ||
|
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. [low] Hardcoded personal reference The default for GIT_URL is a personal fork (https://github.com/simonbaird/conforma-cli). This is consistent with the POC nature but should be updated to the organization URL before any production use. Suggested fix: Consider using the organization URL as the default. |
||
| PIPELINE_PATH="${PIPELINE_PATH:-pipelines/dummy-integration-test/0.1/dummy-integration-test.yaml}" | ||
|
|
||
| usage() { | ||
| cat <<EOF | ||
| Usage: $(basename "$0") [--revert] [--help] | ||
|
|
||
| (no args) Create the dummy IntegrationTestScenario. | ||
| --revert Delete the dummy IntegrationTestScenario. | ||
|
|
||
| Grant/revoke the push access the ITS pipeline needs separately, with | ||
| hack/modify-sa-for-dummy-its.sh. | ||
|
|
||
| Environment overrides: NAMESPACE, APPLICATION, ITS_NAME, GIT_URL, GIT_REVISION, | ||
| PIPELINE_PATH. | ||
| EOF | ||
| } | ||
|
|
||
| create_its() { | ||
| echo "Creating IntegrationTestScenario '${ITS_NAME}' in namespace '${NAMESPACE}'" | ||
| echo " Application: ${APPLICATION}" | ||
| echo " Git URL: ${GIT_URL}" | ||
| echo " Revision: ${GIT_REVISION}" | ||
| echo " Pipeline: ${PIPELINE_PATH}" | ||
| echo "" | ||
|
|
||
| oc apply -f - <<EOF | ||
| apiVersion: appstudio.redhat.com/v1beta2 | ||
|
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. [low] Injection / Shell command injection via environment variables The script interpolates environment variables directly into YAML heredoc and JSON patch payloads without sanitization. Theoretical YAML/JSON injection risk, though practical exploitation requires controlling the operator's environment. |
||
| kind: IntegrationTestScenario | ||
| metadata: | ||
| name: ${ITS_NAME} | ||
| namespace: ${NAMESPACE} | ||
| labels: | ||
| test.appstudio.openshift.io/optional: "true" | ||
|
Comment on lines
+65
to
+66
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- script ---'
cat -n hack/create-dummy-its.sh
printf '%s\n' '--- related references ---'
rg -n -i --glob '!vendor/**' --glob '!node_modules/**' \
'reqd-task-poc-ec2011|test\.appstudio\.openshift\.io/optional|optional.*IntegrationTestScenario|IntegrationTestScenario|required task|required-task' .Repository: conforma/cli Length of output: 2721 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- dummy integration-test pipeline ---'
cat -n pipelines/dummy-integration-test/0.1/dummy-integration-test.yaml
printf '%s\n' '--- enterprise-contract guidance ---'
sed -n '70,110p' pipelines/enterprise-contract/0.1/enterprise-contract.yaml
printf '%s\n' '--- all optional-label and informative references ---'
rg -n -i 'test\.appstudio\.openshift\.io/optional|informative|required.*task|task.*required|IntegrationTestScenario' \
README.md docs hack pipelines internal config .github 2>/dev/null || trueRepository: conforma/cli Length of output: 7294 🌐 Web query:
💡 Result: The label Citations:
Remove the optional label from the required-task scenario. The 🤖 Prompt for AI Agents |
||
| spec: | ||
| application: ${APPLICATION} | ||
| contexts: | ||
| - description: Application testing | ||
| name: application | ||
|
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] command-injection PULL_SECRET is interpolated into inline Python code via shell string expansion. A crafted value containing a single quote could break out of the Python string context and execute arbitrary Python code. Suggested fix: Pass PULL_SECRET as an environment variable and access with os.environ['PULL_SECRET'] in the Python code. 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] injection PULL_SECRET env var is interpolated directly into inline Python code via shell expansion. A single quote in the value would break Python syntax and could enable code execution. Same pattern at line 53. PUSH_SECRET is also interpolated into grep pattern and JSON patch. Suggested fix: Pass via environment variable and read with os.environ. Validate all env inputs. 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. [low] command-injection Shell variable Suggested fix: Pass values via environment variables read inside Python (e.g., |
||
| resolverRef: | ||
| resolver: 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. [low] TOCTOU race SA_JSON is fetched once and reused after oc patch modifies the ServiceAccount. The second grep check operates on a stale snapshot. |
||
| resourceKind: pipeline | ||
| params: | ||
| - name: url | ||
| value: ${GIT_URL} | ||
|
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. [low] Shell injection PULL_SECRET is bash-expanded directly inside an inline Python string literal. A crafted override value with single quotes could escape the string context. 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. [low] race-condition The script captures ServiceAccount JSON once, then computes an index for oc patch against the live object. Concurrent modification would produce incorrect results. |
||
| - name: revision | ||
| value: ${GIT_REVISION} | ||
| - name: pathInRepo | ||
| value: ${PIPELINE_PATH} | ||
| EOF | ||
|
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] shell-injection The inline Python code interpolates ${PULL_SECRET} directly into the Python source via a heredoc. A value containing a single quote would break the Python string literal and could cause unexpected behavior or code execution. Suggested fix: Pass PULL_SECRET as an environment variable to the Python subprocess and access it via os.environ. |
||
|
|
||
| echo "" | ||
| echo "Done. Verify with:" | ||
| echo " oc get integrationtestscenario ${ITS_NAME} -n ${NAMESPACE} -o yaml" | ||
| echo "" | ||
| echo "Next: grant push access with hack/modify-sa-for-dummy-its.sh" | ||
| } | ||
|
|
||
| revert_its() { | ||
| echo "Deleting IntegrationTestScenario '${ITS_NAME}' from namespace '${NAMESPACE}'" | ||
| oc delete integrationtestscenario "${ITS_NAME}" -n "${NAMESPACE}" --ignore-not-found | ||
| echo "" | ||
| echo "Done. If push access was granted, revoke it with:" | ||
| echo " hack/modify-sa-for-dummy-its.sh --revert" | ||
| } | ||
|
|
||
| case "${1:-}" in | ||
| --revert) revert_its ;; | ||
| --help | -h) usage ;; | ||
| "") create_its ;; | ||
| *) echo "Unknown argument: $1" >&2; echo ""; usage; exit 1 ;; | ||
| esac | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright The Conforma Contributors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Grants (or revokes) push access for the EC-2011 POC ITS pipeline by patching | ||
| # the shared konflux-integration-runner ServiceAccount. | ||
| # | ||
| # The integration service runs all ITS pipelines using the | ||
| # konflux-integration-runner ServiceAccount. There's currently no way to | ||
| # specify a per-ITS ServiceAccount, so we have to patch the shared SA to | ||
| # include the push secret needed by the attest-test-result step action. | ||
| # | ||
| # NOTE: This is a security hazard, not just a broad-scope inconvenience. ITS | ||
| # pipelines are BYO/arbitrary by design, so any secret on the shared runner SA | ||
| # is a secret handed to untrusted code. This patch is acceptable only for this | ||
| # POC under a "trusted pipeline" assumption; a real solution must keep push | ||
| # credentials off the runner SA entirely (e.g. platform-side push). It is kept | ||
| # in its own script (separate from create-dummy-its.sh) precisely because it is | ||
| # a shared, namespace-wide, security-sensitive change. | ||
| # | ||
| # TODO: Ideally only specific ITS pipelines that need push access should | ||
| # get it, not every ITS in the namespace. This requires either: | ||
| # - A per-ITS ServiceAccount field in the IntegrationTestScenario spec | ||
| # (integration-service is one field away: the `if ServiceAccountName == ""` | ||
| # guard in tekton/integration_pipeline.go already exists, nothing feeds it) | ||
| # - A dedicated SA created and wired up per pipeline | ||
| # For now we accept the broader scope for this POC. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| NAMESPACE="${NAMESPACE:-rhtap-contract-tenant}" | ||
| INTEGRATION_SA="konflux-integration-runner" | ||
| PUSH_SECRET="${PUSH_SECRET:-imagerepository-for-ec-main-cli-main-image-push}" | ||
|
|
||
| # The pull-only secret "ec-main-pull" covers the same registry path as the | ||
| # push secret. Tekton merges all SA secrets into a single docker config, and | ||
| # if the pull-only credential wins the merge for that registry, oras attach | ||
| # fails with "unauthorized". Removing the pull-only secret avoids the | ||
| # conflict — the push secret includes pull permission so nothing is lost. | ||
| # | ||
| # NOTE: select-oci-auth (used by the oras attach step action) does NOT avoid | ||
| # this. Both secrets key their auth at the identical repo path, so Tekton's | ||
| # merge keeps only one token; select-oci-auth only disambiguates across | ||
| # *different* keys and runs after the merge. So this removal is still required. | ||
| PULL_SECRET="${PULL_SECRET:-ec-main-pull}" | ||
|
|
||
| usage() { | ||
| cat <<EOF | ||
| Usage: $(basename "$0") [--revert] [--help] | ||
|
|
||
| (no args) Grant push access: remove the conflicting pull-only secret and add | ||
| the push secret to the ${INTEGRATION_SA} ServiceAccount. | ||
| --revert Restore the pull-only state: remove the push secret and re-add the | ||
| pull-only secret. | ||
|
|
||
| Environment overrides: NAMESPACE, PUSH_SECRET, PULL_SECRET. | ||
| EOF | ||
| } | ||
|
|
||
| # Returns 0 if the integration SA already lists the named secret. | ||
| sa_has_secret() { | ||
| local secret="$1" | ||
| oc get sa "${INTEGRATION_SA}" -n "${NAMESPACE}" -o json | python3 -c " | ||
| import json, sys | ||
| secret = sys.argv[1] | ||
| secrets = [s['name'] for s in json.load(sys.stdin).get('secrets', [])] | ||
| sys.exit(0 if secret in secrets else 1) | ||
| " "${secret}" | ||
| } | ||
|
|
||
| # Link the named secret to the integration SA (no-op if already present). | ||
| link_secret() { | ||
| local secret="$1" | ||
| if sa_has_secret "${secret}"; then | ||
| echo "Secret '${secret}' already linked to SA '${INTEGRATION_SA}'" | ||
| else | ||
| echo "Adding secret '${secret}' to SA '${INTEGRATION_SA}'" | ||
| oc patch sa "${INTEGRATION_SA}" -n "${NAMESPACE}" --type=json \ | ||
| -p="[{\"op\":\"add\",\"path\":\"/secrets/-\",\"value\":{\"name\":\"${secret}\"}}]" | ||
| fi | ||
| } | ||
|
|
||
| # Unlink the named secret from the integration SA (no-op if absent). | ||
| unlink_secret() { | ||
| local secret="$1" | ||
| if ! sa_has_secret "${secret}"; then | ||
| echo "Secret '${secret}' not present on SA '${INTEGRATION_SA}' (nothing to remove)" | ||
| return | ||
| fi | ||
| echo "Removing secret '${secret}' from SA '${INTEGRATION_SA}'" | ||
|
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. [low] TOCTOU unlink_secret has a time-of-check-to-time-of-use gap between checking for a secret's presence and patching the ServiceAccount. Suggested fix: Combine into single get+patch or use optimistic locking. |
||
| local index | ||
| index=$(oc get sa "${INTEGRATION_SA}" -n "${NAMESPACE}" -o json | python3 -c " | ||
| import json, sys | ||
| secret = sys.argv[1] | ||
| for i, s in enumerate(json.load(sys.stdin).get('secrets', [])): | ||
| if s['name'] == secret: | ||
| print(i) | ||
|
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] error-handling-gap The unlink_secret function performs two separate oc get sa calls (TOCTOU race). If the SA is modified between calls, the index variable will be empty, causing the oc patch command to use an invalid JSON Patch path /secrets/. |
||
| break | ||
|
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. [low] error handling gap If the python3 index-finding script doesn't find the secret, index is empty, causing an unhelpful API error in the subsequent oc patch. Suggested fix: Add a guard on empty index before patching. |
||
| " "${secret}") | ||
| oc patch sa "${INTEGRATION_SA}" -n "${NAMESPACE}" --type=json \ | ||
| -p="[{\"op\":\"remove\",\"path\":\"/secrets/${index}\"}]" | ||
| } | ||
|
|
||
| grant_push() { | ||
| echo "Granting push access on SA '${INTEGRATION_SA}' in namespace '${NAMESPACE}'" | ||
| echo "" | ||
| unlink_secret "${PULL_SECRET}" | ||
| link_secret "${PUSH_SECRET}" | ||
| echo "" | ||
| echo "Done. Verify with:" | ||
| echo " oc get sa ${INTEGRATION_SA} -n ${NAMESPACE} -o yaml" | ||
| } | ||
|
|
||
| revoke_push() { | ||
| echo "Restoring pull-only state on SA '${INTEGRATION_SA}' in namespace '${NAMESPACE}'" | ||
| echo "" | ||
| unlink_secret "${PUSH_SECRET}" | ||
| link_secret "${PULL_SECRET}" | ||
| echo "" | ||
| echo "Done. Verify with:" | ||
| echo " oc get sa ${INTEGRATION_SA} -n ${NAMESPACE} -o yaml" | ||
| } | ||
|
|
||
| case "${1:-}" in | ||
| --revert) revoke_push ;; | ||
| --help | -h) usage ;; | ||
| "") grant_push ;; | ||
| *) echo "Unknown argument: $1" >&2; echo ""; usage; exit 1 ;; | ||
| esac | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| # Copyright The Conforma Contributors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
|
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. [low] license-header-formatting License header uses 5-space indentation for URL line vs. 6-space convention. Suggested fix: Add one space to URL indentation. |
||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| --- | ||
| apiVersion: tekton.dev/v1 | ||
| kind: Pipeline | ||
| metadata: | ||
| name: reqd-task-poc-ec2011 | ||
| labels: | ||
|
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. [low] naming-coherence Directory is dummy-integration-test but Pipeline resource name is reqd-task-poc-ec2011. Existing convention uses the same name for directory and resource. 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. [low] naming-convention Pipeline/task name reqd-task-poc-ec2011 encodes Jira ticket number and abbreviation. Diverges from existing descriptive naming pattern. |
||
| build.appstudio.redhat.com/pipeline: "reqd-task-poc-ec2011" | ||
| spec: | ||
|
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. [low] naming-inconsistency The pipeline is named reqd-task-poc-ec2011, encoding a Jira ticket identifier, while existing pipelines use descriptive functional names. |
||
| params: | ||
| - name: SNAPSHOT | ||
| type: string | ||
| description: | | ||
| Spec section of an ApplicationSnapshot resource. Not all fields of the | ||
| resource are required. A minimal example: | ||
| { | ||
| "components": [ | ||
| { | ||
| "containerImage": "quay.io/example/repo@sha256:abc123..." | ||
| } | ||
| ] | ||
| } | ||
| Each "containerImage" in the "components" array is validated. | ||
| - name: RESULT | ||
| type: string | ||
| description: >- | ||
| The desired result of the dummy check. Must be one of: SUCCESS, | ||
| FAILURE, WARNING, ERROR, or SKIPPED. | ||
| default: "SUCCESS" | ||
| results: | ||
| - name: TEST_OUTPUT | ||
|
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. [low] fragile JSON parsing parse-snapshot uses grep -oP for JSON parsing, which is fragile for minified or escaped JSON and may not be portable across all container images. 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] edge-case The parse-snapshot step uses grep -oP (PCRE) to extract containerImage from JSON. The -P flag may not be available in the ubi9/ubi-minimal image, and the regex will produce incorrect results for values containing escaped characters. |
||
| value: "$(tasks.dummy-check.results.TEST_OUTPUT)" | ||
| tasks: | ||
|
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] runtime failure The parse-snapshot step uses Suggested fix: Replace with a portable alternative such as |
||
| - name: parse-snapshot | ||
|
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] runtime failure / portability parse-snapshot step uses grep -oP (PCRE) with \K lookbehind. ubi9/ubi-minimal may not have PCRE support compiled. Additionally, parsing JSON with grep is fragile. Suggested fix: Use POSIX-compatible grep or use jq/python3 for JSON parsing. |
||
| taskSpec: | ||
| params: | ||
|
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. [low] Fragile regex parsing parse-snapshot uses grep regex to extract containerImage. If the image reference lacks an @ digest separator, IMAGE_DIGEST receives the entire image string. |
||
| - name: SNAPSHOT | ||
| type: string | ||
|
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] runtime-failure The Suggested fix: Replace with a PCRE-free alternative using |
||
| results: | ||
| - name: image-url | ||
| - name: image-digest | ||
|
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. [low] grep -oP portability The parse-snapshot step uses grep -oP (PCRE with \K lookbehind) to extract containerImage from SNAPSHOT JSON. While ubi9/ubi-minimal ships GNU grep with -P support, parsing structured JSON with regex is fragile and may break on multi-line or reordered JSON. Suggested fix: Consider using jq for JSON parsing if available in the image. |
||
| steps: | ||
| - name: parse | ||
| image: quay.io/konflux-ci/task-runner:v3 | ||
| env: | ||
| - name: SNAPSHOT | ||
| value: $(params.SNAPSHOT) | ||
| script: | | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| IMAGE=$(jq -r '.components[0].containerImage // empty' <<<"${SNAPSHOT}") | ||
| if [[ -z "${IMAGE}" ]]; then | ||
| echo "ERROR: No containerImage found in SNAPSHOT" >&2 | ||
|
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] supply-chain Pipeline resolves dummy-check task from personal fork (simonbaird/conforma-cli) at mutable branch reqd-task-its-poc. The hack/create-dummy-its.sh script defaults to the same fork. Existing project pipelines use organization-owned bundle resolvers. Suggested fix: Pin to an immutable commit SHA and reference the organizational repository. |
||
| exit 1 | ||
| fi | ||
|
|
||
| IMAGE_URL="${IMAGE%%@*}" | ||
|
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. [low] personal-fork-references Pipeline and task reference personal fork repos. Acceptable for DNM/POC but would need updating if promoted. 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] External dependency pinning / supply chain The dummy-check task is referenced from a personal repository (simonbaird/conforma-cli) on a named branch (reqd-task-its-poc) rather than a pinned SHA. Branch references are mutable. Suggested fix: Pin to a specific commit SHA. |
||
| IMAGE_DIGEST="${IMAGE##*@}" | ||
|
|
||
|
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] edge-case The parse-snapshot step uses grep -oP which requires PCRE support. The ubi9/ubi-minimal image may not include PCRE, causing the step to fail. Suggested fix: Replace the Perl regex with a POSIX-compatible alternative or use jq. 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. [low] Injection / Regex-based parsing The parse-snapshot step uses grep with regex to extract containerImage from JSON rather than using a proper JSON parser like jq. 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] supply chain / mutable reference The pipeline's Suggested fix: Pin the 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] supply-chain-integrity The pipeline's taskRef uses a mutable branch name (reqd-task-its-poc) rather than a pinned commit SHA from a personal GitHub repository. Suggested fix: Pin the revision to a specific commit SHA. 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. [high] runtime failure The parse-snapshot step uses grep -oP (Perl-compatible regex with \K lookbehind) on the ubi9/ubi-minimal:latest image. ubi-minimal ships grep-minimal, compiled without PCRE support. This will fail at runtime, preventing the pipeline from executing. Suggested fix: Replace the PCRE regex with a POSIX-compatible approach (e.g., sed, awk, or python3). |
||
| echo "Parsed image-url: ${IMAGE_URL}" | ||
| echo "Parsed image-digest: ${IMAGE_DIGEST}" | ||
|
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] Missing validation parse-snapshot splits containerImage on @. If the image lacks @ (tag-only reference), both IMAGE_URL and IMAGE_DIGEST are set to the full string, producing an invalid digest. Suggested fix: Add digest format validation after the split. |
||
|
|
||
| echo -n "${IMAGE_URL}" > "$(results.image-url.path)" | ||
| echo -n "${IMAGE_DIGEST}" > "$(results.image-digest.path)" | ||
|
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] edge-case If the containerImage value in the SNAPSHOT does not contain an @ separator, the parameter expansion IMAGE_DIGEST=${IMAGE##*@} will set IMAGE_DIGEST to the entire image string rather than an actual digest. Suggested fix: Add a guard to verify the image contains @ and the digest is valid. |
||
| params: | ||
| - name: SNAPSHOT | ||
| value: "$(params.SNAPSHOT)" | ||
| - name: dummy-check | ||
| runAfter: | ||
| - parse-snapshot | ||
| params: | ||
| - name: RESULT | ||
| value: "$(params.RESULT)" | ||
| - name: image-url | ||
| value: "$(tasks.parse-snapshot.results.image-url)" | ||
| - name: image-digest | ||
| value: "$(tasks.parse-snapshot.results.image-digest)" | ||
|
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] supply chain / unpinned dependency The pipeline dummy-check taskRef resolves from https://github.com/simonbaird/conforma-cli at mutable branch reqd-task-its-poc. A force-push or branch deletion would alter or break pipeline behavior. Suggested fix: Pin the revision parameter to a specific commit SHA. |
||
| taskRef: | ||
| resolver: 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. [high] external-dependency-pinning Pipeline resolves task from personal fork (simonbaird/conforma-cli, branch reqd-task-its-poc) via mutable branch ref. Architecturally inconsistent with existing pipeline pattern using bundles resolver. Creates supply-chain trust gap since the branch content can change at any time. Suggested fix: Either resolve from the same repo, use inline taskSpec, or pin to a specific commit SHA. |
||
| params: | ||
|
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] Hardcoded personal fork reference The pipeline's dummy-check taskRef resolver references https://github.com/simonbaird/conforma-cli on branch reqd-task-its-poc. This creates a runtime dependency on a personal fork that may be deleted or force-pushed. The task definition is being added to this same repository. The same pattern appears in hack/create-dummy-its.sh. Suggested fix: Update the git resolver URL to https://github.com/conforma/cli and reference the branch/revision where the task will exist after merge. Update hack/create-dummy-its.sh defaults similarly. 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. [high] Supply chain / Untrusted external code reference The pipeline's dummy-check task references a task definition from a personal GitHub repository (simonbaird/conforma-cli) using a mutable branch name (reqd-task-its-poc). The Tekton git resolver will fetch whatever is at HEAD of that branch at resolution time. Suggested fix: Pin the revision to an immutable commit SHA. For any non-POC use, migrate the task definitions to the official organization repository. 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] fork-reference Pipeline task references personal fork (simonbaird/conforma-cli) at branch reqd-task-its-poc rather than the canonical conforma/cli repository. Suggested fix: Document follow-up to migrate to canonical repo before any production use. 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] permission-expansion The task resolver uses a mutable branch reference (reqd-task-its-poc) from a personal fork. The task definition could change after deployment, executing different code with the mounted push credentials. Suggested fix: Pin the task resolver to a specific commit SHA rather than a branch name. 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] hardcoded-fork-reference The |
||
| - name: url | ||
| value: https://github.com/simonbaird/conforma-cli | ||
|
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] secret-exposure Pipeline resolves the dummy-check task from a personal fork (simonbaird/conforma-cli) on a mutable branch (reqd-task-its-poc). Suggested fix: Pin to an immutable commit SHA or use the upstream repository. |
||
| - name: revision | ||
|
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. [high] supply chain / untrusted code source All git resolver references across the pipeline, task, and helper script point to personal forks (simonbaird/conforma-cli and simonbaird/step-actions) on mutable branches rather than canonical org repos or pinned SHAs. This includes the attestation-creation step which is security-critical. Fork branches can be force-pushed, deleted, or compromised without review. Suggested fix: Point references to org repos or pin to commit SHAs. At minimum, add prominent comments documenting that these are temporary POC references. |
||
| value: reqd-task-its-poc | ||
|
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. [high] secret-exposure The pipeline resolves the dummy-check task from a personal fork repository (https://github.com/simonbaird/conforma-cli) at a mutable branch reference (reqd-task-its-poc), not a pinned commit SHA. This creates a supply chain risk — the task code that runs with cluster access can be changed without review. Suggested fix: Pin all git resolver references to specific commit SHAs rather than branch names. |
||
| - name: pathInRepo | ||
| value: tasks/dummy-check/0.1/dummy-check.yaml | ||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Replace the constant job conditions with one lint-valid POC gate.
actionlintrejects each constantif: falsecondition. Use the same non-constant repository or workflow variable gate for all three jobs. Keep the gate false for the POC..github/workflows/checks-codecov.yaml#L37-L37: update theTestjob condition..github/workflows/checks-codecov.yaml#L100-L100: update theAcceptancejob condition..github/workflows/checks-codecov.yaml#L169-L169: update theUploadjob condition.🧰 Tools
🪛 actionlint (1.7.12)
[error] 37-37: constant expression "false" in condition. remove the if: section
(if-cond)
📍 Affects 1 file
.github/workflows/checks-codecov.yaml#L37-L37(this comment).github/workflows/checks-codecov.yaml#L100-L100.github/workflows/checks-codecov.yaml#L169-L169🤖 Prompt for AI Agents
Source: Linters/SAST tools