From 190877a24bbec1f57b97eabaa6c2217c6d2ea6f4 Mon Sep 17 00:00:00 2001 From: Zachary Rice Date: Thu, 8 Apr 2021 16:34:08 -0400 Subject: [PATCH] Pypi GitHub rules (#546) * adding pypi and basic azure rules * Adding new github format --- config/default.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/default.go b/config/default.go index 4ab1351e..6dec66d2 100644 --- a/config/default.go +++ b/config/default.go @@ -42,8 +42,8 @@ title = "gitleaks config" tags = ["client", "Twitter"] [[rules]] - description = "Github" - regex = '''(?i)github.{0,3}((?i)token|api|key).{0,10}?(?-i)([0-9a-zA-Z]{35,40})''' + description = "Github Auth Token" + regex = '''(ghp|gho|ghu|ghs|ghr)_[0-9a-zA-Z]{32-40}''' tags = ["key", "Github"] [[rules]] @@ -156,6 +156,11 @@ title = "gitleaks config" regex = '''shppa_[a-fA-F0-9]{32}''' tags = ["key", "Shopify"] +[[rules]] + description = "PyPI upload token" + regex = '''pypi-AgEIcHlwaS5vcmc[A-Za-z0-9-_]{50,1000}''' + tags = ["key", "pypi"] + [allowlist] description = "Allowlisted files" files = ['''^\.?gitleaks.toml$''',