Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
daneah authored Oct 24, 2018
2 parents 5b70a6e + 8450ad7 commit bd1c65f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ by ``git`` when running ``git secrets``.
\*nix (Linux/macOS)
~~~~~~~~~~~~~~~~~

You can use the ``install`` target of the provided Makefile to install
``git secrets`` and the man page. You can customize the install path
using the PREFIX and MANPREFIX variables.
You can use the ``install`` target of the provided Makefile to install ``git secrets`` and the man page.
You can customize the install path using the PREFIX and MANPREFIX variables.

::

Expand Down Expand Up @@ -161,7 +160,7 @@ Each of these options must appear first on the command line.
in ``~/.aws/credentials`` are not found in any commit. The following
checks are added:

- AWS Access Key IDs (strings matching ``[A-Z0-9]{20}``)
- AWS Access Key IDs via ``(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}``
- AWS Secret Access Key assignments via ":" or "=" surrounded by optional
quotes
- AWS account ID assignments via ":" or "=" surrounded by optional quotes
Expand Down
2 changes: 1 addition & 1 deletion git-secrets
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ register_aws() {
local aws="(AWS|aws|Aws)?_?" quote="(\"|')" connect="\s*(:|=>|=)\s*"
local opt_quote="${quote}?"
add_config 'secrets.providers' 'git secrets --aws-provider'
add_config 'secrets.patterns' '[A-Z0-9]{20}'
add_config 'secrets.patterns' '(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'
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}"
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}"
add_config 'secrets.allowed' 'AKIAIOSFODNN7EXAMPLE'
Expand Down
2 changes: 1 addition & 1 deletion test/git-secrets.bats
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ load test_helper
repo_run git-secrets --register-aws
git config --local --get secrets.providers
repo_run git-secrets --list
echo "$output" | grep -F '[A-Z0-9]{20}'
echo "$output" | grep -F '(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'
echo "$output" | grep "AKIAIOSFODNN7EXAMPLE"
echo "$output" | grep "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}
Expand Down

0 comments on commit bd1c65f

Please sign in to comment.