-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve DDEX/aws interaction (#8167)
- Loading branch information
1 parent
0f38978
commit ee55257
Showing
7 changed files
with
78 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,2 @@ | ||
# used to exercise the `if command is not git command` logic below. change this to an invalid value to test printing out install message | ||
COMMAND_PREFIX='secrets' | ||
|
||
if ! git secrets > /dev/null 2>&1; then | ||
echo "Please install 'git-secrets' from https://github.com/awslabs/git-secrets and run 'git secrets --install' in the audius-protocol/ repo" | ||
exit 1 | ||
fi | ||
|
||
# git secrets --install # this needs to be run once right after install | ||
git secrets --register-aws | ||
|
||
# these are the match rules to add. by default the aws rules only match AWS access id's and keys | ||
# add any additional match strings here | ||
# rds urls | ||
git secrets --add '.*[a-z0-9]*.rds.amazonaws.com:[0-9]*\/.*' | ||
|
||
# match any postgres db with an IP hostname | ||
git secrets --add 'postgres:\/\/.*\:.*@([0-9]*\.?)*:[0-9]{4}\/.*' | ||
git secrets --add --allowed 'postgres:postgres@1\.2\.3\.4:[0-9]{4}\/.*' | ||
|
||
# scan the staged files | ||
git secrets --scan --cached $(git diff --cached --name-only) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# used to exercise the `if command is not git command` logic below. change this to an invalid value to test printing out install message | ||
COMMAND_PREFIX='secrets' | ||
|
||
if ! git secrets > /dev/null 2>&1; then | ||
echo "Please install 'git-secrets' from https://github.com/awslabs/git-secrets and run 'git secrets --install' in the audius-protocol/ repo" | ||
exit 1 | ||
fi | ||
|
||
git secrets --add --allowed 'dev-tools/config.json' | ||
git secrets --add --allowed 'scripts/install-git-secrets.sh' | ||
git secrets --add --allowed 'package.json' | ||
|
||
git secrets --register-aws | ||
# these are the match rules to add. by default the aws rules only match AWS access id's and keys | ||
# add any additional match strings here | ||
# rds urls | ||
git secrets --add '.*[a-z0-9]*.rds.amazonaws.com:[0-9]*\/.*' | ||
git secrets --add --allowed 'packages/ddex/.*/README.md:.*' | ||
|
||
# match any postgres db with an IP hostname | ||
git secrets --add 'postgres:\/\/.*\:.*@([0-9]*\.?)*:[0-9]{4}\/.*' | ||
git secrets --add --allowed 'postgres:postgres@1\.2\.3\.4:[0-9]{4}\/.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters