From 877a7e18ac91f70e40b3f34dcac98f302a517419 Mon Sep 17 00:00:00 2001 From: Phong Nguyen Date: Tue, 23 Jul 2024 20:32:32 +0700 Subject: [PATCH] gitleaks --- tools/gitleaks/gitleaks.toml | 11 +++++++++++ tools/gitleaks/pre-commit | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 tools/gitleaks/gitleaks.toml create mode 100644 tools/gitleaks/pre-commit diff --git a/tools/gitleaks/gitleaks.toml b/tools/gitleaks/gitleaks.toml new file mode 100644 index 00000000..914b4303 --- /dev/null +++ b/tools/gitleaks/gitleaks.toml @@ -0,0 +1,11 @@ +title = "gitleaks config" + +[[rules]] + id = "Storage.Amazon.AccessKeyID" + description = "Storage.Amazon.AccessKeyID" + regex = '''Abc.{5,20}Xyz''' + +[[rules]] + id = "Storage.Amazon.SecretAccessKey" + description = "Storage.Amazon.SecretAccessKey" + regex = '''Abc.{5,100}Xyz''' diff --git a/tools/gitleaks/pre-commit b/tools/gitleaks/pre-commit new file mode 100644 index 00000000..683d9246 --- /dev/null +++ b/tools/gitleaks/pre-commit @@ -0,0 +1,2 @@ +#!/bin/sh +exec gitleaks protect -v --staged --config tools/gitleaks/gitleaks.toml \ No newline at end of file