Skip to content

Commit f8af0e9

Browse files
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

File tree

.github/workflows/workflow-linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ jobs:
5454
fi
5555
done
5656
if [ $failed -eq 1 ]; then
57-
echo "Add 'permissions:
58-
contents: read' at workflow level"
57+
echo "Add 'permissions:'"
58+
echo " contents: read' at workflow level"
5959
exit 1
6060
fi
6161
echo "All workflows have permissions declared"

0 commit comments

Comments
 (0)