1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# gitleaks configuration for VT Code
# https://github.com/gitleaks/gitleaks
#
# Extends gitleaks' built-in rule set. The allowlist below excludes vendored /
# build artifacts and a small set of known, intentional non-secret literals
# (public OAuth client IDs, test fixtures, and well-known documentation
# example keys) so the scan focuses on real credential leaks instead of
# flagging the secret-scrubber module and OAuth PKCE public client IDs.
#
# Re-run locally:
# gitleaks detect --source . --no-git --config .gitleaks.toml --verbose
# CI runs this on every push/PR via .github/workflows/secret-scan.yml.
= "vtcode secret scan"
[]
# Inherit gitleaks' maintained built-in rules (AWS, OpenAI, GitHub, etc.).
= true
[]
= "Vendored/build artifacts + known intentional non-secrets (public OAuth client IDs, test fixtures, AWS doc example keys)"
# Paths that must never be scanned: third-party vendored code, build output,
# lockfile hashes, license text, large generated data files that contain
# model identifiers / hashes which resemble secrets, and the gitignored local
# `.env` (developers' real local API keys live there — never in the repo).
= [
'''node_modules/''',
'''target/''',
'''dist/''',
'''patches/''',
'''Cargo\.lock''',
'''THIRD-PARTY-NOTICES''',
'''docs/models\.json''',
'''\.worktrees/''',
'''\.ruff_cache/''',
'''package-lock\.json''',
# Local-only, gitignored (.gitignore:23 `.env`). Never tracked, so the
# git-based CI scan never sees it; allowlist keeps local --no-git runs
# from printing developers' real keys to the terminal.
'''\.env$''',
# The secret-scrubber module intentionally embeds well-known secret
# *patterns* and documentation example values (e.g. AWS's
# AKIAIOSFODNN7EXAMPLE) as test fixtures for its redaction regexes.
# Scanning it would always false-positive; code review covers new edits.
'''crates/common/vtcode-commons/src/sanitizer\.rs''',
]
# Known literals that are intentionally committed and are NOT credentials:
# - OpenAI ChatGPT OAuth *public* client ID (PKCE public client — not a
# secret by OAuth 2.1 design; overridable via VTCODE_OPENAI_OAUTH_CLIENT_ID)
# - Zig's official minisign *public* key (RWS prefix = public key), published
# at ziglang.org/download, used to verify the downloaded toolchain.
# - Test fixtures: JWT with `user@test.com`, example.com URL with a fake
# `sk_live_123456`, and fixtures used to verify secret redaction /
# non-leakage in Debug impls.
# - AWS's well-known documentation example access key pair.
= [
'''app_EMoamEEZ73f0CkXaXp7hrann''',
'''RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti''',
'''eyJlbWFpbCI6InVzZXJAdGVzdC5jb20ifQ''',
'''sk_live_123456''',
'''sk-test-key-12345''',
'''debug-secret-123''',
'''sk-secret-bearer-token''',
'''rig-secret-access''',
'''AKIAIOSFODNN7EXAMPLE''',
'''wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY''',
]