Skip to content

HYPERFLEET-1331 - chore: replace bingo with Go 1.24 tool directives#239

Open
kuudori wants to merge 3 commits into
openshift-hyperfleet:mainfrom
kuudori:chore/replace-bingo-with-go-tool-directives
Open

HYPERFLEET-1331 - chore: replace bingo with Go 1.24 tool directives#239
kuudori wants to merge 3 commits into
openshift-hyperfleet:mainfrom
kuudori:chore/replace-bingo-with-go-tool-directives

Conversation

@kuudori

@kuudori kuudori commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

HYPERFLEET-1331

Replace Bingo / standalone go install with a single tools/go.mod using Go 1.24+ tool directives.
Tools are pinned in tools/go.mod and invoked via $(call gotool,<name>) in the Makefile.

Tools:

  • golangci-lint v2.7.0
  • helm-docs v1.14.2
  • kubeconform v0.8.0

Also adds tidy-tools and verify-tools Make targets.

Follow-up changes (review comment fixes)

  • Quote $(GO) and $(TOOL_MOD) in Makefile gotool and tool recipes to prevent shell injection (CWE-78)
  • verify-tools now compares against HEAD (git diff HEAD --) instead of the working tree
  • Upgraded vulnerable transitive tool dep: helm.sh/helm/v3 v3.21.3

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign pnguyen44 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

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

The repository replaces Bingo-managed development tools with a pinned tools/go.mod module. Makefile commands invoke Helm documentation, schema validation, formatting, and linting tools through Go’s tool mechanism, with targets to tidy and verify the tools module. Bingo metadata and documentation are removed or updated, while selected application and indirect dependency versions are downgraded.

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant Makefile
  participant GoTool
  participant ToolsModule
  Developer->>Makefile: run tool or verification target
  Makefile->>GoTool: invoke gotool
  GoTool->>ToolsModule: load pinned tool definitions
  ToolsModule-->>GoTool: resolve development tool
  GoTool-->>Makefile: execute tool or report module drift
Loading

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: ciaranroche, mbrudnoy, rafabene, rh-amarin

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 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.
Sec-02: Secrets In Log Output ✅ Passed No non-test log calls contained token/password/credential/secret fields or interpolations; only comments/test fixtures matched. No CWE-532 issue found.
No Hardcoded Secrets ✅ Passed No CWE-798/CWE-259/CWE-321 patterns found; added long base64-like strings are Go module checksums in go.sum/tools/go.sum, not secrets.
No Weak Cryptography ✅ Passed PR only moves toolchain/docs and dependency pins; no crypto/md5/des/rc4, SHA1-for-security, ECB, custom crypto, or secret compares (CWE-327/328/208).
No Injection Vectors ✅ Passed PASS: patch is tooling/docs only; no SQL, exec.Command, template.HTML, or yaml.Unmarshal on untrusted input found (CWE-89/78/79/502).
No Privileged Containers ✅ Passed No Kubernetes/OpenShift manifests, Helm templates, or Dockerfiles changed in the PR diff; no privileged settings to flag (CWE-269).
No Pii Or Sensitive Data In Logs ✅ Passed PASS: PR only changes tooling/docs/Makefile; no modified slog/logr/zap/fmt.Print* sites or new sensitive log content, so no CWE-532 exposure.
Title check ✅ Passed The title matches the main change: replacing Bingo-managed tooling with Go tool directives.
Description check ✅ Passed The description is directly related and accurately describes the tooling migration and Makefile changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

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

@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch 3 times, most recently from c3b37e9 to 5667250 Compare July 10, 2026 19:32
@kuudori
kuudori marked this pull request as ready for review July 10, 2026 19:40
@openshift-ci
openshift-ci Bot requested review from ciaranRoche and rh-amarin July 10, 2026 19:40
@hyperfleet-ci-bot

hyperfleet-ci-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

Risk Score: 2 — risk/medium

Signal Detail Points
PR size 1648 lines (>500) +2
Sensitive paths none +0

Computed by hyperfleet-risk-scorer

@kuudori
kuudori marked this pull request as draft July 13, 2026 03:32
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 5667250 to 36bf83c Compare July 13, 2026 18:52
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 36bf83c to 559c885 Compare July 13, 2026 18:55
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 559c885 to 1c13c93 Compare July 14, 2026 02:06
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 1c13c93 to c36c63f Compare July 14, 2026 02:09
@kuudori kuudori changed the title chore: replace bingo with Go 1.24 tool directives HYPERFLEET-1331 - chore: replace bingo with Go 1.24 tool directives Jul 14, 2026
@kuudori
kuudori marked this pull request as ready for review July 20, 2026 16:48
@openshift-ci
openshift-ci Bot requested review from mbrudnoy and rafabene July 20, 2026 16:48

@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

🤖 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 `@go.mod`:
- Line 194: Upgrade the indirect helm.sh/helm/v3 dependency from v3.15.2 to
v3.18.4 or a newer patched release in the module dependency declarations,
including any version constraint introduced by the helm-docs tool directive.
Verify the resolved dependency graph contains no older Helm version or
downgrade.
🪄 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0c341fe7-86b8-440f-b8a1-a89f0beb50f5

📥 Commits

Reviewing files that changed from the base of the PR and between 547cfb7 and c36c63f.

⛔ Files ignored due to path filters (5)
  • .bingo/goimports.sum is excluded by !**/*.sum
  • .bingo/golangci-lint.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (11)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/goimports.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/variables.env
  • Makefile
  • go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual) → reviewed against open PR #26 chore/replace-bingo-with-go-tool-directives instead of the default branch
💤 Files with no reviewable changes (9)
  • .bingo/go.mod
  • .bingo/goimports.mod
  • .bingo/helm-docs.mod
  • .bingo/variables.env
  • .bingo/.gitignore
  • .bingo/golangci-lint.mod
  • .bingo/README.md
  • .bingo/kubeconform.mod
  • .bingo/Variables.mk

Comment thread go.mod Outdated
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch 2 times, most recently from 906d064 to 183ee2f Compare July 20, 2026 17:05
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 183ee2f to 856f798 Compare July 20, 2026 17:06

@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: 3

🤖 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 `@go.mod`:
- Around line 43-47: Update the go.mod dependency entries for
cloud.google.com/go/auth and github.com/go-openapi/jsonreference to restore
their previous patched versions rather than downgrading them, unless a
documented compatibility or security justification requires the older versions.
Then validate the module graph and available updates with go mod graph and go
list -m -u all, and run govulncheck ./....

In `@Makefile`:
- Around line 381-383: Update the Makefile tools target to execute from the
tools directory with workspace mode disabled, so $(GO) install tool uses the
pinned directives in tools/go.mod; preserve the target’s existing installation
behavior.

In `@tools/go.mod`:
- Line 219: Update the tool dependency declarations in tools/go.mod, including
golang.org/x/crypto and helm.sh/helm/v3, to patched versions that resolve the
cited vulnerabilities; regenerate the corresponding tools/go.sum entries and
rerun the vulnerability scan to verify no findings remain.
🪄 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4a84c721-bd98-4bb6-a3e6-be9928b4f07f

📥 Commits

Reviewing files that changed from the base of the PR and between c36c63f and 856f798.

⛔ Files ignored due to path filters (5)
  • .bingo/goimports.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
  • tools/go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (12)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/goimports.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/variables.env
  • Makefile
  • go.mod
  • tools/go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual) → reviewed against open PR #26 chore/replace-bingo-with-go-tool-directives instead of the default branch
💤 Files with no reviewable changes (9)
  • .bingo/golangci-lint.mod
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/helm-docs.mod
  • .bingo/goimports.mod
  • .bingo/kubeconform.mod
  • .bingo/README.md
  • .bingo/.gitignore
  • .bingo/variables.env

Comment thread go.mod
Comment thread Makefile Outdated
Comment thread tools/go.mod Outdated
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch 3 times, most recently from 3d5074d to 85a99ed Compare July 20, 2026 18:38
@kuudori

kuudori commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 85a99ed to 2d1b65a Compare July 20, 2026 18:42

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

♻️ Duplicate comments (1)
tools/go.mod (1)

219-219: 🔒 Security & Privacy | 🟠 Major

Remove vulnerable tool dependencies before merge.

golang.org/x/crypto v0.43.0 remains affected by CVE-2025-58181 / GO-2025-4134 (CWE-770); the issue is fixed before v0.45.0. helm.sh/helm/v3 v3.15.2 remains affected by CVE-2025-53547 / GO-2025-3802 and CVE-2025-55198 / GO-2025-3888, including chart-driven code injection and panic conditions. (pkg.go.dev)

Upgrade both modules to patched versions, regenerate tools/go.sum, and rerun the vulnerability scan before merging. This repeats the previous review finding; the vulnerable pins are still present.

As per path instructions: verify new dependency security and prioritize critical and major findings.

#!/bin/bash
set -euo pipefail

cd tools
go list -m -json golang.org/x/crypto helm.sh/helm/v3
govulncheck ./...
git diff --exit-code -- go.mod go.sum

Also applies to: 230-230

🤖 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 `@tools/go.mod` at line 219, Upgrade the golang.org/x/crypto dependency to at
least v0.45.0 and helm.sh/helm/v3 to patched versions in tools/go.mod,
regenerate tools/go.sum, then run the provided module inspection and govulncheck
commands. Confirm the vulnerability scan passes and commit the resulting
go.mod/go.sum changes.

Sources: Path instructions, 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.

Duplicate comments:
In `@tools/go.mod`:
- Line 219: Upgrade the golang.org/x/crypto dependency to at least v0.45.0 and
helm.sh/helm/v3 to patched versions in tools/go.mod, regenerate tools/go.sum,
then run the provided module inspection and govulncheck commands. Confirm the
vulnerability scan passes and commit the resulting go.mod/go.sum changes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: da4e849c-c9eb-414c-976e-6e395307ee11

📥 Commits

Reviewing files that changed from the base of the PR and between 856f798 and 85a99ed.

⛔ Files ignored due to path filters (5)
  • .bingo/goimports.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
  • tools/go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (14)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/goimports.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/variables.env
  • AGENTS.md
  • Makefile
  • docs/development.md
  • go.mod
  • tools/go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual) → reviewed against open PR #26 chore/replace-bingo-with-go-tool-directives instead of the default branch
💤 Files with no reviewable changes (9)
  • .bingo/helm-docs.mod
  • .bingo/goimports.mod
  • .bingo/go.mod
  • .bingo/golangci-lint.mod
  • .bingo/Variables.mk
  • .bingo/README.md
  • .bingo/variables.env
  • .bingo/.gitignore
  • .bingo/kubeconform.mod
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from 2d1b65a to 053e57d Compare July 20, 2026 18:54
@kuudori

kuudori commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- Quote Make variables in gotool and tool recipes (CWE-78)
- Compare tool files against HEAD in verify-tools
- Upgrade helm.sh/helm/v3 v3.15.2 -> v3.21.3 in tools/go.mod (11 HIGH CVEs)

@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

🤖 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 `@Makefile`:
- Line 111: Update the test-helm target and its prerequisite setup to remove any
curl-pipe-bash Helm installation. Use an available package-manager prerequisite
or install a pinned Helm archive with checksum or signature verification before
running the existing Helm checks.
- Line 133: Update the Makefile’s helm template-to-kubeconform pipelines,
including the target containing the broker.googlepubsub.topic setting and all
repeated instances, so helm template failures propagate instead of being masked
by a successful kubeconform exit. Either split rendering and validation into
separate steps or configure the recipe to use bash with pipefail, while
preserving the existing validation behavior.
🪄 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 2df2a12a-fcd2-43a6-b172-024ed9c3b952

📥 Commits

Reviewing files that changed from the base of the PR and between 85a99ed and 3dcf8ed.

⛔ Files ignored due to path filters (5)
  • .bingo/goimports.sum is excluded by !**/*.sum
  • .bingo/helm-docs.sum is excluded by !**/*.sum
  • .bingo/kubeconform.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum, !**/go.sum
  • tools/go.sum is excluded by !**/*.sum, !**/go.sum
📒 Files selected for processing (14)
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/Variables.mk
  • .bingo/go.mod
  • .bingo/goimports.mod
  • .bingo/golangci-lint.mod
  • .bingo/helm-docs.mod
  • .bingo/kubeconform.mod
  • .bingo/variables.env
  • AGENTS.md
  • Makefile
  • docs/development.md
  • go.mod
  • tools/go.mod
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual) → reviewed against open PR #26 chore/replace-bingo-with-go-tool-directives instead of the default branch
💤 Files with no reviewable changes (9)
  • .bingo/golangci-lint.mod
  • .bingo/goimports.mod
  • .bingo/kubeconform.mod
  • .bingo/go.mod
  • .bingo/helm-docs.mod
  • .bingo/Variables.mk
  • .bingo/.gitignore
  • .bingo/README.md
  • .bingo/variables.env
🚧 Files skipped from review as they are similar to previous changes (4)
  • AGENTS.md
  • docs/development.md
  • tools/go.mod
  • go.mod

Comment thread Makefile

.PHONY: test-helm
test-helm: $(KUBECONFORM) verify-helm-docs ## Test Helm charts (lint, template, validate, kubeconform)
test-helm: verify-helm-docs ## Test Helm charts (lint, template, validate, kubeconform)

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

Remove the curl-pipe-bash Helm installer (CWE-494).

At Line [115], this target instructs users to execute a mutable GitHub script without checksum or signature verification. Replace it with a package-manager prerequisite or a pinned, checksum-verified Helm archive.

🧰 Tools
🪛 checkmake (0.3.2)

[warning] 111-111: Target body for "test-helm" exceeds allowed length of 5 lines (214).

(maxbodylength)

🤖 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` at line 111, Update the test-helm target and its prerequisite setup
to remove any curl-pipe-bash Helm installation. Use an available package-manager
prerequisite or install a pinned Helm archive with checksum or signature
verification before running the existing Helm checks.

Source: Path instructions

Comment thread Makefile
@kuudori
kuudori force-pushed the chore/replace-bingo-with-go-tool-directives branch from af0c8f7 to 756ced0 Compare July 20, 2026 21:07
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