File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ by ``git`` when running ``git secrets``.
4141\* nix (Linux/macOS)
4242~~~~~~~~~~~~~~~~~
4343
44- You can use the ``install `` target of the provided Makefile to install
45- ``git secrets `` and the man page. You can customize the install path
46- using the PREFIX and MANPREFIX variables.
44+ You can use the ``install `` target of the provided Makefile to install ``git secrets `` and the man page.
45+ You can customize the install path using the PREFIX and MANPREFIX variables.
4746
4847::
4948
@@ -161,7 +160,7 @@ Each of these options must appear first on the command line.
161160 in ``~/.aws/credentials `` are not found in any commit. The following
162161 checks are added:
163162
164- - AWS Access Key IDs (strings matching `` [A-Z0-9]{20 } ``)
163+ - AWS Access Key IDs via `` (A3T [A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16 } ``
165164 - AWS Secret Access Key assignments via ":" or "=" surrounded by optional
166165 quotes
167166 - AWS account ID assignments via ":" or "=" surrounded by optional quotes
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ register_aws() {
235235 local aws=" (AWS|aws|Aws)?_?" quote=" (\" |')" connect=" \s*(:|=>|=)\s*"
236236 local opt_quote=" ${quote} ?"
237237 add_config ' secrets.providers' ' git secrets --aws-provider'
238- add_config ' secrets.patterns' ' [A-Z0-9]{20 }'
238+ add_config ' secrets.patterns' ' (A3T [A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16 }'
239239 add_config ' secrets.patterns' " ${opt_quote}${aws} (SECRET|secret|Secret)?_?(ACCESS|access|Access)?_?(KEY|key|Key)${opt_quote}${connect}${opt_quote} [A-Za-z0-9/\+=]{40}${opt_quote} "
240240 add_config ' secrets.patterns' " ${opt_quote}${aws} (ACCOUNT|account|Account)_?(ID|id|Id)?${opt_quote}${connect}${opt_quote} [0-9]{4}\-?[0-9]{4}\-?[0-9]{4}${opt_quote} "
241241 add_config ' secrets.allowed' ' AKIAIOSFODNN7EXAMPLE'
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ load test_helper
278278 repo_run git-secrets --register-aws
279279 git config --local --get secrets.providers
280280 repo_run git-secrets --list
281- echo " $output " | grep -F ' [A-Z0-9]{20 }'
281+ echo " $output " | grep -F ' (A3T [A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16 }'
282282 echo " $output " | grep " AKIAIOSFODNN7EXAMPLE"
283283 echo " $output " | grep " wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
284284}
You can’t perform that action at this time.
0 commit comments