security: allowlist the three test values the sweep reads as secrets (#8507)
release / go (push) Successful in 1m47s
release / web (push) Successful in 1m14s
release / govulncheck (push) Successful in 19s
release / android (push) Successful in 1m55s
release / integration (push) Successful in 2m42s
release / Build signed APK (push) Successful in 1m45s
release / Build + push container image (push) Successful in 16s

The weekly security sweep flagged AWS's published SigV4 example keys in
internal/backup/s3_test.go and a test invite token in
internal/api/auth_register_test.go. None is a credential. A repo-level
.gitleaks.toml extends the family config and allowlists each value with
its reason. It is export-ignored like renovate.json, and the export
check names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 09:24:54 -05:00
co-authored by Claude Opus 5.5
parent 618db4f692
commit 94f7bab191
3 changed files with 24 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@
ci/ export-ignore ci/ export-ignore
ci-requirements.md export-ignore ci-requirements.md export-ignore
renovate.json export-ignore renovate.json export-ignore
.gitleaks.toml export-ignore
internal/server/release_gate_test.go export-ignore internal/server/release_gate_test.go export-ignore
internal/server/release_version_test.go export-ignore internal/server/release_version_test.go export-ignore
.gitattributes export-ignore .gitattributes export-ignore
+1 -1
View File
@@ -700,7 +700,7 @@ jobs:
rm -rf "${EXPORT}" rm -rf "${EXPORT}"
mkdir -p "${EXPORT}" mkdir -p "${EXPORT}"
git archive HEAD | tar -x -C "${EXPORT}" git archive HEAD | tar -x -C "${EXPORT}"
for private in .gitea .forgejo .github ci ci-requirements.md .gitattributes renovate.json; do for private in .gitea .forgejo .github ci ci-requirements.md .gitattributes renovate.json .gitleaks.toml; do
if [ -e "${EXPORT}/${private}" ]; then if [ -e "${EXPORT}/${private}" ]; then
echo "::error::the export carries ${private}; .gitattributes export-ignore no longer covers it" echo "::error::the export carries ${private}; .gitattributes export-ignore no longer covers it"
exit 1 exit 1
+22
View File
@@ -0,0 +1,22 @@
# The weekly security sweep reads this file in place of the family gitleaks
# config, so it extends that config and adds only this repository's
# allowlist. The path is where the sweep's image keeps the family rules.
#
# Every entry says why the matched value is not a secret.
[extend]
path = "/opt/security-rules/gitleaks-family.toml"
[allowlist]
description = "Minstrel: test values that look like credentials and are not"
regexes = [
# AWS's published SigV4 example credentials ("Examples: Signature
# Calculations in AWS Signature Version 4", Amazon S3 API reference).
# internal/backup/s3_test.go signs AWS's own worked example with them and
# checks the signature AWS prints, so they must stay exactly as published.
'''AKIAIOSFODNN7EXAMPLE''',
'''wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY''',
# An invite token that a register test inserts into the throwaway test
# database and then redeems (internal/api/auth_register_test.go).
'''test-invite-abc123''',
]