Skip to content

Commit 5aaf911

Browse files
Wolfe-Jamclaude
andcommitted
fix(ci): security workflow false-positive CSP + Node 18 EBADENGINE
- NODE_VERSION 18.x → 20.x (glob@11, svelte@7 require node 20+) - CSP check: `if find … -exec grep -l`; always exits 0 because find succeeds regardless of grep match. Pipe to `grep -q .` like the adjacent <script> check already does. - eval() check: same find-exit bug plus -name alternation without parens meant only *.jsx was actually scanned. Kills the daily red X on the scheduled Security Scanning run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6f29652 commit 5aaf911

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/security.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
env:
12-
NODE_VERSION: 18.x
12+
NODE_VERSION: 20.x
1313

1414
jobs:
1515
# Comprehensive security analysis
@@ -113,7 +113,7 @@ jobs:
113113
echo "Checking for inline scripts and unsafe practices..."
114114
115115
# Check for inline scripts in HTML files
116-
if find public -name "*.html" -exec grep -l "javascript:" {} \;; then
116+
if find public -name "*.html" -exec grep -l "javascript:" {} \; 2>/dev/null | grep -q .; then
117117
echo "❌ Found inline javascript: URLs"
118118
exit 1
119119
fi
@@ -123,7 +123,7 @@ jobs:
123123
fi
124124
125125
# Check for eval usage
126-
if find src -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -exec grep -l "eval(" {} \;; then
126+
if find src \( -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" \) -exec grep -l "eval(" {} \; 2>/dev/null | grep -q .; then
127127
echo "❌ Found eval() usage - not allowed in Chrome extensions"
128128
exit 1
129129
fi

0 commit comments

Comments
 (0)