Skip to content

chore(security): harden shared publish workflow vs Mini Shai-Hulud#7

Merged
nmccready merged 1 commit into
mainfrom
chore/harden-publish-shai-hulud
May 12, 2026
Merged

chore(security): harden shared publish workflow vs Mini Shai-Hulud#7
nmccready merged 1 commit into
mainfrom
chore/harden-publish-shai-hulud

Conversation

@nmccready
Copy link
Copy Markdown
Contributor

Summary

Hardens the org-wide reusable publish workflow against the Mini Shai-Hulud npm supply-chain campaign (2026-05-11), which compromised TanStack/Mistral/UiPath/OpenSearch/Squawk by hijacking publish runners mid-OIDC and forging signed Sigstore provenance.

Audit on ~/.openclaw/workspace/.agents/STATE_mini_shai_hulud_audit_20260512150800.md. We are not breached — last brickhouse-tech publish (2026-04-04) predates the campaign by 5 weeks. This PR is preemptive hardening for the next publish.

Changes

  • Pin actions to SHAs — defeats tag-rewrite attacks where attackers move a v-tag:
    • actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 (v4.2.2)
    • actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e (v6.4.0)
    • step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 (v2.19.1)
  • Add step-security/harden-runner with egress-policy: block — denies exfil to getsession.org, IMDS 169.254.169.254, vault.svc.cluster.local. Allowlist limited to npm registry, GitHub, sigstore, nodejs.org.
  • npm ci --ignore-scripts — blocks transitive postinstall scripts (the worm's payload delivery). Our own publish lifecycle (prepublishOnly/prepack) still runs via npm publish since those are our package.json scripts, not deps'.
  • Scope job permissions to contents: read + id-token: write only.
  • Drop redundant npm install after npm ci.

Downstream

Callers brickhouse-tech/angular.js and brickhouse-tech/json-schema currently pin @main → SHA 3c0bca8 (the pre-hardening tip). After this PR merges, bump those pins to the new main SHA to inherit hardening.

Test plan

  • Tag a no-op release on a downstream consumer (or use workflow_dispatch test) to verify the egress allowlist isn't too tight
  • Confirm npm ci --ignore-scripts still resolves our deps cleanly (no native build deps require lifecycle in current LTS packages)
  • Verify Sigstore provenance still uploads (allowlist includes fulcio + rekor + tuf-repo-cdn)
  • Confirm OIDC token still mints (api.github.com allowed)

Sources

🤖 Generated with Claude Code

…shai-hulud)

Mitigations vs the Mini Shai-Hulud npm supply-chain campaign (2026-05-11)
that hijacked TanStack/Mistral/UiPath/OpenSearch publish runners mid-OIDC
flow and forged signed provenance attestations.

- Pin actions/checkout, actions/setup-node, step-security/harden-runner to
  SHAs to defeat tag-rewrite attacks.
- Add step-security/harden-runner with egress allowlist (blocks
  getsession.org, IMDS 169.254.169.254, vault.svc.cluster.local).
- Pass --ignore-scripts to npm ci to block transitive postinstall scripts
  (the worm's vector). Our own publish lifecycle (prepublishOnly/prepack)
  still runs via npm publish.
- Scope job permissions to contents: read + id-token: write only.
- Drop redundant 'npm install' after 'npm ci'.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant