Skip to content

Commit 7490d3c

Browse files
authored
Merge pull request #4 from cloudbees/upgrade_from_upstream
[PRODSEC-4106] updates from upstream
2 parents f639503 + 24622b3 commit 7490d3c

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ Each of these options must appear first on the command line.
163163
checks are added:
164164

165165
- AWS Access Key IDs via ``(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}``
166+
- Amazon Bedrock API keys. Long-lived via ``ABSK[A-Za-z0-9+/]{109,}=*`` and short-lived via ``bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t``
166167
- AWS Secret Access Key assignments via ":" or "=" surrounded by optional
167168
quotes
168169
- AWS account ID assignments via ":" or "=" surrounded by optional quotes

git-secrets

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ register_aws() {
270270
local opt_quote="${quote}?"
271271
add_config 'secrets.providers' 'git secrets --aws-provider'
272272
add_config 'secrets.patterns' '(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'
273+
add_config 'secrets.patterns' 'ABSK[A-Za-z0-9+/]{109,}=*' #Bedrock long-lived - https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html
274+
add_config 'secrets.patterns' 'bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t' #Bedrock short-lived - https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys-generate.html
273275
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}"
274276
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}"
275277
add_config 'secrets.allowed' 'AKIAIOSFODNN7EXAMPLE'
@@ -391,9 +393,9 @@ case "${COMMAND}" in
391393
--scan-history) scan_with_fn_or_die "scan_history" "$@" ;;
392394
--list)
393395
if [ ${GLOBAL} -eq 1 ]; then
394-
git config --global --get-regex secrets.*
396+
git config --global --get-regex 'secrets.*'
395397
else
396-
git config --get-regex secrets.*
398+
git config --get-regex 'secrets.*'
397399
fi
398400
;;
399401
--install)

git-secrets.1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ checks are added:
276276
.IP \(bu 2
277277
AWS Access Key IDs via \fB(A3T[A\-Z0\-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A\-Z0\-9]{16}\fP
278278
.IP \(bu 2
279+
Amazon Bedrock API keys. Long\-lived via \fBABSK[A-Za-z0-9+/]{109,}=*\fP and short\-lived via \fBbedrock\-api\-key\-YmVkcm9jay5hbWF6b25hd3MuY29t\fP
280+
.IP \(bu 2
279281
AWS Secret Access Key assignments via ":" or "=" surrounded by optional
280282
quotes
281283
.IP \(bu 2

test/git-secrets.bats

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ load test_helper
281281
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"
284+
echo "$output" | grep -F 'ABSK[A-Za-z0-9+/]{109,}=*'
285+
echo "$output" | grep -F 'bedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t'
284286
}
285287

286288
@test "Adds providers" {

0 commit comments

Comments
 (0)