Skip to content

Commit 2a0fd18

Browse files
ci(workflow-linter): scope uses: grep to require leading whitespace (#9)
The in-tree workflow-linter.yml ran `grep -rn "uses:"` across workflow files, which matched its own comment lines (`# Pattern: uses: ...`) and shell command lines, causing a self-referential false positive. Fix: require leading whitespace before `uses:` (matches standards/governance-reusable.yml line 640 pattern).
1 parent 817b42b commit 2a0fd18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/workflow-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
echo "=== Checking Action Pinning ==="
6464
# Find any uses: lines that don't have @SHA format
6565
# Pattern: uses: owner/repo@<40-char-hex>
66-
unpinned=$(grep -rn "uses:" .github/workflows/ | \
66+
unpinned=$(grep -rnE "^[[:space:]]+uses:" .github/workflows/ | \
6767
grep -v "@[a-f0-9]\{40\}" | \
6868
grep -v "uses: \./\|uses: docker://\|uses: actions/github-script" || true)
6969

0 commit comments

Comments
 (0)