Commit f8af0e9
authored
fix(ci): repair YAML block-scalar in workflow-linter Check Permissions step (#51)
`workflow-linter.yml` fails with 0 jobs in 0 seconds because of a YAML
block-scalar bug at the "Check Permissions Declaration" step. The `run:
|` block contains:
```yaml
echo "Add 'permissions:
contents: read' at workflow level"
```
The second line has only 2 spaces of leading indent, which is LESS than
the 10-space indent of the `run: |` block scalar. YAML terminates the
block at the first line and treats ` contents: read' at workflow level"`
as a top-level mapping fragment — making the whole workflow invalid.
GitHub Actions then rejects the workflow during validation, completing
the run with no jobs spawned.
Mirrors hyperpolymath/stapeln#35 — same regex-targeted fix that replaces
the broken 2-line echo with two valid one-line echoes preserving the
user-facing message:
```yaml
echo "Add 'permissions:'"
echo " contents: read' at workflow level"
```
After this fix, the Workflow Security Linter actually runs and reports
SPDX/permissions/SHA-pin/duplicate findings as designed.1 parent 3f2922e commit f8af0e9
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
0 commit comments