Skip to content

fix(governance): add SPDX header to pages.yml, refresh three stale standards pins#56

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/governance-gates
Jul 21, 2026
Merged

fix(governance): add SPDX header to pages.yml, refresh three stale standards pins#56
hyperpolymath merged 2 commits into
mainfrom
fix/governance-gates

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Both failing Governance jobs are root-caused and fixed. Follows #53, #54, #55.

Workflow security linter

ERROR: .github/workflows/pages.yml missing SPDX header

pages.yml arrived in #51 and begins directly at name:. Every other workflow already carries the header; this was the only one.

Recording a correction against myself. Earlier in this programme I audited all workflows, reported that every one had both an SPDX header and a top-level permissions: block, and marked the SPDX hypothesis disproved. That audit was wrong — it must have run against a tree without pages.yml. The real cause is exactly the one first suspected. A "disproved" hypothesis is only as good as the test that disproved it.

Check Workflow Staleness

governance-reusable.yml pin d7c22711e830 is 63 commit(s) / 24d behind standards HEAD
  — outside the recency window (>50 commits AND >14d). Refresh toward f9dca6ded2ca

Three callers were pinned at d7c22711e830:

Workflow From To
governance-reusable.yml d7c22711e830… f9dca6ded2cad8ab54044c1cb0489b558ae2682b
hypatia-scan-reusable.yml d7c22711e830… f9dca6ded2cad8ab54044c1cb0489b558ae2682b
scorecard-reusable.yml d7c22711e830… f9dca6ded2cad8ab54044c1cb0489b558ae2682b

Full 40-char SHAs — the gate's message quotes the abbreviated form, which would weaken the pin.

Deliberately not touched

  • mirror-reusable.yml (d135b05) and secret-scanner-reusable.yml (c65436e) — neither was flagged by the staleness gate, and the secret-scanner pin in particular should not be moved independently of the gitleaks allowlist work, since re-pinning consumers ahead of the config work reintroduces false positives.
  • scorecard-enforcer.yml — the gate asks for its removal, but this repo doesn't have that file. That clause is generic advice in the reusable's message, not a finding against krl.

Note on bumping toward standards HEAD

The newer governance-reusable has more real checks than the pinned one (its previously-dead docs and Guix/Nix jobs were made real, warn-first until 2026-08-21). So this bump may surface new warnings. That is the gate working, and warn-first means it should not turn the build red.

Verified

actionlint 0 errors · all 18 workflows carry an SPDX header

…andards pins

Both failing Governance jobs are root-caused and fixed.

Workflow security linter

The failure was `.github/workflows/pages.yml missing SPDX header`. pages.yml
arrived in #51 and begins directly at `name:`. Every other workflow in the repo
already carries the header; this was the only one. Added.

Recording a correction: an earlier audit in this programme reported that every
workflow already had both an SPDX header and a top-level `permissions:` block,
and the hypothesis that SPDX was the cause was marked disproved. That audit was
wrong. The real cause is exactly the one first suspected.

Check Workflow Staleness

Three callers pinned standards reusables at d7c22711e830, which the gate
measured as 63 commits / 24 days behind standards HEAD — outside its recency
window of >50 commits AND >14 days:

  * governance-reusable.yml
  * hypatia-scan-reusable.yml
  * scorecard-reusable.yml

All three refreshed to f9dca6ded2cad8ab54044c1cb0489b558ae2682b (full 40-char
SHA; the gate's message quotes the abbreviated form).

Deliberately NOT touched:

  * mirror-reusable.yml (d135b05) and secret-scanner-reusable.yml (c65436e) —
    neither was flagged by the staleness gate, and the secret-scanner pin in
    particular should not be moved independently of the gitleaks allowlist
    work.
  * scorecard-enforcer.yml — the gate's message asks for its removal, but this
    repository does not have that file. That clause is generic advice, not a
    finding against this repo.

Verified: actionlint 0 errors; all 18 workflows carry an SPDX header.
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 21, 2026 15:09
@hyperpolymath
hyperpolymath merged commit bd1e1fd into main Jul 21, 2026
22 of 24 checks passed
@hyperpolymath
hyperpolymath deleted the fix/governance-gates branch July 21, 2026 15:09
@sonarqubecloud

Copy link
Copy Markdown

hyperpolymath added a commit that referenced this pull request Jul 21, 2026
#55 and #56 were merged **before their final commits landed**, so three
fixes verified on those branches are not on `main`. One is a
**regression `main` did not have before #56** — please treat this as the
follow-up that finishes them.

## 1. Hypatia is `startup_failure` on main — regression from #56

#56 refreshed `hypatia-scan-reusable.yml` to standards HEAD. The newer
reusable declares `security-events: **write**` (it uploads SARIF); the
caller still grants `security-events: **read**`. A called workflow
**cannot escalate beyond its caller's grant**, so GitHub rejects the run
at parse time — zero jobs, no log.

Confirmed by a clean A/B on the tangle branch, which carries the
identical change:

| tangle commit | pin | caller perm | Hypatia |
|---|---|---|---|
| `558f631` | old | `read` | **success** |
| `2369299` | new | `read` | **startup_failure** |
| `d090ff2` | new | `write` | **success** |

> **Worth knowing for future sweeps:** `gh pr checks` does **not** list
`startup_failure` among its `fail` rows. A PR can read *"0 fail"* while
a workflow never started. Use `gh run list --json conclusion` to see it.
This is how the regression slipped past my own green check.

## 2. Dogfood Gate still fails — `k9-validate-action` pin

`container/deploy.k9.ncl` uses the canonical single-line pedigree form:

```nickel
pedigree = component_pedigree & { name = "krl-deploy" },
```

The pinned validator (`2d96f43`) cannot parse it — single-line support
was added upstream *after* that pin. Exactly the same stale-pin trap as
the `a2ml-validate-action` bump in #55, where the file was correct and
the validator was too old to see it. Bumped to `08958c9`.

## 3. Governance still fails — unpinned actions in `pages.yml`

#56 fixed the SPDX half of the Workflow security linter, which then
reported its **next** rule:

```
ERROR: Found unpinned actions:
```

`pages.yml` used floating tags where every other workflow pins by SHA:

| Action | From | To |
|---|---|---|
| `actions/checkout` | `@v4` | `de0fac2e…` `# v6.0.2` |
| `actions/upload-pages-artifact` | `@v3` | `56afc609…` `# v3` |
| `actions/deploy-pages` | `@v4` | `d6db9016…` `# v4` |

Same major versions — pinning only, not behaviour.

## Verified on this branch

| Check | Result |
|---|---|
| K9 validator | **0 errors** |
| A2ML validator | **0 errors** (121 files) |
| `actionlint` | **0 errors** |
| SPDX headers | all 18 workflows |
| Unpinned third-party actions | **0** |

## Two reds will remain, and neither is fixable in-repo

- **GitHub Pages deploy** — Pages is **not enabled**:
`/repos/hyperpolymath/krl/pages` returns `404`, surfacing as `HttpError:
Not Found`. The build itself passes and certifies a11y. **Owner action**
(also true of `hyperpolymath/tangle`).
- **Instant Sync** — deliberately frozen.

Opened ready-for-review rather than draft, since it repairs a live
regression on `main`.
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