Skip to content

fix(examples): repoint upload-sarif at a codeql-action SHA that exists - #44

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/example-codeql-pin
Jul 28, 2026
Merged

fix(examples): repoint upload-sarif at a codeql-action SHA that exists#44
hyperpolymath merged 1 commit into
mainfrom
fix/example-codeql-pin

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

examples/oikosbot-ci.yml — the workflow we tell consumers to copy — pinned github/codeql-action/upload-sarif@6624720a57d4c312633c7b953db2f2da5bcb4c3a. That SHA is not a commit in github/codeql-action (REST API: No commit found for SHA), so a consumer copying the example gets a workflow GitHub cannot start: the action fails to resolve during Set up job, producing no check run at all — the failure mode that looks like a green board.

Repointed to 4187e74d05793876e9989daffde9c3e66b4acd07 (v3, 2026-07-22), verified present.

Checked while here: this repo's own .github/workflows/codeql.yml pin (e4fba868…, v3.28.1) is valid — only the example was dead. Companion fixes in metadatastician-governance#10 and #11 (two further distinct phantom SHAs).

🤖 Generated with Claude Code

6624720a57d4c312633c7b953db2f2da5bcb4c3a is not a commit in
github/codeql-action ('No commit found for SHA'). Any consumer who
copied examples/oikosbot-ci.yml got a workflow GitHub could not even
start — the action fails to resolve during 'Set up job', which
produces no check run at all.

Repointed to 4187e74d05793876e9989daffde9c3e66b4acd07 (v3, 2026-07-22),
verified to exist. This repo's own .github/workflows/codeql.yml pin
(e4fba868…, v3.28.1) was checked and is valid — only the example was
dead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gitar-bot

gitar-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Repoints the upload-sarif example workflow at a verified existing commit SHA for codeql-action. No issues found.

Auto-approved and auto-merge armed: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria. — merges when pipeline and required approvals pass.

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 commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ Gitar auto-approved this PR but could not enable auto-merge: auto-merge is disabled for this repository — enable "Allow auto-merge" in the repository settings.

@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 and enabled auto-merge (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Jul 28, 2026
@hyperpolymath
hyperpolymath merged commit 568830d into main Jul 28, 2026
25 checks passed
@hyperpolymath
hyperpolymath deleted the fix/example-codeql-pin branch July 28, 2026 15:43
hyperpolymath added a commit that referenced this pull request Jul 28, 2026
…xist (#46)

**The step that enforces SHA pinning could never fail.**

`workflow-linter.yml`'s *Check pinned actions* set `errors=0`, only
`echo`ed a WARNING (never incrementing), and — unlike the two steps
above it — ended with **no `exit $errors`**. A declared policy with no
enforcement. It also globbed only `.github/workflows`, so the phantom
pin in `examples/oikosbot-ci.yml` (fixed in #44) was structurally
invisible.

**Now it:**
- increments and exits — it can fail;
- scans `examples/` too;
- flags tag/branch refs;
- **probes each SHA against the GitHub API and fails if it is not a real
commit.**

That last check is the point. A phantom SHA isn't an ordinary red: the
ref resolves to nothing, the job dies in *Set up job*, and **no check
run is produced at all** — invisible to `gh pr checks`,
indistinguishable from green. Three distinct phantom `codeql-action`
SHAs were circulating across this repo and metadatastician-governance.

**Verified both directions** (a gate I cannot prove will fail is the
exact thing being fixed here):
- clean on this repo → exit 0;
- falsifier fixture with one tag ref + the real phantom `39a73d65…` →
**exit 2**, both named, the phantom caught inside `examples/`.

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

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant