Skip to content

Implement RFC 0020: PR-based chart sync workflows - #41

Open
fabikova wants to merge 1 commit into
Kuadrant:mainfrom
fabikova:feature/rfc-0020-chart-sync
Open

Implement RFC 0020: PR-based chart sync workflows#41
fabikova wants to merge 1 commit into
Kuadrant:mainfrom
fabikova:feature/rfc-0020-chart-sync

Conversation

@fabikova

@fabikova fabikova commented Jul 13, 2026

Copy link
Copy Markdown

This PR implements RFC 0020 to replace direct-push chart synchronization with a PR-based workflow that complies with branch protection rules and Red Hat's Segregation of Duties policy.

Addresses: #40RFC: Kuadrant/architecture#178

What Changed

Before (repository_dispatch):

  • Component releases → repository_dispatch event → Direct push to main
  • Bypassed branch protection rules
  • Silent failures when blocked
  • No audit trail or validation

After (PR-based):

  • Component releases → workflow_dispatch trigger → PR creation → CI validation → Manual/auto
    merge
  • Respects branch protection rules
  • Visible failures with clear error reporting
  • Complete audit trail via PR history
  • Automated validation before merge

Added Workflows

1. Chart Sync (.github/workflows/pr-chart-sync.yaml)

  • Trigger: Manual workflow_dispatch with chart URL, name, version
  • Function: Downloads chart package, updates Helm index, creates PR
  • Replaces: sync-chart-created.yaml

2. Chart Validation (.github/workflows/validate-chart-pr.yaml)

  • Trigger: Automatic on PRs modifying charts/
  • Function: Validates chart packages, Helm index consistency, metadata
  • Validates: Chart structure, name/version matching, duplicates, provenance

3. Chart Deletion (.github/workflows/pr-chart-delete.yaml)

  • Trigger: Manual workflow_dispatch with chart name, version
  • Function: Removes chart package, updates index, creates deletion PR
  • Replaces: sync-chart-deleted.yaml

Manual Testing via GitHub UI - example

  1. Go to ActionsPR Chart Sync workflow
  2. Click "Run workflow"
  3. Fill in the form:
    Browser download URL: https://github.com/Kuadrant/authorino-operator/releases/download/v0.26.0/chart-authorino-operator-0.26.0.tgz
    • Chart name: authorino-operator
    • Chart version: 0.26.0
    • Source component repository: authorino-operator

Auto-merge Setup (Optional)
For fully automated chart sync, enable auto-merge:

  1. Repository Settings
  • Go to Settings → General → Pull Requests
  • Enable ☑️ "Allow auto-merge"
  • Enable ☑️ "Allow squash merging"
  1. Branch Protection
  • Go to Settings → Branches → Add rule for main
  • Enable "Require status checks to pass before merging"
  • Enable "Require branches to be up to date before merging"
  • Add required status check: validate-chart-changes
  1. Workflow Behavior
  • With auto-merge: PR → CI validation → Automatic merge
  • Without auto-merge: PR → CI validation → Manual merge required

Complete Workflow Process

Chart Sync:

  1. Trigger workflow: Actions → PR Chart Sync → Fill parameters → Run workflow
  2. PR Creation: Workflow downloads chart, updates index, creates PR automatically
  3. Manual Security Approval: Click "Allow workflows to run" on the created PR
  4. Automatic Validation: CI runs comprehensive chart validation checks
  5. Auto-merge: PR merges automatically when validation passes
  6. Manual Cleanup: Delete branch sync/{chart}-{version} after successful merge

Chart Deletion:

  1. Trigger workflow: Actions → PR Chart Delete → Fill parameters → Run workflow
  2. PR Creation: Workflow removes chart, updates index, creates deletion PR
  3. Automatic Validation: CI runs consistency checks (no manual approval needed)
  4. Auto-merge: PR merges automatically when validation passes
  5. Manual Cleanup: Delete branch delete/{chart}-{version} after successful merge

Authentication

Uses GITHUB_TOKEN for workflow operations, which provides:

  • Repository access for file operations
  • Pull request creation and management
  • Auto-merge functionality

No additional PAT configuration required - GITHUB_TOKEN is automatically provided by GitHub Actions.

Validation

All chart sync PRs undergo automated validation:

  • Helm index consistency verification
  • Chart package integrity (tar.gz structure)
  • Metadata validation (name/version matching filename)
  • Duplicate chart detection
  • Provenance file validation

⚠️ Important Notes

  • Branch conflicts: If a branch sync/{chart}-{version} or delete/{chart}-{version} already exists, the workflow will fail with "non-fast-forward" error. Delete the existing branch first.
  • Chart URLs: Use the exact download URL from GitHub releases
  • Naming: Chart name should match the chart metadata in Chart.yaml

Addresses Adopt RFC 0020: Accept helm chart sync via PRs instead of direct pushes #40

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds manually triggered Helm chart synchronisation and deletion workflows that create pull requests, alongside pull-request validation for archives, provenance, indexes, duplicates, and synchronisation structure. Makefile support adds chart presence validation.

Changes

Helm chart automation

Layer / File(s) Summary
Chart synchronisation workflow
.github/workflows/pr-chart-sync.yaml
Downloads and validates a chart, updates the Helm index, and creates a pull request when changes are detected. Auto-merge remains disabled.
Chart deletion workflow
.github/workflows/pr-chart-delete.yaml
Checks for chart artefacts, removes them, refreshes the index, and creates a deletion pull request when changes are detected. Auto-merge remains disabled.
Chart validation and tooling
.github/workflows/validate-chart-pr.yaml, Makefile
Validates chart archives, provenance, indexes, duplicates, and synchronisation structure, with Makefile support for chart presence validation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant GitHubWorkflow
  participant HelmRepository
  participant PullRequest
  Operator->>GitHubWorkflow: dispatch chart synchronisation or deletion
  GitHubWorkflow->>HelmRepository: update chart package and index
  GitHubWorkflow->>GitHubWorkflow: validate changes
  GitHubWorkflow->>PullRequest: create pull request
Loading

Possibly related issues

  • Kuadrant/helm-charts issue 40 — The workflows and validation rules implement the issue’s chart synchronisation, deletion, and validation objectives.

Poem

A rabbit bounds through charts so bright,
Syncing packages left and right.
Deleted bundles leave no trace,
Indexes settle into place.
Pull requests hop into review,
Validation keeps them true.

🚥 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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarises the main change: adding PR-based chart sync workflows for RFC 0020.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

🧹 Nitpick comments (1)
.github/workflows/pr-chart-sync.yaml (1)

37-40: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Upgrade actions/setup-go to v6 in the chart workflows.

  • .github/workflows/pr-chart-sync.yaml
  • .github/workflows/pr-chart-delete.yaml
  • .github/workflows/validate-chart-pr.yaml
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-sync.yaml around lines 37 - 40, Upgrade the
setup-go action from v4 to v6 in the Go setup steps of
.github/workflows/pr-chart-sync.yaml (lines 37-40),
.github/workflows/pr-chart-delete.yaml (lines 32-35), and
.github/workflows/validate-chart-pr.yaml (lines 14-17), preserving the existing
Go 1.21.x version configuration.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-chart-sync.yaml:
- Around line 29-34: Centralize validation for dispatch-controlled chart
identifiers before any shell use: in .github/workflows/pr-chart-sync.yaml lines
29-34, validate chart, version, and download URL before deriving BRANCH_NAME or
executing commands; in .github/workflows/pr-chart-delete.yaml lines 25-29, apply
the same chart and version validation before checking or deleting files. Reuse
one shared validation mechanism rather than duplicating inconsistent checks.

In @.github/workflows/validate-chart-pr.yaml:
- Around line 24-27: Update the “Install yq” workflow step to download a
specific immutable yq release instead of the mutable latest URL, fetch the
corresponding published checksum, and verify the downloaded binary before moving
or installing it under /usr/local/bin with sudo. Ensure installation proceeds
only after checksum validation succeeds.
- Around line 118-127: Update the provenance check in the chart validation
workflow to use helm verify with the trusted keyring for each chart instead of
grepping for a PGP header. Make both missing provenance files and failed
cryptographic verification exit non-zero, while retaining a clear success
message only after verification succeeds.
- Around line 165-186: The workflow currently validates only chart-sync PR
structure; add a separate chart-delete validation step conditioned on the
chart-delete label. Using the changed-files deleted and modified file outputs,
require exactly one deleted .tgz archive, exactly one matching .tgz.prov file,
and exactly one modified index.yaml, failing with a clear validation message
otherwise.
- Around line 43-55: Update the index comparison in the workflow to remove the
generated timestamp using yq and compare the resulting YAML documents
structurally or in canonical YAML form. Replace the current grep-and-sort
process while preserving the existing inconsistency message, diff output, and
failure behavior.
- Around line 59-66: Update the “Validate chart packages” step to avoid
interpolating steps.changed-files.outputs.all_changed_files directly into shell
source. Pass the changed-file list through an environment variable or safely
decoded JSON array, then iterate over the resulting filenames while preserving
the existing .tgz and .tgz.prov filtering.

In `@Makefile`:
- Around line 68-76: Update the validate-chart target to inspect the located
chart archive with Helm, using helm show chart or equivalent to validate the
archive and verify its metadata name and version match CHART_NAME and
CHART_VERSION. Only print the success message and return successfully after
these checks pass; retain the existing missing-file failure behavior.
- Line 34: Correct the Helm download command in the Makefile’s helm target by
removing the spaces that split curl options and the download URL, while
preserving the existing HELM_VERSION, OS, and ARCH substitutions so make helm
can retrieve the archive.

---

Nitpick comments:
In @.github/workflows/pr-chart-sync.yaml:
- Around line 37-40: Upgrade the setup-go action from v4 to v6 in the Go setup
steps of .github/workflows/pr-chart-sync.yaml (lines 37-40),
.github/workflows/pr-chart-delete.yaml (lines 32-35), and
.github/workflows/validate-chart-pr.yaml (lines 14-17), preserving the existing
Go 1.21.x version configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: efd37523-9615-446e-ae6b-a9222f58186b

📥 Commits

Reviewing files that changed from the base of the PR and between c5177fc and c3e9c7a.

📒 Files selected for processing (4)
  • .github/workflows/pr-chart-delete.yaml
  • .github/workflows/pr-chart-sync.yaml
  • .github/workflows/validate-chart-pr.yaml
  • Makefile

Comment on lines +29 to +34
env:
BROWSER_DOWNLOAD_URL: ${{ github.event.inputs.browser_download_url }}
CHART_NAME: ${{ github.event.inputs.chart }}
CHART_VERSION: ${{ github.event.inputs.version }}
COMPONENT_REPO: ${{ github.event.inputs.component_repo }}
BRANCH_NAME: "sync/${{ github.event.inputs.chart }}-${{ github.event.inputs.version }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Centralise validation of dispatch-controlled chart identifiers.

Both privileged workflows derive shell commands, paths and branch names from unchecked dispatch inputs.

  • .github/workflows/pr-chart-sync.yaml#L29-L34: validate chart, version and download URL before any shell use.
  • .github/workflows/pr-chart-delete.yaml#L25-L29: apply the same chart/version validation before checking or deleting files.
📍 Affects 2 files
  • .github/workflows/pr-chart-sync.yaml#L29-L34 (this comment)
  • .github/workflows/pr-chart-delete.yaml#L25-L29
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-sync.yaml around lines 29 - 34, Centralize
validation for dispatch-controlled chart identifiers before any shell use: in
.github/workflows/pr-chart-sync.yaml lines 29-34, validate chart, version, and
download URL before deriving BRANCH_NAME or executing commands; in
.github/workflows/pr-chart-delete.yaml lines 25-29, apply the same chart and
version validation before checking or deleting files. Reuse one shared
validation mechanism rather than duplicating inconsistent checks.

Source: Linters/SAST tools

Comment on lines +24 to +27
- name: Install yq
run: |
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pin and verify the privileged yq download.

Downloading a mutable latest binary and installing it as root without checksum verification creates a supply-chain risk. Pin an immutable release and verify its published checksum before installation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 24 - 27, Update the
“Install yq” workflow step to download a specific immutable yq release instead
of the mutable latest URL, fetch the corresponding published checksum, and
verify the downloaded binary before moving or installing it under /usr/local/bin
with sudo. Ensure installation proceeds only after checksum validation succeeds.

Comment on lines +43 to +55
# Backup current index
cp charts/index.yaml charts/index.yaml.backup

# Regenerate index from chart packages
make helm-index

# Compare original and regenerated index (ignore generated timestamp)
if ! diff -u <(grep -v 'generated:' charts/index.yaml.backup | sort) <(grep -v 'generated:' charts/index.yaml | sort) > /tmp/index_diff.txt; then
echo "Helm index is inconsistent with chart packages"
echo "Index differences:"
cat /tmp/index_diff.txt
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Compare the index structurally rather than sorting YAML lines.

Sorting raw lines discards YAML hierarchy, so values moved between chart entries can still compare equal. Remove only the generated timestamp with yq, then compare the resulting structured documents or canonical YAML.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 43 - 55, Update the
index comparison in the workflow to remove the generated timestamp using yq and
compare the resulting YAML documents structurally or in canonical YAML form.
Replace the current grep-and-sort process while preserving the existing
inconsistency message, diff output, and failure behavior.

Comment on lines +59 to +66
- name: Validate chart packages
if: steps.changed-files.outputs.any_changed == 'true'
run: |
echo "Validating chart packages..."

# Find new/modified .tgz files
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ "$file" == *.tgz && "$file" != *.tgz.prov ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not interpolate PR-controlled filenames into shell source.

A changed filename containing shell syntax is inserted directly into the script at Line 65. Pass the action output through an environment variable or JSON output and iterate with a safely decoded array.

🧰 Tools
🪛 zizmor (1.26.1)

[info] 65-65: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 59 - 66, Update the
“Validate chart packages” step to avoid interpolating
steps.changed-files.outputs.all_changed_files directly into shell source. Pass
the changed-file list through an environment variable or safely decoded JSON
array, then iterate over the resulting filenames while preserving the existing
.tgz and .tgz.prov filtering.

Source: Linters/SAST tools

Comment on lines +118 to +127
# Check for corresponding provenance file
prov_file="${file}.prov"
if [[ -f "$prov_file" ]]; then
echo "Found provenance file: $prov_file"
if ! grep -q "BEGIN PGP SIGNED MESSAGE" "$prov_file"; then
echo "Provenance file appears invalid (no PGP signature found)"
fi
else
echo "No provenance file found for $file"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Fail unless provenance is present and cryptographically verified.

Searching for a PGP header does not validate the signature, and an invalid or missing provenance file only emits a message. Consequently, the workflow can pass while claiming provenance validation succeeded. Use helm verify with the trusted keyring and exit non-zero on failure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 118 - 127, Update the
provenance check in the chart validation workflow to use helm verify with the
trusted keyring for each chart instead of grepping for a PGP header. Make both
missing provenance files and failed cryptographic verification exit non-zero,
while retaining a clear success message only after verification succeeds.

Comment on lines +165 to +186
- name: Validate chart sync PR structure
if: contains(github.event.pull_request.labels.*.name, 'chart-sync')
run: |
echo "Validating chart sync PR structure..."

# For chart sync PRs, expect exactly one new chart and updated index
new_charts=$(echo "${{ steps.changed-files.outputs.added_files }}" | grep -c '\.tgz$' || true)
new_provs=$(echo "${{ steps.changed-files.outputs.added_files }}" | grep -c '\.tgz\.prov$' || true)
modified_index=$(echo "${{ steps.changed-files.outputs.modified_files }}" | grep -c 'index\.yaml$' || true)

echo "Changes detected:"
echo " - New chart packages: $new_charts"
echo " - New provenance files: $new_provs"
echo " - Modified index: $modified_index"

if [[ "$new_charts" -eq 1 && "$new_provs" -eq 1 && "$modified_index" -eq 1 ]]; then
echo "Chart sync PR structure is valid"
else
echo "Invalid chart sync PR structure"
echo " Expected: 1 chart, 1 provenance file, 1 index update"
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Add structural validation for chart-delete PRs.

Deletion PRs are auto-merged, but this workflow only constrains chart-sync changes. A labelled deletion PR can remove additional packages and still pass if the regenerated index is consistent. Require exactly one deleted archive, its provenance file, and one modified index.

🧰 Tools
🪛 zizmor (1.26.1)

[info] 171-171: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[info] 172-172: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[info] 173-173: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 165 - 186, The
workflow currently validates only chart-sync PR structure; add a separate
chart-delete validation step conditioned on the chart-delete label. Using the
changed-files deleted and modified file outputs, require exactly one deleted
.tgz archive, exactly one matching .tgz.prov file, and exactly one modified
index.yaml, failing with a clear validation message otherwise.

Comment thread Makefile Outdated
Comment thread Makefile Outdated
@fabikova
fabikova force-pushed the feature/rfc-0020-chart-sync branch 2 times, most recently from 4876c63 to 4b2d568 Compare July 13, 2026 14:23

@coderabbitai coderabbitai 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.

Actionable comments posted: 5

♻️ Duplicate comments (7)
.github/workflows/validate-chart-pr.yaml (5)

39-57: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Line-sort index comparison discards YAML structure — duplicate of prior finding.

Unchanged from the earlier review: sorting raw lines can mask real reordering-induced differences between chart entries.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 39 - 57, Update the
“Validate Helm index consistency” step to compare the backup and regenerated
index as parsed YAML structures rather than sorting raw lines. Continue ignoring
the generated timestamp, while preserving detection of meaningful chart-entry
additions, removals, or changes regardless of ordering.

59-66: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Unsafe interpolation of changed-file list into shell — duplicate of prior finding.

${{ steps.changed-files.outputs.all_changed_files }} is still interpolated directly into the for loop source at line 65, unchanged from the earlier review.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 59 - 66, Update the
“Validate chart packages” shell loop to avoid directly interpolating
steps.changed-files.outputs.all_changed_files into shell source. Pass the
changed-file list through a safe environment variable or file-based mechanism,
then iterate over it without allowing filenames to alter command parsing;
preserve the existing .tgz and .tgz.prov filtering.

118-127: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Provenance check only greps for a PGP header — duplicate of prior finding.

Still no cryptographic verification (helm verify); a missing/invalid provenance file only logs a message rather than failing the job.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 118 - 127, Update the
provenance validation block for each chart file to perform actual cryptographic
verification with Helm, using the chart and its corresponding .prov file,
instead of only grepping for a PGP header. Make missing provenance files and
failed verification exit the validation job with a nonzero status, while
retaining clear diagnostic messages.

24-27: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Unpinned, unverified yq binary install — duplicate of prior finding.

Downloading latest over wget and installing as root with no checksum verification is unchanged from the earlier review.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 24 - 27, Update the
“Install yq” workflow step to download a specific pinned yq release rather than
the mutable latest URL, and verify the downloaded binary against its published
checksum before installing it to /usr/local/bin/yq. Preserve executable
permissions while ensuring installation occurs only after checksum validation.

165-186: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

No structural validation for auto-merged chart-delete PRs — duplicate of prior finding.

Unchanged: only chart-sync-labelled PRs get structural constraints here; a chart-delete PR can still auto-merge with unexpected extra changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 165 - 186, Extend the
“Validate chart sync PR structure” workflow step to also validate PRs labeled
“chart-delete”, applying the appropriate structural constraints for deletion PRs
and rejecting unexpected extra changes before auto-merge. Preserve the existing
chart-sync validation behavior and use the existing changed-files outputs for
the checks.
Makefile (1)

67-76: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

validate-chart only checks the archive exists, not that it's valid or matches its filename — duplicate of prior finding.

Unchanged from the earlier review: a corrupt .tgz, or one whose Chart.yaml name/version disagrees with $(CHART_NAME)-$(CHART_VERSION), still prints a success message. This target is the CI gate pr-chart-sync.yaml relies on before auto-merge, so the gap has real downstream impact.

Note also that $(CHART_NAME)/$(CHART_VERSION) are textually expanded into the recipe by Make itself (same injection surface as the workflow-level ${{ }} issue) — validating the input format upstream in the calling workflow covers this too.

♻️ Proposed direction
 validate-chart: $(HELM) ## Validate a specific chart package
 	`@echo` "Validating chart $(CHART_NAME)-$(CHART_VERSION)..."
 	`@chart_file`="./charts/$(CHART_NAME)-$(CHART_VERSION).tgz"; \
 	if [[ ! -f "$$chart_file" ]]; then \
 		echo "Chart file not found: $$chart_file"; \
 		exit 1; \
-	fi; \
-	echo "✓ Chart file exists: $$chart_file"
+	fi; \
+	name=$$($(HELM) show chart "$$chart_file" | yq eval '.name' -); \
+	version=$$($(HELM) show chart "$$chart_file" | yq eval '.version' -); \
+	if [[ "$$name" != "$(CHART_NAME)" || "$$version" != "$(CHART_VERSION)" ]]; then \
+		echo "Chart metadata mismatch: got $$name-$$version"; \
+		exit 1; \
+	fi; \
+	echo "✓ Chart file valid: $$chart_file"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 67 - 76, Extend the validate-chart target beyond the
existence check: validate that the archive is a readable Helm chart and inspect
its Chart.yaml metadata, requiring its name and version to match CHART_NAME and
CHART_VERSION before printing success. Preserve the existing missing-file
failure behavior and ensure validation failures exit nonzero so
pr-chart-sync.yaml cannot proceed with corrupt or mismatched archives.
.github/workflows/pr-chart-sync.yaml (1)

29-34: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Unvalidated dispatch inputs (including browser_download_url) interpolated via ${{ }} throughout the job — duplicate of prior finding.

Same root cause as flagged previously on this exact range: CHART_NAME, CHART_VERSION, BROWSER_DOWNLOAD_URL are unchecked workflow_dispatch strings, and every run: step below (51, 57-59, 68-69, 86-91, 96, 104-116, 131, 141, 147-148, 154) re-expands them with ${{ env.X }}, which is literal text substitution vulnerable to injection under the privileged KUADRANT_DEV_PAT.

browser_download_url specifically adds an SSRF angle: it's passed unchecked to make get-chart, which fetches it — an attacker with dispatch access could point this at an internal/arbitrary endpoint. Validate the URL against an allow-listed host (e.g. github.com/objects.githubusercontent.com) and the chart/version charset before use, and switch run: steps to reference $CHART_NAME/$CHART_VERSION/$BROWSER_DOWNLOAD_URL instead of ${{ env.X }}.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-sync.yaml around lines 29 - 34, Validate
workflow_dispatch values before they reach the job: restrict CHART_NAME and
CHART_VERSION to the permitted charset, and validate BROWSER_DOWNLOAD_URL as an
HTTPS URL whose host is allow-listed to trusted GitHub download domains. In
every run step using these values, reference the shell environment variables
$CHART_NAME, $CHART_VERSION, and $BROWSER_DOWNLOAD_URL rather than re-expanding
env.X through GitHub expression interpolation, while preserving the existing
sync flow and KUADRANT_DEV_PAT usage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-chart-delete.yaml:
- Around line 25-29: Validate the workflow_dispatch values before any shell
command uses them, restricting chart, version, and component_repo to the
required safe character set and failing on invalid input. In all downstream run
steps, including the path construction and git/registry commands, replace `${{
env.CHART_NAME }}`, `${{ env.CHART_VERSION }}`, `${{ env.COMPONENT_REPO }}`, and
related interpolations with the already-exported shell variables `$CHART_NAME`,
`$CHART_VERSION`, and `$COMPONENT_REPO`; keep BRANCH_NAME similarly
shell-expanded.
- Around line 115-153: Add a step before the “Create Pull Request” step to
ensure the chart-delete and automated labels exist in the repository, using the
workflow’s GH_TOKEN authentication and creating only missing labels. Keep the
existing gh pr create invocation and label assignments unchanged.

In @.github/workflows/pr-chart-sync.yaml:
- Line 1: Add the missing chart-sync, chart-delete, and automated labels before
the PR creation steps in both workflows, pr-chart-sync.yaml and
pr-chart-delete.yaml. Ensure each workflow creates or verifies these labels
before invoking gh pr create so label assignment succeeds.

In @.github/workflows/validate-chart-pr.yaml:
- Line 195: Update the chart validation PR comment text so the Markdown heading
in the workflow uses a space after the ## prefix, changing “##Chart Validation
Passed” to a properly formatted H2 while preserving the heading text.
- Around line 29-33: Update the tj-actions/changed-files reference in the “Get
changed files” workflow step from the mutable `@v41` tag to a full immutable
commit SHA, using the intended trusted release commit while preserving the
existing files: charts/** configuration.

---

Duplicate comments:
In @.github/workflows/pr-chart-sync.yaml:
- Around line 29-34: Validate workflow_dispatch values before they reach the
job: restrict CHART_NAME and CHART_VERSION to the permitted charset, and
validate BROWSER_DOWNLOAD_URL as an HTTPS URL whose host is allow-listed to
trusted GitHub download domains. In every run step using these values, reference
the shell environment variables $CHART_NAME, $CHART_VERSION, and
$BROWSER_DOWNLOAD_URL rather than re-expanding env.X through GitHub expression
interpolation, while preserving the existing sync flow and KUADRANT_DEV_PAT
usage.

In @.github/workflows/validate-chart-pr.yaml:
- Around line 39-57: Update the “Validate Helm index consistency” step to
compare the backup and regenerated index as parsed YAML structures rather than
sorting raw lines. Continue ignoring the generated timestamp, while preserving
detection of meaningful chart-entry additions, removals, or changes regardless
of ordering.
- Around line 59-66: Update the “Validate chart packages” shell loop to avoid
directly interpolating steps.changed-files.outputs.all_changed_files into shell
source. Pass the changed-file list through a safe environment variable or
file-based mechanism, then iterate over it without allowing filenames to alter
command parsing; preserve the existing .tgz and .tgz.prov filtering.
- Around line 118-127: Update the provenance validation block for each chart
file to perform actual cryptographic verification with Helm, using the chart and
its corresponding .prov file, instead of only grepping for a PGP header. Make
missing provenance files and failed verification exit the validation job with a
nonzero status, while retaining clear diagnostic messages.
- Around line 24-27: Update the “Install yq” workflow step to download a
specific pinned yq release rather than the mutable latest URL, and verify the
downloaded binary against its published checksum before installing it to
/usr/local/bin/yq. Preserve executable permissions while ensuring installation
occurs only after checksum validation.
- Around line 165-186: Extend the “Validate chart sync PR structure” workflow
step to also validate PRs labeled “chart-delete”, applying the appropriate
structural constraints for deletion PRs and rejecting unexpected extra changes
before auto-merge. Preserve the existing chart-sync validation behavior and use
the existing changed-files outputs for the checks.

In `@Makefile`:
- Around line 67-76: Extend the validate-chart target beyond the existence
check: validate that the archive is a readable Helm chart and inspect its
Chart.yaml metadata, requiring its name and version to match CHART_NAME and
CHART_VERSION before printing success. Preserve the existing missing-file
failure behavior and ensure validation failures exit nonzero so
pr-chart-sync.yaml cannot proceed with corrupt or mismatched archives.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f8befd41-3cec-4344-b8a5-c6f31aeafde9

📥 Commits

Reviewing files that changed from the base of the PR and between c3e9c7a and 4b2d568.

📒 Files selected for processing (4)
  • .github/workflows/pr-chart-delete.yaml
  • .github/workflows/pr-chart-sync.yaml
  • .github/workflows/validate-chart-pr.yaml
  • Makefile

Comment on lines +25 to +29
env:
CHART_NAME: ${{ github.event.inputs.chart }}
CHART_VERSION: ${{ github.event.inputs.version }}
COMPONENT_REPO: ${{ github.event.inputs.component_repo }}
BRANCH_NAME: "delete/${{ github.event.inputs.chart }}-${{ github.event.inputs.version }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Unvalidated dispatch inputs still interpolated via ${{ }} throughout the job — duplicate of prior finding.

CHART_NAME/CHART_VERSION/COMPONENT_REPO come straight from workflow_dispatch inputs with no format check, and every downstream run: step (lines 45, 50-51, 73-74, 101-108, 121-132, 150, 160, 166-167, 173, 180) re-expands them via ${{ env.X }} rather than reading the already-exported shell variable. GitHub performs literal text substitution for ${{ }} before the shell parses the script, so a value containing a quote/backtick can inject arbitrary commands that run with the privileged KUADRANT_DEV_PAT. It also enables path traversal (e.g. CHART_NAME=../../secret) into the charts/$CHART_NAME-$CHART_VERSION.tgz path built at line 50.

Add a validation step (regex-check chart/version for a safe charset) before any shell use, and switch the run: steps to reference $CHART_NAME, $CHART_VERSION, etc. (they're already exported via env:) instead of ${{ env.X }}.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 25 - 29, Validate the
workflow_dispatch values before any shell command uses them, restricting chart,
version, and component_repo to the required safe character set and failing on
invalid input. In all downstream run steps, including the path construction and
git/registry commands, replace `${{ env.CHART_NAME }}`, `${{ env.CHART_VERSION
}}`, `${{ env.COMPONENT_REPO }}`, and related interpolations with the
already-exported shell variables `$CHART_NAME`, `$CHART_VERSION`, and
`$COMPONENT_REPO`; keep BRANCH_NAME similarly shell-expanded.

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
Comment on lines +115 to +153
- name: Create Pull Request
if: steps.chart-check.outputs.chart_exists == 'true' && steps.changes.outputs.has_changes == 'true'
env:
GH_TOKEN: ${{ secrets.KUADRANT_DEV_PAT }}
run: |
gh pr create \
--title "Remove chart: ${{ env.CHART_NAME }} v${{ env.CHART_VERSION }}" \
--body "$(cat <<EOF
## Chart Deletion

This PR removes a chart package from the repository.

- **Chart**: ${{ env.CHART_NAME }}
- **Version**: ${{ env.CHART_VERSION }}
- **Source Repository**: ${{ env.COMPONENT_REPO }}

### Changes
- Removed chart package: \`${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz\`
- Removed provenance file: \`${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz.prov\`
- Updated Helm repository index

### Validation
This PR will be validated by CI to ensure:
- Helm index consistency after deletion
- No broken references remain
- Deletion is clean and complete

### Warning
This action will permanently remove the chart from the public repository.
Ensure this deletion is intentional and authorized.

---
*This PR was created automatically by the chart deletion workflow.*
EOF
)" \
--head "${{ env.BRANCH_NAME }}" \
--base main \
--label "chart-delete" \
--label "automated"

Copy link
Copy Markdown

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
gh label list --repo "$(gh repo view --json nameWithOwner -q .nameWithOwner)" | grep -iE 'chart-delete|automated'

Repository: Kuadrant/helm-charts

Length of output: 158


Create the PR labels before this step
gh pr create --label fails if chart-delete or automated do not already exist in the repository. Add a label-creation step, or ensure these labels are provisioned elsewhere, before this workflow reaches PR creation.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 121-121: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 121-121: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 127-127: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 128-128: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 129-129: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 132-132: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 132-132: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 132-132: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 132-132: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 150-150: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 115 - 153, Add a step
before the “Create Pull Request” step to ensure the chart-delete and automated
labels exist in the repository, using the workflow’s GH_TOKEN authentication and
creating only missing labels. Keep the existing gh pr create invocation and
label assignments unchanged.

@@ -0,0 +1,155 @@
name: PR Chart Sync

Copy link
Copy Markdown

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
gh label list --repo "$(gh repo view --json nameWithOwner -q .nameWithOwner)" | grep -iE 'chart-sync|chart-delete|automated'

Repository: Kuadrant/helm-charts

Length of output: 158


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- workflow label usage ---\n'
grep -nE 'chart-sync|chart-delete|automated|gh pr create|--label' .github/workflows/pr-chart-sync.yaml .github/workflows/pr-chart-delete.yaml || true

printf '\n--- label definitions in repo files ---\n'
rg -n --hidden --glob '!.git' --glob '!node_modules' --glob '!dist' --glob '!build' '^(chart-sync|chart-delete|automated)$|name:\s*(chart-sync|chart-delete|automated)\b|labels:' .

Repository: Kuadrant/helm-charts

Length of output: 249


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- relevant workflow lines ---'
sed -n '90,145p' .github/workflows/pr-chart-sync.yaml
printf '\n'
sed -n '108,165p' .github/workflows/pr-chart-delete.yaml

echo '\n--- repo label definitions ---'
fd -a -t f -I 'labels.*' .
rg -n --hidden --glob '!.git' --glob '!node_modules' --glob '!dist' --glob '!build' 'chart-sync|chart-delete|automated' .

Repository: Kuadrant/helm-charts

Length of output: 5154


Add the missing PR labels gh pr create --label requires pre-existing labels. chart-sync, chart-delete, and automated are not defined, so both workflows will fail at PR creation.

  • pr-chart-sync.yaml#L98-L134
  • pr-chart-delete.yaml#L115-L153
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-sync.yaml at line 1, Add the missing chart-sync,
chart-delete, and automated labels before the PR creation steps in both
workflows, pr-chart-sync.yaml and pr-chart-delete.yaml. Ensure each workflow
creates or verifies these labels before invoking gh pr create so label
assignment succeeds.

Comment on lines +29 to +33
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: charts/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
[skip_cloning]
# Confirm current recommended/patched version and whether SHA-pinning guidance applies

Repository: Kuadrant/helm-charts

Length of output: 210


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow using the action
sed -n '1,120p' .github/workflows/validate-chart-pr.yaml

# Check whether this repository already pins similar actions by SHA
rg -n "uses: .+@v|uses: .+@[0-9a-f]{7,}" .github/workflows .github -g '!**/*.md'

# Look for any local notes about workflow security or action pinning
rg -n "changed-files|pin.*SHA|supply chain|CVE-2025-30066|dorny/paths-filter" .

Repository: Kuadrant/helm-charts

Length of output: 6632


🌐 Web query:

tj-actions/changed-files March 2025 CVE-2025-30066 GitHub Actions SHA pinning recommendation

💡 Result:

CVE-2025-30066 was a supply chain attack that occurred on March 14–15, 2025, involving the popular GitHub Action tj-actions/changed-files [1][2]. During this incident, threat actors compromised the repository and retroactively modified existing version tags (v1 through v45.0.7) to point to a malicious commit (0e58ed8) [1][2][3]. This malicious code was designed to exfiltrate CI/CD secrets by printing them into GitHub Actions logs [1][4]. The core issue exploited was the mutable nature of Git tags, which allow a tag to be updated to reference different commit SHAs over time [5][6]. Because many users reference GitHub Actions by version tags (e.g., @v45), their workflows automatically pulled the compromised code without the users' knowledge [6]. To mitigate this risk and prevent similar supply chain attacks, the primary recommendation is to pin all third-party GitHub Actions to a full, immutable 40-character commit SHA [5][6][7]. Pinning to a commit SHA provides the following security benefits: * Immutability: Unlike a tag, a commit SHA is content-addressed and cannot be silently repointed by an attacker [5]. Once you have audited and pinned a specific SHA, your workflow will continue to use that exact version regardless of future modifications to the repository's tags [5][6]. * Operational Security: If an action repository is compromised, your workflows will remain on the last known-good SHA you pinned, protecting you from malicious updates pushed by attackers [5][6]. To manage the maintenance burden of SHA pinning, security experts and GitHub documentation recommend using automation tools like Dependabot or Renovate [8][5][6]. These tools can automatically keep your pinned SHAs updated by opening pull requests when new, legitimate releases are published, allowing you to review the changes before merging [5][6]. Furthermore, GitHub now provides policy features at the organization and enterprise level to enforce SHA pinning, ensuring that all workflows meet these security requirements [8].

Citations:


Pin tj-actions/changed-files to a full commit SHA. @v41 is mutable, and this action has a documented 2025 supply-chain compromise history; using an immutable SHA avoids a repeat of that attack pattern.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 29 - 33, Update the
tj-actions/changed-files reference in the “Get changed files” workflow step from
the mutable `@v41` tag to a full immutable commit SHA, using the intended trusted
release commit while preserving the existing files: charts/** configuration.

Comment thread .github/workflows/validate-chart-pr.yaml
@fabikova
fabikova force-pushed the feature/rfc-0020-chart-sync branch 2 times, most recently from 297e829 to 4493f68 Compare July 14, 2026 10:02

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/pr-chart-delete.yaml (2)

159-161: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Simplify auto-merge by targeting the branch directly.

The GitHub CLI allows merging a PR by referencing its head branch directly. This eliminates the need for an additional API call to look up the PR number, and prevents potential race conditions if the GitHub search index delays making the newly created PR immediately available.

  • .github/workflows/pr-chart-delete.yaml#L159-L161: simplify to gh pr merge "${{ env.BRANCH_NAME }}" --auto --squash.
  • .github/workflows/pr-chart-sync.yaml#L138-L140: simplify to gh pr merge "${{ env.BRANCH_NAME }}" --auto --squash.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 159 - 161, Update the
auto-merge steps in .github/workflows/pr-chart-delete.yaml lines 159-161 and
.github/workflows/pr-chart-sync.yaml lines 138-140 to pass "${{ env.BRANCH_NAME
}}" directly to gh pr merge with --auto --squash; remove the gh pr list lookup
and PR_NUMBER variable at both sites.

32-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update actions/setup-go to avoid deprecated runners.

Version v4 of actions/setup-go runs on Node 16, which is deprecated by GitHub Actions and will cause workflow warnings or eventual failures. Update to v5, which uses Node 20.

  • .github/workflows/pr-chart-delete.yaml#L32-L33: change to actions/setup-go@v5.
  • .github/workflows/pr-chart-sync.yaml#L37-L38: change to actions/setup-go@v5.
  • .github/workflows/validate-chart-pr.yaml#L14-L15: change to actions/setup-go@v5.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 32 - 33, Update the
actions/setup-go reference from v4 to v5 in
.github/workflows/pr-chart-delete.yaml lines 32-33,
.github/workflows/pr-chart-sync.yaml lines 37-38, and
.github/workflows/validate-chart-pr.yaml lines 14-15; leave the surrounding
workflow configuration unchanged.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-chart-delete.yaml:
- Around line 37-38: Replace the nonexistent actions/checkout@v6 reference with
actions/checkout@v4 in the Checkout steps of
.github/workflows/pr-chart-delete.yaml (lines 37-38),
.github/workflows/pr-chart-sync.yaml (lines 43-44), and
.github/workflows/validate-chart-pr.yaml (lines 19-20).

In @.github/workflows/validate-chart-pr.yaml:
- Around line 171-173: Update the added_files and modified_files counting
commands for new_charts, new_provs, and modified_index to translate the
space-separated file lists into newline-separated entries before applying grep
-c, so each matching filename is counted individually.

---

Nitpick comments:
In @.github/workflows/pr-chart-delete.yaml:
- Around line 159-161: Update the auto-merge steps in
.github/workflows/pr-chart-delete.yaml lines 159-161 and
.github/workflows/pr-chart-sync.yaml lines 138-140 to pass "${{ env.BRANCH_NAME
}}" directly to gh pr merge with --auto --squash; remove the gh pr list lookup
and PR_NUMBER variable at both sites.
- Around line 32-33: Update the actions/setup-go reference from v4 to v5 in
.github/workflows/pr-chart-delete.yaml lines 32-33,
.github/workflows/pr-chart-sync.yaml lines 37-38, and
.github/workflows/validate-chart-pr.yaml lines 14-15; leave the surrounding
workflow configuration unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79bd9f4f-82cd-4fcb-a035-a45beced6b82

📥 Commits

Reviewing files that changed from the base of the PR and between 4b2d568 and 4493f68.

📒 Files selected for processing (4)
  • .github/workflows/pr-chart-delete.yaml
  • .github/workflows/pr-chart-sync.yaml
  • .github/workflows/validate-chart-pr.yaml
  • Makefile

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
Comment on lines +37 to +38
- name: Checkout
uses: actions/checkout@v6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Downgrade actions/checkout to a valid version.

The actions/checkout@v6 action does not exist (the latest major version is v4). Specifying a non-existent version will cause the workflow to fail immediately upon initialization.

  • .github/workflows/pr-chart-delete.yaml#L37-L38: change to actions/checkout@v4.
  • .github/workflows/pr-chart-sync.yaml#L43-L44: change to actions/checkout@v4.
  • .github/workflows/validate-chart-pr.yaml#L19-L20: change to actions/checkout@v4.
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 37-41: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 3 files
  • .github/workflows/pr-chart-delete.yaml#L37-L38 (this comment)
  • .github/workflows/pr-chart-sync.yaml#L43-L44
  • .github/workflows/validate-chart-pr.yaml#L19-L20
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 37 - 38, Replace the
nonexistent actions/checkout@v6 reference with actions/checkout@v4 in the
Checkout steps of .github/workflows/pr-chart-delete.yaml (lines 37-38),
.github/workflows/pr-chart-sync.yaml (lines 43-44), and
.github/workflows/validate-chart-pr.yaml (lines 19-20).

Comment thread .github/workflows/validate-chart-pr.yaml
@fabikova
fabikova force-pushed the feature/rfc-0020-chart-sync branch from 4493f68 to 020d447 Compare July 14, 2026 11:04

@coderabbitai coderabbitai 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.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-chart-delete.yaml:
- Around line 47-66: The chart-check step currently detects only the archive, so
deletion is skipped when provenance or index artefacts remain. Update the chart
existence logic in the “Check if chart exists” step to detect the chart archive,
its .prov file, and the corresponding index.yaml entry, setting
chart_exists=true and preserving the deletion/regeneration path when any
artefact exists.
- Around line 32-35: Upgrade the actions/setup-go reference from v4 to v6 in
every affected workflow: .github/workflows/pr-chart-delete.yaml lines 32-35,
.github/workflows/validate-chart-pr.yaml lines 14-17,
.github/workflows/sync-chart-created.yaml lines 33,
.github/workflows/sync-chart-deleted.yaml lines 28, and
.github/workflows/pr-chart-sync.yaml lines 38. Preserve the existing Go version
configuration.

In @.github/workflows/pr-chart-sync.yaml:
- Around line 37-41: Update the setup-go step in the PR chart sync workflow from
actions/setup-go@v4 to actions/setup-go@v6, preserving the existing Go version
and step configuration.

In @.github/workflows/validate-chart-pr.yaml:
- Around line 3-6: The workflow currently executes PR-controlled Makefile
targets with persisted checkout credentials and mixes validation with write
access. Update the checkout steps in the chart validation jobs to set
persist-credentials to false, and split PR commenting into a separate job with
the required write permission while keeping validation jobs read-only.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 57818307-a645-47b3-9b0b-4369e810fa55

📥 Commits

Reviewing files that changed from the base of the PR and between 4493f68 and 020d447.

📒 Files selected for processing (4)
  • .github/workflows/pr-chart-delete.yaml
  • .github/workflows/pr-chart-sync.yaml
  • .github/workflows/validate-chart-pr.yaml
  • Makefile

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
Comment on lines +32 to +35
- name: Set up Go 1.21.x
uses: actions/setup-go@v4
with:
go-version: 1.21.x

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== setup-go usages ==\n'
rg -n "actions/setup-go@" .github/workflows || true

printf '\n== pr-chart-delete.yaml ==\n'
sed -n '1,120p' .github/workflows/pr-chart-delete.yaml

printf '\n== validate-chart-pr.yaml ==\n'
sed -n '1,120p' .github/workflows/validate-chart-pr.yaml

Repository: Kuadrant/helm-charts

Length of output: 8911


🌐 Web query:

actions/setup-go v4 node runtime v6 node24 release note supported current runners actionlint

💡 Result:

The actions/setup-go action has transitioned to using Node.js 24 as its runtime in its latest major version, v6 [1][2]. Key details regarding this update and related requirements: 1. Node 24 Requirement: The v6 edition of actions/setup-go utilizes Node.js 24 [1][2]. This upgrade required changes to the action's codebase, including stricter type checking [3]. The action's action.yml file has been updated to specify node24 to ensure correct execution [4]. 2. Runner Compatibility: To support the Node.js 24 runtime, your GitHub Actions runner must be version v2.327.1 or later [5][1]. Using an older runner version that does not support Node.js 24 will result in compatibility issues [1][2]. 3. v4 vs. v6: The v4 version of actions/setup-go, which preceded v6, operated on older Node.js runtimes (such as node16 or node20, depending on the specific v4 release/patch) [6][1]. If you are currently using v4 and wish to leverage the latest improvements and Node.js 24 runtime, you must upgrade to the v6 major release [1][2]. 4. Actionlint: While actionlint is a static analysis tool for GitHub Actions workflow files, it generally tracks updates to the platform. Ensure your local version of actionlint is up-to-date to correctly validate workflows that specify newer action versions or utilize modern features like node24 runtimes. For official details, refer to the actions/setup-go repository README and release notes [7][1].

Citations:


🌐 Web query:

actions/setup-go v4 runtime node16 node20 node24 supported versions release notes

💡 Result:

The actions/setup-go action has transitioned through several Node.js runtime versions as it has evolved, with specific major versions tied to these upgrades: - actions/setup-go v5: Upgraded the runtime from Node 16 to Node 20 [1]. - actions/setup-go v6: Upgraded the runtime from Node 20 to Node 24 [2]. When using v6, it is required that your GitHub Actions runner is on version v2.327.1 or later to ensure compatibility [3][2]. The action does not support Node 16 in its current versions, as that runtime has reached its end of life and was removed in favor of newer Node.js versions [4][1].

Citations:


🌐 Web query:

site:github.com/actions/setup-go/releases v6 node24 setup-go v4 node20

💡 Result:

The actions/setup-go GitHub Action transitioned its underlying Node.js runtime from Node.js 20 to Node.js 24 with the release of version 6.0.0 [1][2]. Key details regarding these runtime updates include: - Version 6.0.0: Upgraded the Node.js runtime from version 20 to version 24 [1]. To ensure compatibility with this release, users must be running GitHub Actions runner version 2.327.1 or later [1][2]. - Version 5.0.0: Prior to this, the action upgraded its runtime from Node.js 16 to Node.js 20 [3]. These changes are part of the maintenance of the setup-go action to ensure compatibility with modern Node.js environments [1][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== actionlint references ==\n'
rg -n "actionlint|setup-go@v|setup-go" .github . || true

printf '\n== workflow runner images ==\n'
rg -n "runs-on:" .github/workflows || true

Repository: Kuadrant/helm-charts

Length of output: 1080


🌐 Web query:

actions/setup-go v4 node16 deprecation runner support current releases supported

💡 Result:

As of July 14, 2026, actions/setup-go v4 is considered deprecated because it relies on the Node.js 16 runtime, which reached its end-of-life on GitHub Actions runners on November 12, 2024 [1][2]. Key points regarding runner support and action versions: 1. Node.js 16 Deprecation: Node.js 16 has been fully removed from GitHub Actions runners [1][2]. Actions that were designed for Node.js 16 are no longer supported and may fail or produce deprecation warnings when executed in modern runner environments. 2. Node.js 20 Deprecation: Following the migration from Node.js 16, GitHub also initiated the deprecation of Node.js 20 [3][4]. As of mid-2026, Node.js 24 is the current standard for GitHub Actions [5][3], and Node.js 20 support is scheduled to be fully removed later in 2026 [4]. 3. Recommended Action Versions: Users should migrate to the latest major version of actions/setup-go to ensure compatibility with current runner runtimes (Node.js 24) [5]. The V6 edition of actions/setup-go explicitly includes an upgrade to the Node.js 24 runtime [5]. 4. Runner Compatibility: To ensure full compatibility with modern actions, workflows should be running on the latest available GitHub Actions runners, which support current Node.js standards [5][3]. For security and stability, it is strongly recommended to update any workflows still using actions/setup-go v4 to the latest version (v6 or newer) [5].

Citations:


Upgrade the actions/setup-go pins. v4 is deprecated because it relies on Node 16, which is no longer supported on GitHub Actions runners. Update every workflow using it to actions/setup-go@v6:

  • .github/workflows/pr-chart-delete.yaml#L33
  • .github/workflows/validate-chart-pr.yaml#L15
  • .github/workflows/sync-chart-created.yaml#L33
  • .github/workflows/sync-chart-deleted.yaml#L28
  • .github/workflows/pr-chart-sync.yaml#L38
🧰 Tools
🪛 actionlint (1.7.12)

[error] 33-33: the runner of "actions/setup-go@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

📍 Affects 2 files
  • .github/workflows/pr-chart-delete.yaml#L32-L35 (this comment)
  • .github/workflows/validate-chart-pr.yaml#L14-L17
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 32 - 35, Upgrade the
actions/setup-go reference from v4 to v6 in every affected workflow:
.github/workflows/pr-chart-delete.yaml lines 32-35,
.github/workflows/validate-chart-pr.yaml lines 14-17,
.github/workflows/sync-chart-created.yaml lines 33,
.github/workflows/sync-chart-deleted.yaml lines 28, and
.github/workflows/pr-chart-sync.yaml lines 38. Preserve the existing Go version
configuration.

Source: Linters/SAST tools

Comment on lines +47 to +66
- name: Check if chart exists
id: chart-check
run: |
chart_file="charts/${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz"
prov_file="charts/${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}.tgz.prov"

if [[ -f "$chart_file" ]]; then
echo "chart_exists=true" >> $GITHUB_OUTPUT
echo "chart_file=$chart_file" >> $GITHUB_OUTPUT
echo "prov_file=$prov_file" >> $GITHUB_OUTPUT
echo "Found chart: $chart_file"
if [[ -f "$prov_file" ]]; then
echo "Found provenance: $prov_file"
else
echo "Provenance file not found: $prov_file"
fi
else
echo "chart_exists=false" >> $GITHUB_OUTPUT
echo "Chart not found: $chart_file"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not skip deletion when only provenance or index artefacts remain.

The workflow reports “not found” whenever the archive is absent, even if its .prov file or index.yaml entry remains. Detect all three artefact types and run deletion/index regeneration when any exists.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 50-50: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 50-50: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 51-51: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)


[warning] 51-51: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 47 - 66, The chart-check
step currently detects only the archive, so deletion is skipped when provenance
or index artefacts remain. Update the chart existence logic in the “Check if
chart exists” step to detect the chart archive, its .prov file, and the
corresponding index.yaml entry, setting chart_exists=true and preserving the
deletion/regeneration path when any artefact exists.

Comment thread .github/workflows/pr-chart-sync.yaml Outdated
Comment on lines +50 to +52
run: |
git checkout -b "${{ env.BRANCH_NAME }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Prevent script injection by using native shell variables.

Using GitHub Actions expressions (${{ env.VAR }}) inside inline bash scripts interpolates the values before execution, which allows for script injection if the environment variables contain malicious or unexpected characters. Ensure you use native shell variables (e.g., "$VAR") which safely pass the values.

  • .github/workflows/pr-chart-sync.yaml#L50-L52: Replace "${{ env.BRANCH_NAME }}" with "$BRANCH_NAME".
  • .github/workflows/pr-chart-sync.yaml#L53-L60: Replace ${{ env.VAR }} interpolation with $VAR equivalents for the download URL, chart name, and version.
  • .github/workflows/pr-chart-sync.yaml#L65-L70: Replace ${{ env.VAR }} interpolation with $VAR equivalents for the chart name and version.
  • .github/workflows/pr-chart-sync.yaml#L80-L92: Replace ${{ env.VAR }} interpolations inside the git commit message with $VAR.
  • .github/workflows/pr-chart-sync.yaml#L93-L97: Replace "${{ env.BRANCH_NAME }}" with "$BRANCH_NAME".
  • .github/workflows/pr-chart-sync.yaml#L98-L133: Replace ${{ env.VAR }} interpolations in the gh pr create command and its heredoc body with $VAR equivalents (using ${VAR} inside backticks to preserve heredoc structure).
  • .github/workflows/pr-chart-sync.yaml#L145-L152: Replace ${{ env.VAR }} interpolations in the echo statements with $VAR.
  • .github/workflows/pr-chart-sync.yaml#L153-L158: Replace ${{ env.VAR }} interpolations in the echo statements with $VAR.
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 51-51: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

📍 Affects 1 file
  • .github/workflows/pr-chart-sync.yaml#L50-L52 (this comment)
  • .github/workflows/pr-chart-sync.yaml#L53-L60
  • .github/workflows/pr-chart-sync.yaml#L65-L70
  • .github/workflows/pr-chart-sync.yaml#L80-L92
  • .github/workflows/pr-chart-sync.yaml#L93-L97
  • .github/workflows/pr-chart-sync.yaml#L98-L133
  • .github/workflows/pr-chart-sync.yaml#L145-L152
  • .github/workflows/pr-chart-sync.yaml#L153-L158

Source: Linters/SAST tools

Comment thread .github/workflows/validate-chart-pr.yaml
@fabikova
fabikova force-pushed the feature/rfc-0020-chart-sync branch 2 times, most recently from 1c3a7e4 to 06305bc Compare July 14, 2026 12:47

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

♻️ Duplicate comments (4)
.github/workflows/pr-chart-delete.yaml (4)

32-35: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Upgrade the actions/setup-go pins.

v4 is deprecated because it relies on Node 16, which is no longer supported on GitHub Actions runners. Update this to actions/setup-go@v6.

🛠 Proposed fix
       - name: Set up Go 1.21.x
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v6
         with:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 32 - 35, Update the
setup-go action in the “Set up Go 1.21.x” workflow step from actions/setup-go@v4
to actions/setup-go@v6, keeping the existing go-version unchanged.

Source: Linters/SAST tools


53-53: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not skip deletion when only provenance or index artefacts remain.

The workflow currently skips the deletion process if the chart archive (.tgz) is absent, even if its .prov file remains or it is still listed in index.yaml. Check for all artefact types so the repository is cleanly synchronised.

🛠 Proposed fix
-          if [[ -f "$chart_file" ]]; then
+          if [[ -f "$chart_file" ]] || [[ -f "$prov_file" ]] || { [[ -f "charts/index.yaml" ]] && grep -q "$CHART_NAME" charts/index.yaml; }; then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml at line 53, Update the deletion guard
in the workflow’s chart cleanup logic to proceed when any related artefact
exists: the chart archive, its provenance file, or its entry in index.yaml.
Preserve the existing deletion behavior while ensuring cleanup is not skipped
when only .prov or index.yaml artefacts remain.

37-38: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Downgrade actions/checkout to a valid version.

The actions/checkout@v6 action does not exist (the latest major version is v4). Specifying a non-existent version will cause the workflow to fail immediately upon initialisation.

🛠 Proposed fix
       - name: Checkout
-        uses: actions/checkout@v6
+        uses: actions/checkout@v4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 37 - 38, Update the
Checkout step’s actions/checkout reference from the unavailable v6 release to
the valid v4 major version, leaving the rest of the workflow unchanged.

25-29: 🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift

Unvalidated dispatch inputs still interpolated via ${{ }} throughout the job.

CHART_NAME, CHART_VERSION, and COMPONENT_REPO come straight from workflow_dispatch inputs with no format check. Downstream run: steps re-expand them via ${{ env.X }} rather than reading the already-exported shell variables. GitHub performs literal text substitution for ${{ }} before the shell parses the script, which allows arbitrary command injection and path traversal.

Add a validation step to restrict these inputs to a safe character set before any shell command runs, and switch all downstream run: blocks to use standard shell variable syntax (e.g., "$CHART_NAME") instead of ${{ env.CHART_NAME }}.

🛡️ Proposed input validation step

Add this validation step directly after the checkout step, and update all subsequent run: blocks to use "$CHART_NAME", "$CHART_VERSION", "$COMPONENT_REPO", and "$BRANCH_NAME".

      - name: Validate inputs
        run: |
          if [[ ! "$CHART_NAME" =~ ^[a-zA-Z0-9.-]+$ ]] || [[ ! "$CHART_VERSION" =~ ^[a-zA-Z0-9.-]+$ ]]; then
            echo "Invalid chart name or version."
            exit 1
          fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-chart-delete.yaml around lines 25 - 29, Add a
validation step immediately after checkout that rejects CHART_NAME and
CHART_VERSION unless they match the safe alphanumeric, dot, and hyphen pattern,
before any other shell command runs. Update every subsequent run block to
reference the exported shell variables "$CHART_NAME", "$CHART_VERSION",
"$COMPONENT_REPO", and "$BRANCH_NAME" instead of GitHub expression interpolation
such as "${{ env.* }}"; preserve the existing workflow behavior after
validation.
🧹 Nitpick comments (1)
.github/workflows/validate-chart-pr.yaml (1)

14-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update actions/setup-go to v6.

The v4 action uses a deprecated Node.js 20 runtime, which will trigger runner warnings. Update to v6 to use the supported Node.js 24 runtime.

💻 Proposed fix
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v6
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml around lines 14 - 17, Update the
setup-go action in the “Set up Go 1.21.x” workflow step from v4 to v6,
preserving the existing Go version configuration.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/validate-chart-pr.yaml:
- Line 166: Update the structural validation job condition in the workflow to
trigger based on the pull request branch name prefix used for chart-sync
branches instead of checking for the missing chart-sync label. Preserve the
existing validation steps and ensure only matching chart-sync branch names
activate the job.

---

Duplicate comments:
In @.github/workflows/pr-chart-delete.yaml:
- Around line 32-35: Update the setup-go action in the “Set up Go 1.21.x”
workflow step from actions/setup-go@v4 to actions/setup-go@v6, keeping the
existing go-version unchanged.
- Line 53: Update the deletion guard in the workflow’s chart cleanup logic to
proceed when any related artefact exists: the chart archive, its provenance
file, or its entry in index.yaml. Preserve the existing deletion behavior while
ensuring cleanup is not skipped when only .prov or index.yaml artefacts remain.
- Around line 37-38: Update the Checkout step’s actions/checkout reference from
the unavailable v6 release to the valid v4 major version, leaving the rest of
the workflow unchanged.
- Around line 25-29: Add a validation step immediately after checkout that
rejects CHART_NAME and CHART_VERSION unless they match the safe alphanumeric,
dot, and hyphen pattern, before any other shell command runs. Update every
subsequent run block to reference the exported shell variables "$CHART_NAME",
"$CHART_VERSION", "$COMPONENT_REPO", and "$BRANCH_NAME" instead of GitHub
expression interpolation such as "${{ env.* }}"; preserve the existing workflow
behavior after validation.

---

Nitpick comments:
In @.github/workflows/validate-chart-pr.yaml:
- Around line 14-17: Update the setup-go action in the “Set up Go 1.21.x”
workflow step from v4 to v6, preserving the existing Go version configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80c61d8a-0399-4294-a219-c3dda6e7083e

📥 Commits

Reviewing files that changed from the base of the PR and between 020d447 and 06305bc.

📒 Files selected for processing (4)
  • .github/workflows/pr-chart-delete.yaml
  • .github/workflows/pr-chart-sync.yaml
  • .github/workflows/validate-chart-pr.yaml
  • Makefile

echo "No duplicate charts found"

- name: Validate chart sync PR structure
if: contains(github.event.pull_request.labels.*.name, 'chart-sync')

Copy link
Copy Markdown

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

Use branch prefix instead of missing labels.

The chart-sync label is no longer assigned during PR creation. As a result, this structural validation will be skipped entirely. Consider matching the branch name prefix instead of relying on the label.

💻 Proposed fix
-        if: contains(github.event.pull_request.labels.*.name, 'chart-sync')
+        if: startsWith(github.head_ref, 'sync/')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if: contains(github.event.pull_request.labels.*.name, 'chart-sync')
if: startsWith(github.head_ref, 'sync/')
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-chart-pr.yaml at line 166, Update the structural
validation job condition in the workflow to trigger based on the pull request
branch name prefix used for chart-sync branches instead of checking for the
missing chart-sync label. Preserve the existing validation steps and ensure only
matching chart-sync branch names activate the job.

@fabikova
fabikova force-pushed the feature/rfc-0020-chart-sync branch from 06305bc to f020243 Compare July 15, 2026 11:00
@fabikova
fabikova requested a review from Boomatang July 15, 2026 12:56

@Boomatang Boomatang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As all the workflows suffer from the go version and actions should be pinned, I only comment on those changes in the one file.

In general I think it is looking good.

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
- name: Set up Go 1.21.x
uses: actions/setup-go@v4
with:
go-version: 1.21.x

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This version of go is very old and we should be more inline with rest of the projects. This should be changed to 1.26.x

Comment thread .github/workflows/pr-chart-delete.yaml Outdated

steps:
- name: Set up Go 1.21.x
uses: actions/setup-go@v4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We are move to pined version of the actions we use. The v4should be replaced with a commit. This will apply to very actions uses field.

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
- name: Checkout
uses: actions/checkout@v6
with:
token: ${{ secrets.KUADRANT_DEV_PAT }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can checkout a branch with out using the PAT token.

Here is an example of doing such a thing. https://github.com/Kuadrant/authorino/blob/604ba6a0763c9e4c1a0f76c8a255c0c9107218e2/.github/workflows/pre-release.yaml#L16-L31

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
fi

- name: Delete chart package
if: steps.chart-check.outputs.chart_exists == 'true'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking at this check. It seems to be on every step after here. Would it make more sense to exit with error if the chart that is trying to be removed does not exist anymore?

Comment thread .github/workflows/pr-chart-delete.yaml Outdated
- name: Create Pull Request
if: steps.chart-check.outputs.chart_exists == 'true' && steps.changes.outputs.has_changes == 'true'
env:
GH_TOKEN: ${{ secrets.KUADRANT_DEV_PAT }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This can be done using the same GitHub permission I method earlier. For testing in your fork you do need to enable a setting to allow the creation of the pr.

Comment thread .github/workflows/pr-chart-sync.yaml Outdated
Comment on lines +159 to +163
- name: No changes detected
if: steps.changes.outputs.has_changes == 'false'
run: |
echo "No changes detected for ${{ env.CHART_NAME }} v${{ env.CHART_VERSION }}"
echo "Chart may already exist in the repository"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This check should really happen sooner so as not to need the `if`` check in a number of place. Possible should also have non-zero exit as it would be expect if a user calls the workflow that it would make changes.

Comment thread .github/workflows/pr-chart-sync.yaml Outdated
Comment on lines +142 to +150
# Manual merge fallback - currently disabled
# Use this if auto-merge is not enabled in repository settings
# - name: Output PR details
# if: steps.changes.outputs.has_changes == 'true'
# run: |
# echo "Created PR for ${{ env.CHART_NAME }} v${{ env.CHART_VERSION }}"
# echo "Branch: ${{ env.BRANCH_NAME }}"
# echo "PR created successfully - manual merge required after CI validation passes"
# echo "To enable auto-merge: Repository Settings > General > Pull Requests > Allow auto-merge"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would remove this


- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Where else is this action used? This feels like an unnecessary dependency. Some thing like git diff --name-only branch1 branch2 -- path/to/folder/ might do what you need without having to bring in a dependency.

Also I am not sure why this is needed here.

Comment thread .github/workflows/validate-chart-pr.yaml
Comment thread Makefile Outdated
rm -f ./charts/$(CHART_NAME)-$(CHART_VERSION).tgz*

.PHONY: validate-chart
validate-chart: $(HELM) ## Validate a specific chart package

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am questioning what is the need for this command when the Validate chart packages stage of the validate-chart-pr.yaml does so much more. I would like to see this improved.

@Boomatang Boomatang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nothing major, only some clean up comments. The PR description is also now out of sync with the changes. With the requirement on the KUADRANT_DEV_PAT being the largest change.

Do you happen to have test PRs and pipeline test runs that I could look at?

Comment thread .github/workflows/pr-chart-delete.yaml
Comment thread .github/workflows/pr-chart-sync.yaml Outdated
Comment on lines +71 to +72
else
echo "has_changes=true" >> $GITHUB_OUTPUT

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this can be removed now. The has_changes doesn't seem to be used any where else now.

Comment thread .github/workflows/validate-chart-pr.yaml
if [[ -n "${chart_versions[$key]:-}" ]]; then
echo "Duplicate chart found: $chart_name version $chart_version"
echo " Files: ${chart_versions[$key]} and $tgz_file"
exit 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would not exit here. I would update a var to say a duplicate was found. And after the loop I would check that var, if true that stage then exit.

The reason I would do this is to it allows logging of multiple duplicates. Normally it is good to exit earlier, but this case is the exception to the rule.

Comment thread Makefile
Signed-off-by: fabikova <mfabikov@redhat.com>
@fabikova
fabikova force-pushed the feature/rfc-0020-chart-sync branch from 6d5f5d3 to d0ca482 Compare July 29, 2026 09:46

@Boomatang Boomatang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All is looking good to me

@eguzki

eguzki commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

I am not sure we should do this. This repo serves as chart registry and releasing concept does not apply to this repo IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants