diff --git a/.github/scan_tools_configs/gitleaks.toml b/.github/scan_tools_configs/gitleaks.toml index f50c51eb9d..28c3ac1645 100644 --- a/.github/scan_tools_configs/gitleaks.toml +++ b/.github/scan_tools_configs/gitleaks.toml @@ -71,6 +71,18 @@ regexes = [ '''(?i)\bexample_secret\s*=''' ] +[[allowlists]] +description = "Model names and runtime keys: identifiers, not credentials" +# `generic-api-key` fires on any identifier containing "key" that is followed by +# a high-entropy-looking string. These field names hold a model name +# ("Qwen3-0.6B-GGUF") or the key that names an installed runtime +# ("wheel-gfx942-7.13.0"); the Rust unit tests assign literal values to them. +# Anchored on the identifier and the assignment, like the entry above. +regexTarget = "match" +regexes = [ + '''(?i)\b(runtime_key|api_model)\s*[:=]\s*"''', +] + [[allowlists]] description = "Public artifact digests (variable names ending in SHA256/512/MD5)" # SHA-256/512/MD5 hashes of public artifacts are not secrets.