Skip to content

Commit d993bc7

Browse files
committed
ci(security): exclude scanner definition file from self-matching in privacy audit
1 parent 2457b72 commit d993bc7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/secret-scan.yml‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ jobs:
3131
run: |
3232
echo "Scanning codebase for hardcoded private user paths..."
3333
FAIL=0
34-
# Check for local windows user paths (e.g. C:/Users/ or E:/AntigravityProjects/)
35-
if git grep -EI "C:\\\\Users\\\\[a-zA-Z0-9_-]+" -- ':!assets' || git grep -EI "C:/Users/[a-zA-Z0-9_-]+" -- ':!assets'; then
34+
# Check for local windows user paths
35+
if git grep -EI "C:\\\\Users\\\\[a-zA-Z0-9_-]+" -- ':!assets' ':!.github/workflows/secret-scan.yml' || git grep -EI "C:/Users/[a-zA-Z0-9_-]+" -- ':!assets' ':!.github/workflows/secret-scan.yml'; then
3636
echo "::error::Hardcoded Windows user profile path detected in repository!"
3737
FAIL=1
3838
fi
39-
if git grep -EI "[a-zA-Z]:\\\\AntigravityProjects" -- ':!assets' || git grep -EI "[a-zA-Z]:/AntigravityProjects" -- ':!assets'; then
39+
# Check for local project drive paths
40+
PRJ_KW="Antigravity""Projects"
41+
if git grep -EI "[a-zA-Z]:\\\\$PRJ_KW" -- ':!assets' ':!.github/workflows/secret-scan.yml' || git grep -EI "[a-zA-Z]:/$PRJ_KW" -- ':!assets' ':!.github/workflows/secret-scan.yml'; then
4042
echo "::error::Hardcoded absolute project path detected in repository!"
4143
FAIL=1
4244
fi

0 commit comments

Comments
 (0)