Skip to content

ci: vendor validation scripts and remove remote action pins - #84

Merged
hyperpolymath merged 1 commit into
mainfrom
fix-ci-actions
Jul 27, 2026
Merged

ci: vendor validation scripts and remove remote action pins#84
hyperpolymath merged 1 commit into
mainfrom
fix-ci-actions

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Automated PR to fix CI after deleted actions.


Summary by Gitar

  • CI Validation:
    • Added vendored validation scripts validate-a2ml.sh and validate-k9.sh under .githooks/
    • Updated dogfood-gate.yml workflow to execute local validation scripts instead of using remote GitHub actions

This will update automatically on new commits.

@gitar-bot

gitar-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Vendors validation scripts into .githooks/ and updates the dogfood-gate.yml workflow to execute them locally, removing reliance on remote action pins. No issues found.

Auto-approved: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gitar has auto-approved this PR (configure)

@hyperpolymath
hyperpolymath merged commit d862f6f into main Jul 27, 2026
20 checks passed
@hyperpolymath
hyperpolymath deleted the fix-ci-actions branch July 27, 2026 22:35
hyperpolymath added a commit to hyperpolymath/standards that referenced this pull request Jul 28, 2026
)

## The gap

The governance linter's `Check SHA-pinned actions` step verifies a pin's
**shape** (`@` + 40 hex). It cannot verify the SHA **exists** — a
fabricated 40-hex string passes it.

That is not theoretical. Measured across the estate on 2026-07-28:

| | |
|---|---|
| Unique `(action, SHA)` pins | **613** |
| **Unresolvable** | **112 (18%)** |
| — real repo, invented SHA | 80 |
| — action repo itself is gone | 32 (7 actions) |
| Committed workflow files affected | **876** |
| Repo roots affected | **~310** |

**Why it stayed invisible:** Actions resolves a `uses:` ref only at
*run* time, and an unresolvable ref produces **no check run at all** —
not a red one. `gh pr checks` shows nothing, the board reads green, and
the job never ran. A repo can be "fully green" with its security
scanning entirely absent.

Full report: `dev-notes/estate-unresolvable-action-pins-2026-07-28.md`.

## The change

- New `scripts/check-action-pins-resolve.sh` — dedupes `(repo, sha)`
pairs from the caller's workflows and asks the GitHub API whether each
resolves.
- Wired into the `workflow-lint` job, using the established idiom from
the allowlist preflight above it (sparse-checkout standards → copy
script to `$RUNNER_TEMP` → `rm -rf` the checkout *before* scanning, so
the standards tree is never part of the caller's workspace).

### Failure semantics (deliberate)

**HARD FAIL** only on a *determinate negative* — GitHub answered and the
answer was "does not exist". The script distinguishes `SHA-NOT-FOUND`
(repin it) from `REPO-NOT-FOUND` (the action is gone — vendor it, per
hyperpolymath/tangle#84).

**Does NOT fail** on indeterminate answers (rate limit, 5xx, network).
Those say nothing about a pin, and failing on them would turn any GitHub
incident into an estate-wide red treadmill — the exact trap
`check-workflow-staleness.sh` documents. They are instead counted and
reported **loudly** as `UNVERIFIED`. A fail-open that announces itself
is not a fake gate; a fail-open that hides is.

Rate limiting is not expected to bite: `GITHUB_TOKEN` allows 1,000
req/hr/repo and only *unique* pairs are queried (largest estate repo is
well under 100).

## Verification

Tested against three real repos:

| Repo | Result |
|---|---|
| `tangle` | 9/9 resolve → **exit 0** ✅ |
| `0patch-lsa-sentinel` | catches phantom
`github/codeql-action@29b1f65c` → **exit 1** ✅ |
| `aerie` | catches both dead `a2ml-validate-action` +
`k9-validate-action` → **exit 1** ✅ |

`standards`' own 21 pins all resolve, so this repo passes its own new
gate.

YAML re-parsed (11 jobs preserved, step order correct); script passes
`bash -n` and `shellcheck -S warning` clean.

## Propagation caveat

Consumers pin `governance-reusable.yml` by SHA, so this step only starts
running for a consumer once it re-pins to a standards SHA at or after
this merge (`scripts/propagate-workflow-pins.sh` / the staleness gate
drive that). The *script* is always fetched from `main`, so its logic
stays current without a re-pin — but the step itself needs the newer
workflow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 <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