Skip to content

Commit 4621a3a

Browse files
fix(ci): repair workflows made unparseable by a blind permissions insertion (#463)
**These workflow files are not valid YAML, so they have never run.** Not "ran and failed" — never ran. GitHub Actions rejects the file before creating any job: the run is recorded as `failure` with **no jobs, no log and no check run**, and `gh pr checks` shows no row at all. A red mark with nothing behind it to read. ## Cause A sweep added permission declarations **by line position rather than by parsing the document**. Three invalid shapes resulted: **A — a mapping indented under a scalar value** ```yaml permissions: read-all actions: read # read-all is a SCALAR; it cannot take children ``` `read-all` already grants everything `actions: read` would, so the orphaned line is dropped and nothing is lost. **B — injected inside another block** ```yaml on: permissions: contents: read # two colons, and illegal under `on:` anyway push: ``` **C — a literal `\n` that was never interpreted**, gluing the escape's `n` to the key: ```yaml runs-on: ubuntu-latest npermissions: # "\npermissions:" written literally ``` Only a text-level writer emitting an uninterpreted escape can produce that. ## Verified, not assumed Every workflow in this repository parses after the change. The repairer **refuses to write any file that does not parse and still contain jobs** afterwards. Where a job-level `permissions:` line was removed, a **read-only top-level `permissions:` remains**, so nothing is widened — and if none would remain, the tool reports that rather than inventing one. Guessing a permission set is how you silently over-grant. ## Estate context **67 repositories and 100 workflow files are in this state.** The most frequently broken file is **`workflow-linter.yml`, in 22 repositories** — followed by `scorecard.yml` (20) and `dogfood-gate.yml` (13). The workflow whose job is to lint workflows was itself unparseable, so **it never ran, and never caught this or anything else.** The check that would have found the damage was destroyed by the same sweep that caused it. ## So it cannot recur invisibly Detection is being added upstream: a strict-YAML check in the governance reusable — hyperpolymath/standards#582. Ordinary validation cannot see this class of fault, because `yaml.safe_load` silently accepts duplicate keys and only a full parse catches the malformed indentation. ## Expect this repository to get louder Workflows that have been failing silently will now actually run, and some will find real problems that have been invisible for as long as the files have been broken. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 17c63ec commit 4621a3a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

.github/workflows/scorecard.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
branches: [main]
1010

1111
permissions: read-all
12-
actions: read
1312

1413
jobs:
1514
analysis:

0 commit comments

Comments
 (0)