File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -445,6 +445,9 @@ like Ubuntu (BSD vs GNU).
445445You can add prohibited regular expression patterns to your git config using
446446``git secrets --add <pattern> ``.
447447
448+ You can also add prohibited regular expressions patterns to a
449+ ``.gitprohibited `` file located in the repository's root directory. Lines starting
450+ with ``# `` are skipped (comment line) and empty lines are also skipped.
448451
449452Ignoring false positives
450453------------------------
Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ prepare_commit_msg_hook* prepare-commit-msg hook (internal only)"
5252
5353load_patterns () {
5454 git config --get-all secrets.patterns
55+ local gitprohibited=" $( git rev-parse --show-toplevel) /.gitprohibited"
56+ if [ -e " $gitprohibited " ]; then
57+ cat $gitprohibited | awk ' NF && $1!~/^#/'
58+ fi
5559 # Execute each provider and use their output to build up patterns
5660 git config --get-all secrets.providers | while read -r cmd; do
5761 # Only split words on '\n\t ' and strip "\r" from the output to account
You can’t perform that action at this time.
0 commit comments