Skip to content

[DNM] Add roxctl-scan task to pull request pipeline - #3470

Draft
simonbaird wants to merge 2 commits into
conforma:mainfrom
simonbaird:roxctl-scan-test
Draft

[DNM] Add roxctl-scan task to pull request pipeline#3470
simonbaird wants to merge 2 commits into
conforma:mainfrom
simonbaird:roxctl-scan-test

Conversation

@simonbaird

@simonbaird simonbaird commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Add the roxctl-scan task to the cli-main-pull-request.yaml Tekton pipeline
  • The task runs after build-image-index and scans the built image using RHACS/Stackrox
  • Resolved via Tekton bundle at quay.io/konflux-ci/tekton-catalog/task-roxctl-scan:0.1 with pinned digest
  • Skipped when skip-checks is "true", consistent with other scan tasks

This is to experiment with the roxctl-scan report, hence the DNM.

🤖 Generated with Claude Code

The goal is to see if we can produce a roxctl-scan report, which
will be useful to test and debug the Jira.

We probably don't want to merge this, just want to trigger a build
and take a look at the pipeline run and the artifacts created.

https://redhat.atlassian.net/browse/EC-2060

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 45a3906b-3ee1-4d44-896f-fc29726e453e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The pull-request pipeline now runs a pinned roxctl-scan task after build-image-index. The task scans the built image by URL and digest when skip-checks is "false".

Changes

Pull-request image scanning

Layer / File(s) Summary
Add gated image scan
.tekton/cli-main-pull-request.yaml
Adds the roxctl-scan task after build-image-index. The task receives the built image URL and digest and runs only when checks are not skipped.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the addition of the roxctl-scan task to the pull request pipeline.
Description check ✅ Passed The description explains what and why, but it omits the template headings and an explicit Jira ticket link.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@simonbaird
simonbaird marked this pull request as draft August 6, 2026 15:31
@qodo-for-conforma

Copy link
Copy Markdown

PR Summary by Qodo

Add roxctl-scan task to PR Tekton pipeline

✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Add roxctl-scan to the PR Tekton pipeline to scan the newly built image index.
• Resolve the task via a pinned Tekton bundle digest for repeatable execution.
• Skip the scan when skip-checks is set to "true", matching existing scan behavior.
Diagram

graph TD
  A[".tekton/cli-main-pull-request.yaml"] --> B(["PR pipeline run"]) --> C["build-image-index"] -->|"when skip-checks=false"| D["roxctl-scan (bundle)"] --> E{{"RHACS/StackRox"}}
  C --> F[("Built image")]
  D --> G[("Scan report")]

  subgraph Legend
    direction LR
    _file["File"] ~~~ _pipe(["Pipeline"]) ~~~ _task["Task"] ~~~ _ext{{"External"}} ~~~ _art[("Artifact")]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Run scan as a `finally` task
  • ➕ Produces scan artifacts even if earlier non-scan tasks fail
  • ➕ Keeps scanning orthogonal to build ordering constraints
  • ➖ Might scan an incomplete/failed build output if build-image-index did not produce usable results
  • ➖ May complicate conditional execution semantics and expectations around gating
2. Use a single aggregated scanning stage (one task orchestrating multiple scanners)
  • ➕ Centralizes scan ordering/conditions and simplifies pipeline YAML
  • ➕ Easier to standardize artifact locations and reporting
  • ➖ Requires additional orchestration logic and maintenance
  • ➖ Reduces flexibility to enable/disable individual scan tasks independently

Recommendation: For a trial/DNM change, the current approach (a dedicated roxctl-scan task resolved from a pinned bundle and gated by skip-checks) is the most direct and least invasive way to validate RHACS/StackRox reporting artifacts. If this becomes permanent, consider whether scanning should move to a finally stage for better artifact reliability, or whether scan orchestration should be centralized to avoid pipeline sprawl.

Files changed (1) +22 / -0

Other (1) +22 / -0
cli-main-pull-request.yamlAdd roxctl-scan task after build-image-index with skip-checks gating +22/-0

Add roxctl-scan task after build-image-index with skip-checks gating

• Introduces a new 'roxctl-scan' task in the pull request pipeline that runs after 'build-image-index'. The task is resolved via a pinned Tekton bundle digest and is conditionally executed only when 'skip-checks' is "false".

.tekton/cli-main-pull-request.yaml

@qodo-for-conforma

Copy link
Copy Markdown

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

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 6, 2026

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 3:34 PM UTC · Ended 3:46 PM UTC
Commit: 87c4a29 · View workflow run →

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
acceptance 54.40% <ø> (ø)
generative 16.36% <ø> (ø)
integration 27.58% <ø> (ø)
unit 71.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@fullsend-ai-review

fullsend-ai-review Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review

Findings

Critical

  • [Supply Chain Integrity] .tekton/cli-main-pull-request.yaml:593 — The new roxctl-scan task uses a git resolver pointing to a personal GitHub repository (https://github.com/cuipinghuo/konflux-test-tasks) on a mutable feature branch (stoneintg-1755-fix-roxctl-oci-attach), whereas every other task in this pipeline (17 total) uses the bundles resolver with SHA256 digest-pinned references from quay.io/konflux-ci/tekton-catalog/. This introduces supply chain risks: (1) task definition fetched from a personal fork rather than an official catalog, (2) mutable branch reference that can be force-pushed or deleted, (3) weaker access controls on personal repo, (4) task executes in CI pipeline security context with access to secrets and workspaces. While the PR is draft/DNM, these risks are real if the PR is merged as-is or if someone copies this pattern.
    Remediation: Use the bundles resolver with a SHA256 digest-pinned reference from the official quay.io/konflux-ci/tekton-catalog/ registry. If the task is not yet available in the catalog, keep the PR blocked until published, or at minimum pin to a specific commit SHA in the git resolver rather than a branch name.

Medium

  • [Description-Diff Mismatch] .tekton/cli-main-pull-request.yaml:593 — The PR body claims the task is "Resolved via Tekton bundle at quay.io/konflux-ci/tekton-catalog/task-roxctl-scan:0.1 with pinned digest," but the actual diff uses resolver: git pointing to https://github.com/cuipinghuo/konflux-test-tasks on a feature branch. This mismatch could mislead reviewers into believing the task follows the established pinned-bundle pattern.
    Remediation: Update the PR description to accurately reflect that the implementation uses a git resolver to a personal fork, not a bundle resolver with pinned digest.

Low

  • [Missing Issue Link] .tekton/cli-main-pull-request.yaml — No issue is linked to this PR. While the PR is marked DNM and draft for experimentation, there is no tracked issue authorizing this pipeline change.
    Remediation: Link to a tracking issue documenting the intent to experiment with roxctl-scan.

Labels: Critical supply chain integrity finding — task references personal fork without digest pinning


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR
Previous run

Review

Findings

Low

  • [scope-consistency] .tekton/cli-main-pull-request.yaml — The roxctl-scan task is added only to the pull-request pipeline but not to the push pipeline (cli-main-push.yaml). Other scan tasks like clair-scan and rpms-signature-scan appear in both pipelines. This is acceptable for an experimental/draft PR but would be a gap if merged as-is.
    Remediation: If/when this moves beyond experimentation, add the corresponding roxctl-scan task to cli-main-push.yaml to maintain parity with the other scan tasks.

Labels: PR modifies Tekton CI pipeline configuration (.tekton/)

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment ci labels Aug 6, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 6, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:49 PM UTC · Completed 11:04 PM UTC
Commit: 87c4a29 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

taskRef:
params:
- name: url
value: https://github.com/cuipinghuo/konflux-test-tasks

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[critical] Supply Chain Integrity

The new roxctl-scan task uses a git resolver pointing to a personal GitHub repository (https://github.com/cuipinghuo/konflux-test-tasks) on a mutable feature branch (stoneintg-1755-fix-roxctl-oci-attach), whereas every other task in this pipeline (17 total) uses the bundles resolver with SHA256 digest-pinned references from quay.io/konflux-ci/tekton-catalog/. This introduces supply chain risks: (1) task definition fetched from a personal fork rather than an official catalog, (2) mutable branch reference that can be force-pushed or deleted, (3) weaker access controls on personal repo, (4) task executes in CI pipeline security context with access to secrets and workspaces. While the PR is draft/DNM, these risks are real if the PR is merged as-is or if someone copies this pattern.

Suggested fix: Use the bundles resolver with a SHA256 digest-pinned reference from the official quay.io/konflux-ci/tekton-catalog/ registry. If the task is not yet available in the catalog, keep the PR blocked until published, or at minimum pin to a specific commit SHA in the git resolver rather than a branch name.

taskRef:
params:
- name: url
value: https://github.com/cuipinghuo/konflux-test-tasks

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] Description-Diff Mismatch

The PR body claims the task is 'Resolved via Tekton bundle at quay.io/konflux-ci/tekton-catalog/task-roxctl-scan:0.1 with pinned digest', but the actual diff uses resolver: git pointing to https://github.com/cuipinghuo/konflux-test-tasks on a feature branch. This mismatch could mislead reviewers into believing the task follows the established pinned-bundle pattern.

Suggested fix: Update the PR description to accurately reflect that the implementation uses a git resolver to a personal fork, not a bundle resolver with pinned digest.

@fullsend-ai-review fullsend-ai-review Bot added Possible security concern and removed requires-manual-review Review requires human judgment labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant