ソースを参照

fix regexp for aws_key and slack_webhook (#754)

Andrzej Amghar 4 年 前
コミット
f4d37a2c0d
1 ファイル変更2 行追加2 行削除
  1. 2 2
      config/gitleaks.toml

+ 2 - 2
config/gitleaks.toml

@@ -37,7 +37,7 @@ regex = '''glpat-[0-9a-zA-Z\-]{20}'''
 [[rules]]
 id = "aws-access-token"
 description = "AWS"
-regex = '''AKIA[0-9A-Z]{16}'''
+regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
 
 # Cryptographic keys
 [[rules]]
@@ -140,7 +140,7 @@ secretGroup = 3
 [[rules]]
 id = "slack-web-hook"
 description = "Slack Webhook"
-regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}'''
+regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8,12}/[a-zA-Z0-9_]{24}'''
 
 [[rules]]
 id = "twilio-api-key"