feat(ci): adopt go-install-hardened workflow (Shai-Hulud defense) - #153
feat(ci): adopt go-install-hardened workflow (Shai-Hulud defense)#153srt0422 wants to merge 2 commits into
Conversation
Pins GOPROXY/GOSUMDB/GOFLAGS in go.env and routes Go install/verify/ vuln-scan through the shared ci-workflows-private workflow. Companion to allora-network/ci-workflows-private#17 and the shai-hulud-defense skill (allora-network/skills#69). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant GH as GitHub (push/PR event)
participant GHW as GitHub Actions (workflow runner)
participant GHR as Reusable Workflow (go-install-hardened.yml)
participant GO as Go Toolchain
participant GP as Go Proxy (proxy.golang.org)
participant GS as Go Checksum DB (sum.golang.org)
participant CIVS as CI Workflows Private Repo
Note over GH,CIVS: NEW: Go supply-chain hardened install flow (Shai-Hulud defense)
GH->>GHW: trigger on push to main/master/dev/staging or PR on .go/go.mod/go.sum
GHW->>GHR: uses allora-network/ci-workflows-private @ fa8a0e136...
Note over GHR: SHA-pinned for supply-chain integrity
GHR->>CIVS: fetch reusable workflow from private repo
CIVS-->>GHR: workflow definition (SHA-verified)
GHR->>GO: go install with cgo_enabled='0'
Note over GHR,GO: NEW: CGO disabled to reduce attack surface
GO->>GO: read go.env from repo root
Note over GO: NEW: loads hardened env vars
alt GOPROXY set
GO->>GP: fetch modules via https://proxy.golang.org,direct
GP-->>GO: module archives
else direct fallback
GO->>GO: fall back to direct VCS if proxy unavailable
end
GO->>GS: verify checksums against sum.golang.org
Note over GO,GS: GOSUMDB ensures module integrity
alt checksum mismatch
GS-->>GO: verification failure
GO-->>GHR: build failure (module integrity violation)
GHR-->>GHW: failed status
GHW-->>GH: status check failed
else checksum valid
GS-->>GO: checksum confirmed
GO->>GO: build with -mod=readonly flag
Note over GO: NEW: prevents go.mod/go.sum modification during build
GO-->>GHR: build success
GHR-->>GHW: success status
GHW-->>GH: status check passed
end
Note over GH,GH: GOFLAGS=-mod=readonly ensures reproducible builds
Blocked on signed-commits protectionThis PR is SHA-pinned to A re-pin commit is staged locally but cannot be pushed because this repo's default branch enforces signed commits, and the agent's SSH signing key is not registered under GitHub Settings → SSH and GPG keys → SSH signing keys for the current user. Two ways to unblock
Until either lands, the Companion: allora-network/ci-workflows-private#17, allora-network/skills#69. |
|
review-fix-loop iteration 1 reviewer(s): persona file: .github/workflows/go-hardened.yml:15
| contents: read | ||
| jobs: | ||
| hardened-install: | ||
| uses: allora-network/ci-workflows-private/.github/workflows/go-install-hardened.yml@11e340a585e2b764a64fa70e9afc06da334d57f0 |
There was a problem hiding this comment.
needs-human: SHA-pinned reusable-workflow ref fails GitHub evaluation org-wide; @v1 succeeds
The re-pin pushed in da1d6ca (fa8a0e1 → 11e340a5, current v1 head of ci-workflows-private) is correct on the merits: the callee's own action pins resolve, and forge-v2 ran this exact callee commit green today. This PR's hardened-install check still fails at workflow evaluation time (zero jobs created; "workflow file issue") before any step runs.
Evidence the blocker is org-level, not PR-level:
- Identical zero-job evaluation failure on every SHA-pinned caller checked: allora-chain
@0d80a856(runs 07-07…07-13), allora-offchain-operator@0d80a856(5 runs today), forge-data-service@0d80a856(05-15, 06-03, 07-01), allora-indexer@f16605a4(05-14), this repo@11e340a5(today). - forge-v2 calls the same callee commit via the
@v1branch ref; its Hardened Go install job succeeded today on apull_requestrun (run 29610970018). The calling job there is structurally identical to this one apart from the ref type. - The callee file exists and is structurally valid at every pinned SHA; all callers pass only declared inputs.
- The only prior evaluation success on record for this repo is the original
fa8a0e1pin on 2026-05-14.
This pattern is consistent with an org-level Actions allow-list ("Allowed actions and reusable workflows") that admits the callee at @v1 (and the legacy fa8a0e1 SHA) but not at other SHAs. The org policy endpoints return 403 for this token, so that cannot be confirmed directly.
Two resolution paths, both org-admin decisions:
- Admit the pinned SHA
11e340a585e2b764a64fa70e9afc06da334d57f0(or a wildcard covering ci-workflows-private SHAs) in the org's allowed-actions policy — preserves the SHA-pinning posture this PR exists to enforce. - Switch the caller to
@v1(as forge-v2 does). This contradicts the documented SHA-pin policy (see forge-data-service's go-hardened.yml header) and weakens the Shai-Hulud posture, since v1 is currently a branch, not a tag.
The SHA pin is left in place pending that decision. hardened-install is not a required check (no branch protection on dev), so this does not block merging mechanically.
|
Final cross-provider review (agent-code-review, 3-pass) NO FINDINGS Refuted Pass-2 findings (verification-gate rejects, not emitted as findings):
Loop state: the one blocking finding this run — the |
Adopts the
go-install-hardened.ymlreusable workflow + pins Go env vars ingo.envfor module-integrity safety. Extends the Shai-Hulud supply-chain defense (currently rolled out for npm/PyPI) to Go.\n\n- Reusable workflow: allora-network/ci-workflows-private#17 (SHA-pinned tofa8a0e1361216ec0c75e4d822f648248083e229b; will re-pin to@v1after merge)\n- Skill: allora-network/skills#69\n- Linear umbrella: "Adopt go-install-hardened.yml across all 11 active Go repos"\n-cgo_enabled: '0'\n\n🤖 Generated with Claude CodeSummary by cubic
Adopts a hardened Go install workflow and pins Go module integrity to strengthen the supply chain (Shai-Hulud defense). Aligns with the Linear rollout across Go repos.
.github/workflows/go-hardened.ymlreusinggo-install-hardened.ymlfromallora-network/ci-workflows-private, pinned to thev1head, withgo_version: stableandcgo_enabled: '0'.go.envwithGOPROXY=https://proxy.golang.org,direct,GOSUMDB=sum.golang.org, andGOFLAGS=-mod=readonly.Written for commit da1d6ca. Summary will update on new commits.