From 4ec1d720db9f8fcf08b653b129041bd759956618 Mon Sep 17 00:00:00 2001 From: dubeanu <65345318+dubeanu@users.noreply.github.com> Date: Mon, 8 Jun 2020 10:12:08 +0100 Subject: [PATCH] Updating hook to include Keyword search "password" - Anurag --- pre-receive-hooks/block_confidentials.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pre-receive-hooks/block_confidentials.sh b/pre-receive-hooks/block_confidentials.sh index 9beceb631..e3a478861 100755 --- a/pre-receive-hooks/block_confidentials.sh +++ b/pre-receive-hooks/block_confidentials.sh @@ -26,6 +26,8 @@ regex_list=( # '([^A-Za-z0-9/+=])?([A-Za-z0-9/+=]{40})([^A-Za-z0-9/+=])?' # block confidential content 'CONFIDENTIAL' + # Block passwords by keyword "Password", allow password startign with "$,{ or (" + '(password|PASSWORD|Password)(\s?)[=:][^${(][A-Za-z0-9]' ) # Concatenate regex_list