ci: allowlist server-only lib/scan-gemini.js in LLM key gate
The scan pipeline helper lives under lib/ but is imported exclusively from pages/api/scan/identify — exclude it from the client-side URL scan. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b0f9a9ec71
commit
e5bb1bae6a
1 changed files with 14 additions and 0 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
|
@ -174,9 +174,23 @@ jobs:
|
|||
done
|
||||
exit 1
|
||||
fi
|
||||
# lib/ may hold server-only helpers (e.g. scan-gemini.js) imported only from pages/api/.
|
||||
SERVER_ONLY=(
|
||||
lib/scan-gemini.js
|
||||
)
|
||||
LLM_PATTERN='generativelanguage\.googleapis\.com|api\.openai\.com'
|
||||
FOUND=()
|
||||
while IFS= read -r file; do
|
||||
skip=false
|
||||
for so in "${SERVER_ONLY[@]}"; do
|
||||
if [ "$file" = "$so" ]; then
|
||||
skip=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$skip" = true ]; then
|
||||
continue
|
||||
fi
|
||||
if grep -qE "$LLM_PATTERN" "$file" 2>/dev/null; then
|
||||
FOUND+=("$file")
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue