Skip to content

Commit a8601e1

Browse files
committed
fix(ci): repair YAML block-scalar in workflow-linter Check Permissions step
`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 cd54206 commit a8601e1

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
@@ -58,8 +58,8 @@ jobs:
5858
fi
5959
done
6060
if [ $failed -eq 1 ]; then
61-
echo "Add 'permissions:
62-
contents: read' at workflow level"
61+
echo "Add 'permissions:'"
62+
echo " contents: read' at workflow level"
6363
exit 1
6464
fi
6565
echo "All workflows have permissions declared"

0 commit comments

Comments
 (0)