Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ require (
google.golang.org/api v0.266.0 // indirect
google.golang.org/genproto v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
google.golang.org/genproto/googleapis/rpc 3700d4141b60 // indirect
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking Line with googleapis/rpc in go.mod:"
rg -n 'google\.golang\.org/genproto/googleapis/rpc' go.mod

python - <<'PY'
import re, pathlib, sys
content = pathlib.Path("go.mod").read_text()
m = re.search(r'google\.golang\.org/genproto/googleapis/rpc\s+(\S+)', content)
if not m:
    print("Entry not found")
    sys.exit(2)

version = m.group(1)
print("Detected version:", version)

# Accept semver or Go pseudo-version.
semver = re.compile(r'^v\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$')
pseudo = re.compile(r'^v\d+\.\d+\.\d+-\d{14}-[0-9a-f]{12}$')

if semver.match(version) or pseudo.match(version):
    print("Version format looks valid.")
    sys.exit(0)

print("Invalid Go module version format for go.mod require directive.")
sys.exit(1)
PY

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 295


🏁 Script executed:

#!/bin/bash

# Read the go.mod context around line 139 to see nearby versions and patterns
echo "=== Context around line 139 in go.mod ==="
sed -n '130,150p' go.mod

# Also check if there's any pattern or comment about this change
echo -e "\n=== Checking for any nearby comments or patterns ==="
sed -n '135,145p' go.mod

# Get full file to check for other genproto entries
echo -e "\n=== All genproto entries in go.mod ==="
rg 'genproto' go.mod -n || true

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 1532


Fix the invalid Go module version format at line 139.

3700d4141b60 is a bare commit hash and not a valid Go module version. The require directive must use a proper semantic version (e.g., v1.2.3) or pseudo-version format (e.g., v0.0.0-<timestamp>-3700d4141b60). This will cause go mod resolution to fail and block builds. Correct this to match the proper pseudo-version format used by neighboring genproto 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 `@go.mod` at line 139, The require entry for module
google.golang.org/genproto/googleapis/rpc uses a bare commit hash (3700d4141b60)
which is invalid; change it to a proper semantic or pseudo-version like the
neighboring genproto entries (e.g., v0.0.0-<timestamp>-3700d4141b60) so go mod
can resolve it—update the module version for
google.golang.org/genproto/googleapis/rpc to the matching pseudo-version format
used elsewhere.

google.golang.org/grpc v1.80.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v3 v3.0.1
Expand Down