From 8be30a0f026e3a63e2bb934aa5d43326549d4219 Mon Sep 17 00:00:00 2001 From: e551763 Date: Wed, 4 Sep 2024 15:34:08 +0200 Subject: [PATCH 1/3] chore: hook for sensitive data leak --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd9a095..0832682 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,13 @@ repos: - id: check-yaml - id: no-commit-to-branch - id: mixed-line-ending + - repo: local + hooks: + - id: sensitive-data-leak + name: Sensitive data leak hook + entry: (? Date: Fri, 11 Oct 2024 13:40:19 +0200 Subject: [PATCH 2/3] fix: regexp changed to catch all urls and u/e-numbers --- .pre-commit-config.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dda030e..29af1c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,9 +18,15 @@ repos: - id: mixed-line-ending - repo: local hooks: - - id: sensitive-data-leak - name: Sensitive data leak hook - entry: (? Date: Fri, 11 Oct 2024 14:46:24 +0200 Subject: [PATCH 3/3] fix: regexp changed to catch all urls and u/e-numbers --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29af1c4..ed245ce 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: exclude: \b(www\.|polarion-opensource@)sbb\.ch\b - id: sensitive-data-leak-ue-numbers name: Sensitive data leak - UE numbers - entry: ([uU]|[eE])\d{6} + entry: ([uUeE]{1,2})\d{5,6} language: pygrep types: [text] - repo: https://github.com/zricethezav/gitleaks