fix(secret-scan): correct self-exclude path to .gitea (#150) #152
Reference in New Issue
Block a user
Delete Branch "fix/secret-scan-self-exclude-path"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #150
Problem
The secret-scanner'''s self-exclude variable was hardcoded to
.github/workflows/secret-scan.yml, but the file actually lives at.gitea/workflows/secret-scan.yml. The exclude check[ "$f" = "$SELF" ] && continuetherefore never matched the real file, so the scanner could FALSE-POSITIVE on the regex pattern literals (sk-ant-, ghp_, AKIA, etc.) contained in its own workflow file.Fix
Set
SELFto the workflow file'''s actual repo-relative path (verified vials -la .gitea/workflows/secret-scan.yml). One-line change; no other behavior change.Acceptance
secret-scan.ymlin a PR no longer trips the scanner on its own pattern literals — the self-exclude now actually matches the file pathNot merged; routing for review per PM directive.
APPROVED. 5-axis review complete. Correctness: SELF now matches the actual workflow path .gitea/workflows/secret-scan.yml, so the scanner excludes its own regex literals as intended. Robustness: one-line path-only fix; surrounding whitespace-safe file loop and scan behavior unchanged. Security: reduces false positives without broadening the exclusion beyond the workflow file. Performance/readability unchanged. No blocking issues found.
5-axis review: APPROVED.
Correctness/security:
.gitea/workflows/secret-scan.ymlnow self-excludes.gitea/workflows/secret-scan.yml, matching the actual workflow path. The scanner still checks added/modified files, skips only the workflow file itself, and reports offending credential-shaped additions as before.Robustness/performance/readability: no concerns. Diff is path-only;
git diff --checkis clean and CI is green.