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 @@ -134,7 +134,7 @@ require (
golang.org/x/text v0.35.0 // indirect
golang.org/x/time v0.14.0 // indirect
google.golang.org/api v0.266.0 // indirect
google.golang.org/genproto v0.0.0-20260209200024-4cfbd4190f57 // indirect
google.golang.org/genproto 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
# Verify go.mod require lines that have invalid version format
# Expected: no output for valid files.
awk '
  BEGIN { in_require=0 }
  /^\s*require\s*\(/ { in_require=1; next }
  in_require && /^\s*\)/ { in_require=0; next }
  in_require {
    # strip inline comments
    line=$0
    sub(/[[:space:]]*\/\/.*$/, "", line)
    # module + version pattern
    if (match(line, /^[[:space:]]*([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]*$/, m)) {
      mod=m[1]; ver=m[2]
      # valid: semver vX.Y.Z(-suffix) OR pseudo-version vX.0.0-yyyymmddhhmmss-<12+hex>
      if (ver !~ /^v[0-9]+\.[0-9]+\.[0-9]+([\-+].*)?$/ &&
          ver !~ /^v[0-9]+\.[0-9]+\.[0-9]+-[0-9]{14}-[0-9a-f]{12,}$/) {
        printf("Invalid version format: %s %s\n", mod, ver)
      }
    }
  }
' go.mod

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 148


🏁 Script executed:

#!/bin/bash
# Check the actual state of go.mod around line 137
echo "=== Lines 130-145 of go.mod ==="
sed -n '130,145p' go.mod

echo -e "\n=== Checking all google.golang.org/genproto entries ==="
grep -n "google.golang.org/genproto" go.mod

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 1049


🏁 Script executed:

#!/bin/bash
# Check git diff to see what changed in go.mod
echo "=== Git diff for go.mod (if available) ==="
git diff HEAD~1 go.mod 2>/dev/null | grep -A 3 -B 3 "google.golang.org/genproto" || echo "No git history available"

echo -e "\n=== Check if this is a valid commit hash format ==="
# 3700d4141b60 is 12 hex characters (short commit hash)
# But Go modules need the full version format
echo "Format analysis:"
echo "- Found: 3700d4141b60 (12 hex chars - looks like git short commit hash)"
echo "- Expected for go.mod: v0.0.0-<timestamp>-<12hex> format"
echo "- Similar to: v0.0.0-20260401024825-9d38bb4040a9"

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 400


Use a valid Go module version format for google.golang.org/genproto.

Line 137 uses a raw commit digest (3700d4141b60) instead of a valid pseudo-version (v0.0.0-<timestamp>-<commit>). This violates Go module specification and will cause module resolution and dependency operations to fail.

πŸ€– 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 137, The go.mod entry for the module identifier
google.golang.org/genproto is using a raw commit digest (3700d4141b60) which is
invalid; replace that digest with a valid Go pseudo-version or an official
tagged release for google.golang.org/genproto (e.g.
v0.0.0-<timestamp>-3700d4141b60) or run `go get
google.golang.org/genproto@latest`/a specific tagged version to let Go generate
the correct pseudo-version and update the go.mod entry accordingly.

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/grpc v1.80.0 // indirect
Expand Down