|
| 1 | +# Generated by RepoWarden. Extend betterleaks' built-in detectors with a |
| 2 | +# conservative allowlist so we don't trip on test fixtures and public IDs. |
| 3 | +# The allowlist intentionally covers the same ground as RepoWarden's runner |
| 4 | +# filter (apps/runner/src/secret-scan-filter.ts) — if the two drift apart, |
| 5 | +# CI will start flagging findings RepoWarden has already cleared. |
| 6 | +title = "RepoWarden betterleaks config" |
| 7 | + |
| 8 | +[extend] |
| 9 | +useDefault = true |
| 10 | + |
| 11 | +[allowlist] |
| 12 | +description = "RepoWarden default allowlist" |
| 13 | +paths = [ |
| 14 | + '''(^|/)\.env\.example($|\.|\b)''', |
| 15 | + '''(^|/)\.env\.sample($|\.|\b)''', |
| 16 | + '''(^|/)\.env\.template($|\.|\b)''', |
| 17 | + '''(^|/)\.env\.test($|\.|\b)''', |
| 18 | + '''(^|/)\.env\.testing($|\.|\b)''', |
| 19 | + '''(^|/)\.env\.local($|\.|\b)''', |
| 20 | + '''(^|/)\.env\.development($|\.|\b)''', |
| 21 | + '''(^|/)\.env\.dev($|\.|\b)''', |
| 22 | + '''(^|/)__fixtures__/''', |
| 23 | + '''(^|/)__snapshots__/''', |
| 24 | + '''(^|/)__mocks__/''', |
| 25 | + '''(^|/)fixtures?/''', |
| 26 | + '''(^|/)mocks?/''', |
| 27 | + '''(^|/)testdata/''', |
| 28 | + # JS/TS-style test directories |
| 29 | + '''(^|/)tests?/''', |
| 30 | + # .NET test-project conventions: `*.Tests/`, `*.UnitTests/`, `*.IntegrationTests/` |
| 31 | + '''(^|/)[^/]*\.(Tests|UnitTests|IntegrationTests|Specs|Spec)/''', |
| 32 | + # .NET environment-specific config — Development/Local are not shipped to prod |
| 33 | + '''(^|/)appsettings\.(Development|Local|Test|Testing|Staging|Example|Sample)\.json$''', |
| 34 | + '''(^|/)appsettings\..*\.example\.json$''', |
| 35 | + # Generic example/template config conventions across languages |
| 36 | + '''\.(example|sample|template)(\.[A-Za-z0-9]+)?$''', |
| 37 | + '''(^|/)[^/]*\.example\.[A-Za-z0-9]+$''', |
| 38 | + '''(^|/)test/.*\.(snap|fixture)$''', |
| 39 | + '''(^|/)CHANGELOG(\.md)?$''', |
| 40 | + '''(^|/)package-lock\.json$''', |
| 41 | + '''(^|/)pnpm-lock\.yaml$''', |
| 42 | + '''(^|/)yarn\.lock$''', |
| 43 | + '''(^|/)Cargo\.lock$''', |
| 44 | + '''(^|/)go\.sum$''', |
| 45 | + '''(^|/)poetry\.lock$''', |
| 46 | + '''(^|/)Pipfile\.lock$''', |
| 47 | + '''(^|/)Gemfile\.lock$''', |
| 48 | + '''(^|/)composer\.lock$''', |
| 49 | + # .NET package lock / dependency manifests |
| 50 | + '''(^|/)packages\.lock\.json$''', |
| 51 | +] |
| 52 | +regexes = [ |
| 53 | + # Google Tag Manager IDs are public by design |
| 54 | + '''GTM-[A-Z0-9]{4,10}''', |
| 55 | + # Google Analytics measurement IDs (UA-... and G-...) are public |
| 56 | + '''UA-\d{4,10}-\d{1,4}''', |
| 57 | + '''G-[A-Z0-9]{6,12}''', |
| 58 | + # PostHog / Segment / Mixpanel public write keys are intentionally shipped |
| 59 | + '''phc_[A-Za-z0-9]{20,}''', |
| 60 | + # Sentry DSNs published to clients are public |
| 61 | + '''https://[a-f0-9]{32}@(o\d+\.ingest\.)?sentry\.io''', |
| 62 | + # Stripe publishable keys (pk_live_/pk_test_) are public |
| 63 | + '''pk_(live|test)_[A-Za-z0-9]{20,}''', |
| 64 | + # Generic "publishable"/"public" prefix conventions |
| 65 | + '''(?i)\bpub(lic)?_[A-Za-z0-9_-]{10,}''', |
| 66 | +] |
| 67 | +stopwords = [ |
| 68 | + "example", |
| 69 | + "sample", |
| 70 | + "placeholder", |
| 71 | + "dummy", |
| 72 | + "fake", |
| 73 | + "test", |
| 74 | + "fixture", |
| 75 | + "your-", |
| 76 | + "your_", |
| 77 | + "yourkey", |
| 78 | + "yourtoken", |
| 79 | + "xxxxxxxx", |
| 80 | + "0000000000", |
| 81 | + "1234567890", |
| 82 | + "changeme", |
| 83 | + "replace-me", |
| 84 | + "replace_me", |
| 85 | + "todo", |
| 86 | + "redacted", |
| 87 | +] |
0 commit comments