Cotton code
85 lines · 3.3 KB · TOMLRaw
# gitleaks configuration: the default rules, plus an allowlist for test fixtures.## Every entry below is a proven false positive: a made-up key, a published test# vector or a key generated for one test run, in a TEST FIXTURE, named by its# exact path and only for the rule it trips. Never allowlist by value, and# never a path outside tests: a real-looking key in shipped code is fixed, not# allowlisted (SECURITY-CHECKS-0.md, item 9).## Used by the per-push scan (scripts/secret-scan.sh, from scripts/git-hooks/pre-push).# To add a fixture: run `gitleaks git --log-opts=-1 --redact`, check the value is# invented, and add its path under the rule it tripped.title = "cotton"[extend]useDefault = true[[allowlists]]description = "test fixtures: gcp-api-key"targetRules = ["gcp-api-key"]paths = [  '''^crates/cotton-core/tests/fixtures/cxf/spec-appendix-a\.json$''',][[allowlists]]description = "test fixtures: generic-api-key"targetRules = ["generic-api-key"]paths = [  '''^apps/business/test/approval-push\.test\.ts$''',  '''^apps/business/vitest\.config\.ts$''',  '''^apps/cotton-whatsapp-link/testdata/chrome-assertion\.json$''',  '''^apps/cotton/Tests/CottonKitTests/PasswordArrivalsTests\.swift$''',  '''^apps/cotton/Tests/CottonUITests/SettingsTables/PasswordsRecordsTests\.swift$''',  '''^crates/cotton-core/src/chat/ratchet_vectors\.json$''',  '''^crates/cotton-core/src/keys/cxf_tests\.rs$''',  '''^crates/cotton-core/src/keys/export_tests\.rs$''',  '''^crates/cotton-core/src/keys/totp_tests\.rs$''',  '''^crates/cotton-core/src/transforms/redact_tests\.rs$''',  '''^crates/cotton-core/tests/fixtures/cxf/spec-appendix-a\.json$''',  '''^crates/cotton-core/tests/fixtures/ink/model-inputs\.json$''',  '''^crates/cotton-core/tests/fixtures/ink/model\.jsonl$''',  '''^crates/cotton-core/tests/fixtures/passwords/dashlane\.csv$''',  '''^crates/cotton-ffi/src/phone/passwords_tests\.rs$''',  '''^crates/cotton-ffi/src/phone/secrets_app_tests\.rs$''',  '''^crates/cotton-ffi/src/phone/sites_tests\.rs$''',  '''^crates/cotton-ffi/src/phone/vault_tests\.rs$''',  '''^crates/cotton-ffi/src/phone/writes_tests\.rs$''',  '''^crates/cotton-ffi/tests/walk_person_b\.rs$''',  '''^crates/cotton-rules/src/memory_briefing_tests\.rs$''',  '''^scripts/__tests__/mac-release-signing\.test\.ts$''',  '''^scripts/__tests__/match-mirror\.test\.ts$''',][[allowlists]]description = "test fixtures: jwt"targetRules = ["jwt"]paths = [  '''^crates/cotton-core/src/transforms/redact_tests\.rs$''',  '''^crates/cotton-tools/tests/mcp_connections\.rs$''',][[allowlists]]description = "test fixtures: private-key"targetRules = ["private-key"]paths = [  '''^crates/cotton-core/src/transforms/redact_tests\.rs$''',  '''^crates/cotton-rules/src/memory_briefing_tests\.rs$''',  '''^scripts/__tests__/asc-builds\.test\.ts$''',][[allowlists]]description = "test fixtures: slack-legacy-workspace-token"targetRules = ["slack-legacy-workspace-token"]paths = [  '''^crates/cotton-core/src/transforms/redact_tests\.rs$''',][[allowlists]]description = "test fixtures: stripe-access-token"targetRules = ["stripe-access-token"]paths = [  '''^crates/cotton-core/src/keys/app/app_tests\.rs$''',  '''^crates/cotton-ffi/src/phone/secrets_app_tests\.rs$''',  '''^crates/cotton-ffi/src/phone/vault_app_tests\.rs$''',]