File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,6 @@ GO_COVERAGE_PROVIDER=codecov
2525
2626# Codecov Configuration (only used when provider=codecov)
2727CODECOV_TOKEN_REQUIRED=true
28+
29+ # Custom for this repository
30+ GITLEAKS_CONFIG_FILE=.github/gitleaks.toml
Original file line number Diff line number Diff line change 1+ # Gitleaks configuration for go-bsv-middleware
2+ # This file defines rules for secret scanning and allowlists for test/example credentials
3+
4+ title = " gitleaks config for go-bsv-middleware"
5+
6+ # Allowlist specific test/example credentials
7+ [[rules ]]
8+ description = " Generic API Key"
9+ id = " generic-api-key"
10+ regex = ''' (?i)(\bapi[_-]?key\b|\bsecret\b)'''
11+ [[rules .allowlist ]]
12+ description = " Ignore test/example credentials with gitleaks:allow comment"
13+ regexTarget = " line"
14+ regex = ''' gitleaks:allow'''
15+
16+ # Allowlist specific test credential
17+ [[rules .allowlist ]]
18+ description = " Test WIF credential used in examples and fixtures"
19+ regexTarget = " match"
20+ regex = ''' L1cReZseWmqcYra3vrqj9TPBGHhvDQFD2jYuu1RUj5rrfpVLiKHs'''
21+
22+ # Allowlist paths for test fixtures and examples
23+ [[rules .allowlist ]]
24+ description = " Ignore credentials in test fixtures"
25+ paths = [
26+ ''' pkg/internal/testabilities/fixture/.*''' ,
27+ ''' examples/.*''' ,
28+ ]
You can’t perform that action at this time.
0 commit comments