carlos / platform Public

gitleaks: allow the media conversion tests' fake values

Main's new gitleaks gate (12158f40, #1251) found six values in this
branch's tests, all fakes or code: an AWS-shaped example secret, an
STS-prefixed session token, a multipart ETag, a struct field
(env2.imdsURL) and the drill's base64 fake ECR token. Each is allowed by
exact value in the group that fits, the Go ones in test files only and
the token in scripts/media_endpoint_drill_test.py only. make gitleaks is
clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 2b6c829cd41ae00bc84100c842c9b54e7cfaadb0 parent c3a6077
1 file changed, +20 −2
  • .gitleaks.toml +20 −2
diff --git a/.gitleaks.toml b/.gitleaks.toml
index b52233128..fd9977527 100644
--- a/.gitleaks.toml
+++ b/.gitleaks.toml
@@ -38,7 +38,11 @@ useDefault = true
# keep Stripe's prefixes. Three are 64-hex values: 9f86d081... is
# sha256("test"), fd61a03a... a second stand-in for an HMAC, and
# c7aff5eb... the callback signature key derived from the golden vector's
-# fixed master, "master-fixed-for-the-vector". Test files only: the same
+# fixed master, "master-fixed-for-the-vector". The media conversion tests
+# add three: a secret key in the shape of AWS's documented example
+# (...bPxRfiCYSECRETKEY), a session token that is the prefix every STS token
+# shares plus "+ab/cd==", and a multipart ETag ("<md5>-12"), which names
+# an object's bytes and authenticates nothing. Test files only: the same
# value in production code is still found.
[[allowlists]]
description = "fake credentials in tests"
@@ -69,8 +73,20 @@ regexes = [
'''^9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08$''',
'''^fd61a03af4f77d870fc21e05e7e80678095c92d808cfb3b5c279ee04c74aca13$''',
'''^c7aff5eb65835639b68c63a226767768ac2049fe0b57ab83844691ae5cca1d17$''',
+ '''^wJalrXUtnFEMI/K7MDENG/bPxRfiCYSECRETKEY$''',
+ '''^IQoJb3JpZ2luX2Vj\+ab/cd==$''',
+ '''^9b2cf535f27731c974343645a3985328-12$''',
]
+# The media endpoint drill's Python test fakes ECR's authorization token:
+# base64 of "AWS:fake-registry-password". That file only.
+[[allowlists]]
+description = "media endpoint drill test's fake registry token"
+targetRules = ["generic-api-key"]
+condition = "AND"
+paths = ['''^scripts/media_endpoint_drill_test\.py$''']
+regexes = ['''^QVdTOmZha2UtcmVnaXN0cnktcGFzc3dvcmQ=$''']
+
# The fake instance key the instance-key tests and their plans share
# (note its tail, ...bC6dF5gH0iJ1kA=: typed, not generated). Allowed in
# tests and docs alike, because the plans quote the tests.
@@ -120,7 +136,8 @@ regexes = ['''^dbfukboxsecret1$''']
# Not values at all: generic-api-key matching the word after "key" in code
# comments and prose (a function name, a header, a review's heading, a
-# CLI flag in a list of flags, an env line in a README), and a bucket name
+# CLI flag in a list of flags, an env line in a README, a struct field a
+# test assigns), and a bucket name
# whose number is an AWS account ID, which identifies and does not
# authenticate.
[[allowlists]]
@@ -132,4 +149,5 @@ regexes = [
'''^CARLOS_REGION=ie$''',
'''^--enable-primary-ipv6$''',
'''^carlos-flagship-271376211898$''',
+ '''^env2\.imdsURL$''',
]