|
| 1 | +# Gitleaks configuration for opendatahub-io repos |
| 2 | +# Synced from security-config. Do not edit in target repos. |
| 3 | +# |
| 4 | +# Path allowlists use Go regex syntax. |
| 5 | +# Real credentials should NEVER be committed to any repository. |
| 6 | + |
| 7 | +[extend] |
| 8 | + useDefault = true |
| 9 | + |
| 10 | +[allowlist] |
| 11 | + description = "Exclude test fixtures, mock data, sample configs, and CI resources" |
| 12 | + paths = [ |
| 13 | + # Go testdata directories |
| 14 | + '''testdata/''', |
| 15 | + |
| 16 | + # Python test data directories |
| 17 | + '''test_data/''', |
| 18 | + |
| 19 | + # Test fixtures |
| 20 | + '''fixtures/''', |
| 21 | + |
| 22 | + # JavaScript/TypeScript mocks |
| 23 | + '''__mocks__/''', |
| 24 | + |
| 25 | + # Go/Java/TS mock directories |
| 26 | + '''mocks/''', |
| 27 | + '''k8mocks/''', |
| 28 | + |
| 29 | + # Sample and example configs with placeholder credentials |
| 30 | + '''docs/samples/''', |
| 31 | + '''config/samples/''', |
| 32 | + '''config/overlays/test/''', |
| 33 | + |
| 34 | + # CI/GitHub Actions test resources |
| 35 | + '''\.github/resources/''', |
| 36 | + |
| 37 | + # E2E test credentials |
| 38 | + '''test/e2e/credentials/''', |
| 39 | + '''tests/e2e/credentials/''', |
| 40 | + |
| 41 | + # OpenShift CI sample resources |
| 42 | + '''openshift-ci/resources/samples/''', |
| 43 | + |
| 44 | + # Cypress test data |
| 45 | + '''cypress/fixtures/''', |
| 46 | + '''cypress/tests/mocked/''', |
| 47 | + |
| 48 | + # Test certificate and key files |
| 49 | + '''tests/data/.*\.(pem|crt|key)$''', |
| 50 | + ] |
| 51 | + |
| 52 | + # Known test/placeholder credentials used in documentation and tests |
| 53 | + regexes = [ |
| 54 | + '''database-password\s*:\s*"?(The)?BlurstOfTimes"?''', |
| 55 | + '''database-user\s*:\s*"?mlmduser"?''', |
| 56 | + '''database-user\s*:\s*"?modelregistryuser"?''', |
| 57 | + ] |
0 commit comments