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 @@ -80,7 +80,7 @@ require (
github.com/klauspost/compress v1.18.5 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect
github.com/lufia/plan9stats c963978e514e // 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

# Verify the exact require entry and whether a valid pseudo-version for this module exists in repo metadata.
echo "== go.mod entry =="
rg -n 'github\.com/lufia/plan9stats' go.mod

echo
echo "== go.sum entries =="
if [ -f go.sum ]; then
  rg -n 'github\.com/lufia/plan9stats' go.sum || true
else
  echo "go.sum not present"
fi

echo
echo "== Validate require token shape (semver/pseudo-version expected) =="
python - <<'PY'
import re, pathlib
text = pathlib.Path("go.mod").read_text()
m = re.search(r'^\s*github\.com/lufia/plan9stats\s+(\S+)\s+//\s*indirect\s*$', text, re.M)
if not m:
    print("No matching require line found.")
    raise SystemExit(0)
ver = m.group(1)
semver_like = re.match(r'^v\d+\.\d+\.\d+([\-+].*)?$', ver) is not None
pseudo_like = re.match(r'^v\d+\.\d+\.\d+-\d{14}-[0-9a-f]{12}$', ver) is not None
print(f"found version token: {ver}")
print(f"semver_like={semver_like} pseudo_like={pseudo_like}")
if not (semver_like or pseudo_like):
    print("INVALID for go.mod require: raw revision detected.")
PY

Repository: openshift-hyperfleet/hyperfleet-sentinel

Length of output: 609


Fix invalid Go module version syntax in require directive

Line 83 declares github.com/lufia/plan9stats using a raw commit hash (c963978e514e), which is invalid in go.mod require statements. This will cause dependency resolution to fail. The corresponding go.sum already contains the correct pseudo-version. Update line 83 to use the valid pseudo-version format:

Suggested fix
-	github.com/lufia/plan9stats c963978e514e // indirect
+	github.com/lufia/plan9stats v0.0.0-20251013123823-9fd1530e3ec3 // indirect
πŸ€– 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 83, The require directive currently lists
github.com/lufia/plan9stats with a raw commit hash (c963978e514e) which is
invalid; update the require entry for github.com/lufia/plan9stats in go.mod to
use the proper Go pseudo-version found in go.sum (replace the raw hash with the
corresponding vX.Y.Z-yyyymmddhhmmss-<hash> pseudo-version) so the module
resolver can accept the dependency.

github.com/magiconair/properties v1.8.10 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.2.0 // indirect
Expand Down