|
| 1 | +title = "mendix-native gitleaks config" |
| 2 | +# Base config uses gitleaks defaults; we extend with allowlists and a few custom regexes |
| 3 | + |
| 4 | +[allowlist] |
| 5 | + description = "Global allowlist" |
| 6 | + files = [ |
| 7 | + "yarn.lock", |
| 8 | + "package-lock.json", |
| 9 | + "pnpm-lock.yaml", |
| 10 | + "gradlew", |
| 11 | + "gradlew.bat", |
| 12 | + "example/ios/Pods/", |
| 13 | + "example/android/" |
| 14 | + ] |
| 15 | + regexes = [ |
| 16 | + # Common false positives |
| 17 | + '''(?i)localhost(:[0-9]{2,5})?''', |
| 18 | + '''(?i)internal-slot''', |
| 19 | + '''(?i)eastasianwidth''' |
| 20 | + ] |
| 21 | + |
| 22 | +[[rules]] |
| 23 | + id = "generic-api-key" |
| 24 | + description = "Generic API key format" |
| 25 | + regex = '''(?i)(api|access|auth)[_-]?key["'\s:=]+[A-Za-z0-9_\-]{16,}''' |
| 26 | + tags = ["api", "key", "generic"] |
| 27 | + |
| 28 | +[[rules]] |
| 29 | + id = "bearer-token-inline" |
| 30 | + description = "Potential hard-coded bearer token" |
| 31 | + regex = '''Bearer\s+[A-Za-z0-9\-_.]{20,}''' |
| 32 | + tags = ["auth", "token"] |
| 33 | + |
| 34 | +[[rules]] |
| 35 | + id = "jwt" |
| 36 | + description = "JSON Web Token" |
| 37 | + regex = '''eyJ[a-zA-Z0-9_-]{10,}\.[a-zA-Z0-9_-]{10,}\.[a-zA-Z0-9_-]{10,}''' |
| 38 | + tags = ["jwt", "token"] |
| 39 | + |
| 40 | +[[rules]] |
| 41 | + id = "aws-access-key" |
| 42 | + description = "AWS Access Key ID" |
| 43 | + regex = '''AKIA[0-9A-Z]{16}''' |
| 44 | + tags = ["aws", "key"] |
| 45 | + |
| 46 | +[[rules]] |
| 47 | + id = "github-token" |
| 48 | + description = "GitHub Personal Access Token" |
| 49 | + regex = '''ghp_[A-Za-z0-9]{36,}''' |
| 50 | + tags = ["github", "token"] |
| 51 | + |
| 52 | +[[rules]] |
| 53 | + id = "slack-token" |
| 54 | + description = "Slack token" |
| 55 | + regex = '''xox[baprs]-[A-Za-z0-9\-]{10,}''' |
| 56 | + tags = ["slack", "token"] |
| 57 | + |
| 58 | +[[rules]] |
| 59 | + id = "stripe-secret-key" |
| 60 | + description = "Stripe live secret key" |
| 61 | + regex = '''sk_live_[0-9a-zA-Z]{10,}''' |
| 62 | + tags = ["stripe", "secret"] |
| 63 | + |
| 64 | +[[rules]] |
| 65 | + id = "private-key-block" |
| 66 | + description = "Private key block" |
| 67 | + regex = '''-----BEGIN (EC|RSA|DSA|OPENSSH|PRIVATE) KEY-----''' |
| 68 | + tags = ["crypto", "private-key"] |
| 69 | + |
| 70 | +[whitelist] # backward compatibility for older gitleaks versions |
| 71 | + description = "Legacy whitelist alias" |
0 commit comments