Skip to content

fix: VSA generation issues in verify-conforma-konflux-ta task#3118

Merged
simonbaird merged 1 commit intoconforma:mainfrom
arewm:fix/ta-missing-basename
Mar 5, 2026
Merged

fix: VSA generation issues in verify-conforma-konflux-ta task#3118
simonbaird merged 1 commit intoconforma:mainfrom
arewm:fix/ta-missing-basename

Conversation

@arewm
Copy link
Contributor

@arewm arewm commented Feb 17, 2026

The ENABLE_VSA code path had several bugs that together prevented VSA files
from being produced and archived correctly. The ec CLI rejects output paths
outside /tmp or cwd, --vsa-upload must only be passed for dsse format since
the local@ backend requires a signing key, and echo without -n writes a
trailing newline that breaks Tekton When Expression matching.

The trusted artifact archival was also broken: workDir was hardcoded to
/var/workdir rather than $(params.TRUSTED_ARTIFACTS_EXTRACT_DIR), so
downstream tasks would find the snapshot nested under a conforma/ prefix
instead of at the archive root. The VSA_UPLOAD default was similarly
misaligned, pointing outside the extract dir so VSA files were never
captured in the archive. The report-json.json is now also copied into the
VSA directory so downstream tasks can generate SLSA VSAs from the
Conforma evaluation report.

Adds an acceptance test scenario for ENABLE_VSA=true with predicate format,
a new taskResultShouldEqual step definition for targeted result assertions,
and updates the existing snapshot for the echo -n fix.

Test plan

  • Validated end-to-end in a Kind cluster with Konflux: verify-conforma produces VSA files in the trusted artifact, downstream attach-vsa task extracts and attaches them to container images

🤖 Generated with Claude Code

@qodo-code-review
Copy link
Contributor

Review Summary by Qodo

Add missing sourceDataArtifact parameter to trusted artifact task

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Add missing sourceDataArtifact parameter to trusted artifact task
• Fixes basename error when pushing trusted artifacts
• Properly sets sourceDataArtifact from previous task results
Diagram
flowchart LR
  A["Task Parameters"] -->|missing sourceDataArtifact| B["basename Error"]
  C["Previous Task Results"] -->|sourceDataArtifact.path| D["Task Execution"]
  B -->|fix applied| D
Loading

Grey Divider

File Changes

1. tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml 🐞 Bug fix +2/-0

Add sourceDataArtifact parameter to task configuration

• Added sourceDataArtifact parameter to task params section
• Parameter value references $(results.sourceDataArtifact.path) from previous task
• Resolves missing operand error in basename command execution

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@arewm arewm force-pushed the fix/ta-missing-basename branch from 8a8b30b to 728022f Compare February 17, 2026 19:32
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
acceptance 54.84% <ø> (-0.75%) ⬇️
generative 18.16% <ø> (-0.34%) ⬇️
integration 27.00% <ø> (-0.50%) ⬇️
unit 68.65% <ø> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@simonbaird
Copy link
Member

Patch looks reasonable. I don't think I understand the motivation though. What/where is /usr/local/bin/create-archive ?

What is a sourceDataArtifact in this context, and what are you doing with the VSA content?

@simonbaird
Copy link
Member

/ok-to-test

@simonbaird
Copy link
Member

I found we do have some test coverage for this task in features/ta_task_validate_image.feature. That said, it looks like the ENABLE_VSA code path might be untested. Consider adding some extra scenarios to that feature so we have some coverage.

@simonbaird
Copy link
Member

simonbaird commented Feb 17, 2026

What is a sourceDataArtifact in this context, and what are you doing with the VSA content?

I did some rftm, and I know what this is now. 😅 Is your plan to consume the VSA as a "trusted artifact" input in another task?

@arewm arewm marked this pull request as draft February 17, 2026 21:24
@arewm
Copy link
Contributor Author

arewm commented Feb 17, 2026

I am still working on some additional changes when testing locally. I moved this PR to draft until I finish working on it.

@simonbaird
Copy link
Member

I did a sanity check on the bash, seems good:

$ echo "zocal@/foo/bar" | grep -oE 'local@[^ ]+' | sed 's/^local@//' | head -n1
# ..nothing

$ echo "local@/foo/bar" | grep -oE 'local@[^ ]+' | sed 's/^local@//' | head -n1
/foo/bar

@arewm arewm changed the title fix: basename was missing when pushing a trusted artifact fix: VSA generation issues in verify-conforma-konflux-ta task Feb 17, 2026
arewm added a commit to arewm/slsa-konflux-example that referenced this pull request Feb 18, 2026
The upstream verify-conforma-konflux-ta task had several issues when
VSA generation is enabled. This local copy fixes them while an
upstream PR (conforma/cli#3118) is pending.

The ec CLI requires --attestation-output-dir to be under /tmp or cwd,
so VSA output is written to /tmp/vsa-output then copied to the workdir
for trusted artifact archival. Results use echo -n to avoid trailing
newlines that broke Tekton When Expression matching downstream. The
--vsa-upload flag is only passed for dsse format since the local
backend requires a signing key. The conforma JSON report is included
in the trusted artifact for downstream SLSA VSA generation.

The taskRef is hardcoded to this repo to bypass the ec-defaults
ConfigMap injection (see konflux-ci/konflux-ci#5375).

Assisted-by: Claude Code (Opus 4.6)
@arewm arewm force-pushed the fix/ta-missing-basename branch from 17339a9 to c4378d5 Compare February 28, 2026 02:10
@github-actions github-actions bot added size: M and removed size: XS labels Feb 28, 2026
@arewm arewm force-pushed the fix/ta-missing-basename branch 3 times, most recently from a9b567a to 63d3d42 Compare February 28, 2026 02:47
@arewm arewm marked this pull request as ready for review February 28, 2026 02:47
@qodo-code-review
Copy link
Contributor

Review Summary by Qodo

Fix VSA generation and archival in verify-conforma-konflux-ta task

🐞 Bug fix 🧪 Tests

Grey Divider

Walkthroughs

Description
• Fixed VSA generation bugs preventing file production and archival
  - ec CLI output path must be under /tmp or cwd, not /var/workdir
  - --vsa-upload only passed for dsse format (predicate doesn't need signing)
  - echo without -n flag breaks Tekton When Expression matching
• Fixed trusted artifact archival using correct extract directory parameter
  - workDir now uses $(params.TRUSTED_ARTIFACTS_EXTRACT_DIR) instead of hardcoded path
  - VSA files properly captured in archive root, not nested under conforma/ prefix
• Added report-json.json to VSA directory for downstream SLSA generation
• Added acceptance test scenario for ENABLE_VSA with predicate format
• Introduced taskResultShouldEqual step definition for targeted assertions
Diagram
flowchart LR
  A["VSA Generation Issues"] --> B["Fix ec CLI Path Constraints"]
  A --> C["Fix Format-Specific Logic"]
  A --> D["Fix Echo Newline Issue"]
  B --> E["Use /tmp for Output"]
  C --> F["--vsa-upload Only for DSSE"]
  D --> G["Use echo -n Flag"]
  E --> H["Copy to workDir After"]
  A --> I["Fix Archival Path"]
  I --> J["Use Extract Dir Parameter"]
  I --> K["Include report-json.json"]
  J --> L["Correct Archive Structure"]
  A --> M["Add Test Coverage"]
  M --> N["Predicate Format Scenario"]
  M --> O["Result Assertion Helper"]
Loading

Grey Divider

File Changes

1. acceptance/kubernetes/kubernetes.go 🧪 Tests +25/-0

Add targeted task result assertion helper

• Added new taskResultShouldEqual function for targeted result assertions
• Validates specific task result values against expected strings
• Registered step definition in AddStepsTo for BDD test scenarios

acceptance/kubernetes/kubernetes.go


2. docs/modules/ROOT/pages/verify-conforma-konflux-ta.adoc 📝 Documentation +1/-1

Update VSA_UPLOAD default path documentation

• Updated VSA_UPLOAD default path documentation
• Changed from local@/var/workdir/vsa to local@/var/workdir/conforma/vsa

docs/modules/ROOT/pages/verify-conforma-konflux-ta.adoc


3. features/ta_task_validate_image.feature 🧪 Tests +26/-0

Add VSA predicate format acceptance test scenario

• Added new scenario "VSA generation with predicate format"
• Tests ENABLE_VSA=true with ATTESTATION_FORMAT=predicate
• Validates VSA_GENERATED result equals "true"
• Includes snapshot matching for report-json step

features/ta_task_validate_image.feature


View more (1)
4. tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml 🐞 Bug fix +33/-5

Fix VSA generation, archival paths, and format-specific logic

• Fixed VSA_UPLOAD default parameter from /var/workdir/vsa to /var/workdir/conforma/vsa
• Extracted local path from VSA_UPLOAD parameter using grep and sed
• Added --vsa-upload flag only for dsse format (not predicate)
• Changed ec output directory to /tmp/vsa-output to comply with ec CLI constraints
• Fixed echo commands to use -n flag preventing trailing newlines in results
• Added post-ec copy logic to move VSA files from /tmp to workdir for archival
• Included report-json.json in VSA directory for downstream SLSA generation
• Fixed create-trusted-artifact workDir to use $(params.TRUSTED_ARTIFACTS_EXTRACT_DIR)
• Added sourceDataArtifact result parameter passing to create-trusted-artifact step

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 28, 2026

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Non-local VSA_UPLOAD fails step 🐞 Bug ⛯ Reliability
Description
With ENABLE_VSA=true, VSA_LOCAL_PATH is derived using a grep pipeline under set -euo pipefail.
If VSA_UPLOAD is not local@..., grep exits 1 and the entire validate step fails, even though
VSA_UPLOAD is documented generically as a destination.
Code

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[R325-328]

+          # Extract local path from VSA_UPLOAD for output directory
+          # VSA_UPLOAD format is "local@/path/to/dir"
+          VSA_LOCAL_PATH=$(echo "$(params.VSA_UPLOAD)" | grep -oE '^local@[^ ]+' | sed 's/^local@//' | head -n1)
+
Evidence
The validate step runs with set -euo pipefail, then uses grep to extract a local@ prefix.
Under these shell options, a non-matching grep (exit code 1) aborts the script. The docs do not
restrict VSA_UPLOAD to local@ values, so this is a real configuration path that will now crash the
task.

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[287-347]
docs/modules/ROOT/pages/verify-conforma-konflux-ta.adoc[92-99]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`VSA_LOCAL_PATH` is extracted with a `grep` pipeline while the script runs under `set -euo pipefail`. If `$(params.VSA_UPLOAD)` does not start with `local@`, `grep` exits 1 and the entire step fails.

### Issue Context
`VSA_UPLOAD` is documented as a generic destination, so non-`local@` values should not crash the task.

### Fix Focus Areas
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[321-328]
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[357-365]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. sourceDataArtifact result polluted 🐞 Bug ✓ Correctness
Description
The validate step writes a local filesystem directory path into the sourceDataArtifact Tekton
result file, even though this result is documented/used as a Trusted Artifact URI. If the
create-trusted-artifact step doesn’t run (e.g., ociStorage unset) or doesn’t overwrite it,
downstream pipelines will receive a local path instead of an artifact URI.
Code

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[R345-347]

+          if [[ -n "$VSA_LOCAL_PATH" ]]; then
+            echo "$VSA_LOCAL_PATH" > $(results.sourceDataArtifact.path)
          fi
Evidence
sourceDataArtifact is explicitly described as a Trusted Artifact URI and is shown in the README as
the value to feed into another task’s SOURCE_DATA_ARTIFACT parameter. The new VSA logic writes
VSA_LOCAL_PATH (a local dir path) into that result file. Additionally, create-trusted-artifact is
conditional on ociStorage being set, so there are valid runs where the result will remain the
local path and be exposed to consumers.

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[213-222]
tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[321-347]
tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[451-480]
tasks/verify-conforma-konflux-ta/0.1/README.md[51-64]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The validate step writes `VSA_LOCAL_PATH` (a local filesystem path) into `$(results.sourceDataArtifact.path)`, but `sourceDataArtifact` is documented/used as a Trusted Artifact URI result.

### Issue Context
`create-trusted-artifact` may not run when `ociStorage` is unset/empty. In that case, the result remains the local path and downstream tasks/pipelines consuming `$(tasks.&lt;task&gt;.results.sourceDataArtifact)` will receive an invalid value.

### Fix Focus Areas
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[345-347]
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[451-480]
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[357-366]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. VSA_UPLOAD default drifts 🐞 Bug ⛯ Reliability
Description
VSA_UPLOAD’s default is a hardcoded absolute path under /var/workdir, while the archive root is
configurable via TRUSTED_ARTIFACTS_EXTRACT_DIR. If TRUSTED_ARTIFACTS_EXTRACT_DIR is overridden but
VSA_UPLOAD isn’t, VSAs will be copied outside the archived directory and won’t be captured.
Code

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[R203-207]

    - name: VSA_UPLOAD
      type: string
      description: VSA upload destination
-      default: "local@/var/workdir/vsa"
+      default: "local@/var/workdir/conforma/vsa"
Evidence
The task exposes TRUSTED_ARTIFACTS_EXTRACT_DIR as a parameter and now archives that directory
(workDir). However VSA_UPLOAD’s default remains an absolute path independent of that parameter,
creating a silent footgun when users customize the extract dir.

tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[158-162]
tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[203-207]
tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[474-480]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The default `VSA_UPLOAD` path is hardcoded and can diverge from the configurable `TRUSTED_ARTIFACTS_EXTRACT_DIR`, causing VSA files to be written outside the directory that gets archived.

### Issue Context
`create-trusted-artifact` archives `$(params.TRUSTED_ARTIFACTS_EXTRACT_DIR)`. Any VSA output path outside it will not be included.

### Fix Focus Areas
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[203-207]
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[474-480]
- tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml[357-366]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@arewm
Copy link
Contributor Author

arewm commented Feb 28, 2026

@simonbaird, I have moved this out of draft. The content of this PR is ready for review again. I tested this task out in my own release pipeline on KinD. The content of that task should match the one in this PR.

@arewm arewm force-pushed the fix/ta-missing-basename branch 2 times, most recently from 86bcb21 to 15a0584 Compare March 3, 2026 18:37
@github-actions github-actions bot added size: L and removed size: M labels Mar 3, 2026
@arewm arewm force-pushed the fix/ta-missing-basename branch from 15a0584 to 37bdfdc Compare March 3, 2026 19:02
@github-actions github-actions bot added size: M and removed size: L labels Mar 3, 2026
@arewm arewm force-pushed the fix/ta-missing-basename branch from 37bdfdc to 6c9427d Compare March 3, 2026 19:51
@arewm
Copy link
Contributor Author

arewm commented Mar 3, 2026

@simonbaird, acceptance tests are now passing for this PR.

@simonbaird
Copy link
Member

/ok-to-test

@simonbaird
Copy link
Member

Lgtm. It's gonna conflict with #3158 PR, but I'll sort it out.

simonbaird
simonbaird previously approved these changes Mar 5, 2026
@simonbaird
Copy link
Member

Do you have a Jira open for this?

@arewm
Copy link
Contributor Author

arewm commented Mar 5, 2026

I don't, no. It was an issue that I was encountering from before. We previously enabled functionality to produce the VSA subject without the envelope. We never provided a way to get that content out.

@simonbaird
Copy link
Member

I know I approved already, but I was just reading one of Qodo's review comments and it seems like maybe a blocker? Wdyt?

…test coverage

The ENABLE_VSA code path had several bugs that together prevented VSA files
from being produced and archived correctly. The ec CLI rejects output paths
outside /tmp or cwd, --vsa-upload must only be passed for dsse format since
the local@ backend requires a signing key, and echo without -n writes a
trailing newline that breaks Tekton When Expression matching.

The trusted artifact archival was also broken: workDir was hardcoded to
/var/workdir rather than $(params.TRUSTED_ARTIFACTS_EXTRACT_DIR), so
downstream tasks would find the snapshot nested under a conforma/ prefix
instead of at the archive root. The VSA_UPLOAD default was similarly
misaligned, pointing outside the extract dir so VSA files were never
captured in the archive. The report-json.json is now also copied into the
VSA directory so downstream tasks can generate SLSA VSAs from the
Conforma evaluation report.

Adds an acceptance test scenario for ENABLE_VSA=true with predicate format,
a new taskResultShouldEqual step definition for targeted result assertions,
and updates the existing snapshot for the echo -n fix.

Assisted-by: Claude Code (Sonnet 4.6)
Signed-off-by: arewm <arewm@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

📝 Walkthrough

Walkthrough

Changes introduce new test infrastructure for validating task results, add a test scenario for VSA generation with predicate format attestation, update documentation and task configuration for VSA handling with refined directory paths, and modify result value typing in TaskInfo processing.

Changes

Cohort / File(s) Summary
Test Infrastructure
acceptance/kubernetes/kind/kubernetes.go, acceptance/kubernetes/kubernetes.go
Modified TaskInfo to wrap result values using paramValue() helper; added new test step helper taskResultShouldEqual() for comparing task result values against expected strings.
Task Configuration
tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml
Updated VSA_UPLOAD default path and added VSA output persistence logic; conditionally includes vsa-upload and vsa-signing-key steps when ENABLE_VSA and ATTESTATION_FORMAT are dsse; extracts VSA_LOCAL_PATH and copies output/report artifacts to local VSA directory; changed create-trusted-artifact workDir to use parameterized TRUSTED_ARTIFACTS_EXTRACT_DIR and added sourceDataArtifact parameter.
Documentation and Test Scenarios
docs/modules/ROOT/pages/verify-conforma-konflux-ta.adoc, features/ta_task_validate_image.feature
Updated VSA workspace default path in documentation; added new test scenario for VSA generation with predicate format attestation, mirroring existing VSA scenario with ATTESTATION_FORMAT set to "predicate".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: addressing VSA generation issues in the verify-conforma-konflux-ta task, which aligns with the core changes in the PR.
Description check ✅ Passed The description is comprehensively related to the changeset, detailing specific bugs fixed, test additions, and validation approach that directly correspond to the file changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml (1)

325-327: Consider extracting VSA_LOCAL_PATH once.

VSA_LOCAL_PATH is computed identically at lines 327 and 355. Since both usages are within the same script, you could compute it once after the ENABLE_VSA check and reuse it.

♻️ Suggested simplification
         # Add VSA arguments if enabled
         if [[ "$(params.ENABLE_VSA)" == "true" ]]; then
           EC_ARGS+=(--vsa --attestation-format=$(params.ATTESTATION_FORMAT))
 
           # Extract local path from VSA_UPLOAD for output directory
           # VSA_UPLOAD format is "local@/path/to/dir"
           VSA_LOCAL_PATH=$(echo "$(params.VSA_UPLOAD)" | grep -oE '^local@[^ ]+' | sed 's/^local@//' | head -n1 || true)
 
           if [[ "$(params.ATTESTATION_FORMAT)" == "dsse" ]]; then
             ...
           fi
 
           # ec requires --attestation-output-dir to be under /tmp or cwd.
           ...
           echo -n "true" > $(results.VSA_GENERATED.path)
         else
           echo -n "false" > $(results.VSA_GENERATED.path)
         fi
 
         # Execute EC with constructed arguments
         ec "${EC_ARGS[@]}"
 
         # Copy VSA output from /tmp to workdir for trusted artifact archival
         if [[ "$(params.ENABLE_VSA)" == "true" ]]; then
-          VSA_LOCAL_PATH=$(echo "$(params.VSA_UPLOAD)" | grep -oE '^local@[^ ]+' | sed 's/^local@//' | head -n1 || true)
+          # VSA_LOCAL_PATH already computed above
           if [[ -n "$VSA_LOCAL_PATH" && -d "/tmp/vsa-output" ]]; then

Also applies to: 354-361

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml` around
lines 325 - 327, The script computes VSA_LOCAL_PATH twice; extract and assign
VSA_LOCAL_PATH a single time after the ENABLE_VSA check and before any uses so
both later blocks reuse the same variable. Locate the two identical extraction
commands that set VSA_LOCAL_PATH and replace them with one assignment (using the
existing grep/sed pipeline) placed immediately after the ENABLE_VSA condition is
evaluated, then remove the duplicate extraction and reference the single
VSA_LOCAL_PATH variable in the sections that previously recomputed it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml`:
- Around line 325-327: The script computes VSA_LOCAL_PATH twice; extract and
assign VSA_LOCAL_PATH a single time after the ENABLE_VSA check and before any
uses so both later blocks reuse the same variable. Locate the two identical
extraction commands that set VSA_LOCAL_PATH and replace them with one assignment
(using the existing grep/sed pipeline) placed immediately after the ENABLE_VSA
condition is evaluated, then remove the duplicate extraction and reference the
single VSA_LOCAL_PATH variable in the sections that previously recomputed it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7c60d232-c646-44bd-ab61-f77e7ed0edff

📥 Commits

Reviewing files that changed from the base of the PR and between 170e6dd and 0057798.

⛔ Files ignored due to path filters (1)
  • features/__snapshots__/ta_task_validate_image.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • acceptance/kubernetes/kind/kubernetes.go
  • acceptance/kubernetes/kubernetes.go
  • docs/modules/ROOT/pages/verify-conforma-konflux-ta.adoc
  • features/ta_task_validate_image.feature
  • tasks/verify-conforma-konflux-ta/0.1/verify-conforma-konflux-ta.yaml

@simonbaird
Copy link
Member

/ok-to-test

@simonbaird
Copy link
Member

Let's merge.

@simonbaird simonbaird merged commit 1d37a50 into conforma:main Mar 5, 2026
16 checks passed
simonbaird added a commit to simonbaird/conforma-cli that referenced this pull request Mar 5, 2026
A fixup for conforma#3118.

Looks like we don't need it until later in the task, so remove the
initial place where it was being calculated but not used.

Also add a fixme descibing the problem what was mentioned by Qodo in
the conforma#3118 PR.
simonbaird added a commit to simonbaird/conforma-cli that referenced this pull request Mar 5, 2026
A fixup for conforma#3118.

Looks like we don't need it until later in the task, so remove the
initial place where it was being calculated but not used.

Also add a fixme descibing the problem what was mentioned by Qodo in
the conforma#3118 PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants