Skip to content

Commit 56bb489

Browse files
committed
add secret scan
1 parent d2c3a8d commit 56bb489

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

.gitleaks.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[extend]
2+
useDefault = true
3+
4+
[[rules]]
5+
id = "aklt-key-pattern"
6+
description = "AKLT key pattern"
7+
regex = '''AKLT\w{40,70}'''
8+
9+
[[rules]]
10+
id = "akap-key-pattern"
11+
description = "AKAP key pattern"
12+
regex = '''AKAP\w{40,70}'''
13+
14+
[[rules]]
15+
id = "akip-key-pattern"
16+
description = "AKIP key pattern"
17+
regex = '''AKI\w{40,70}'''
18+
19+
[[rules]]
20+
id = "token-transformer-id-pattern"
21+
description = "Tokenizer/Transformer/Token ID patterns"
22+
regex = '''(tokenizer|transformer|token_id|tokenid|attention_head).{0,20}'''
23+
24+
[[rules]]
25+
id = "aws-style-key-pattern"
26+
description = "AWS-style key pattern"
27+
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
28+
29+
[[rules]]
30+
id = "alibaba-ltai-pattern"
31+
description = "Alibaba LTAI key pattern"
32+
regex = '''(LTAI)[a-z0-9]{20}'''
33+
34+
[[rules]]
35+
id = "aktp-key-pattern"
36+
description = "AKTP key pattern"
37+
regex = '''AKTP\w{40,70}'''
38+
39+
[[rules]]
40+
id = "app-id-pattern"
41+
description = "App ID patterns"
42+
regex = '''([^*<\s|:>]{0,7})(app_id|appid)([^]()!<>;/@&,]{0,10}[(=:]\s{0,6}["']{0,1}[0-9]{6,32}["']{0,1})'''
43+
44+
[[rules]]
45+
id = "byted-org-domains"
46+
description = "byted.org domains"
47+
regex = '''.{0,15}\.?byted.org.{0,20}'''
48+
49+
[[rules]]
50+
id = "bytedance-net-domains"
51+
description = "bytedance.net domains"
52+
regex = '''.{0,15}\.?bytedance.net.{0,20}'''
53+
54+
[[rules]]
55+
id = "feishu-cn-domains"
56+
description = "bytedance.feishu.cn domains"
57+
regex = '''.{0,20}.bytedance\.feishu\.cn.{0,50}'''
58+
59+
[[rules]]
60+
id = "larkoffice-com-domains"
61+
description = "bytedance.larkoffice.com domains"
62+
regex = '''.{0,20}.bytedance\.larkoffice\.com.{0,50}'''
63+
64+
[[rules]]
65+
id = "private-ip-10-range"
66+
description = "Private IP address pattern (10.x.x.x)"
67+
regex = '''(10\.\d{1,3}\.\d{1,3}\.\d{1,3})'''

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ repos:
99
args: [ --fix ]
1010
# Run the formatter.
1111
- id: ruff-format
12-
types_or: [ python, pyi ]
12+
types_or: [ python, pyi ]
13+
- repo: https://github.com/gitleaks/gitleaks
14+
rev: v8.24.2
15+
hooks:
16+
- id: gitleaks

0 commit comments

Comments
 (0)