Skip to content

Commit 13b8294

Browse files
committed
chore: add gitleaks configuration for false positives
- Exclude test files with mock secrets - Exclude Kubernetes annotations - Exclude CI/CD logs and build artifacts - Allow git commit hashes in logs
1 parent ac44b6c commit 13b8294

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.gitleaks.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
title = "O-RAN Intent MANO Gitleaks Config"
2+
3+
[allowlist]
4+
description = "Global allow list"
5+
paths = [
6+
'''tests/security/.*_test\.go''',
7+
'''tests/.*_test\.go''',
8+
'''deploy/k8s/.*\.yaml''',
9+
'''deploy/k8s/.*\.yml''',
10+
'''job-logs\.txt''',
11+
'''.*\.log''',
12+
'''.*\.tmp''',
13+
'''build/.*''',
14+
'''dist/.*''',
15+
]
16+
17+
regexes = [
18+
'''CKV_K8S_\d+-approved''',
19+
'''kubernetes\.io/serviceaccount-token.*''',
20+
'''abc123def456''',
21+
'''secret123''',
22+
'''test-token''',
23+
'''dummy-.*''',
24+
'''mock-.*''',
25+
]
26+
27+
commits = [
28+
'''53b2ef38d9cd5c56b655de01fe91e03837f2a487''',
29+
'''2c0bc4949c237fd9a9d6d71542f3a84f251becb9''',
30+
]
31+
32+
# Extend config - inherit from default gitleaks config but with our allowlists
33+
[extend]
34+
useDefault = true

0 commit comments

Comments
 (0)