Add more instructions how to install/configure git secrets (#1202)

Signed-off-by: Anas Alkouz <aalkouz@amazon.com>

Co-authored-by: Anas Alkouz <aalkouz@amazon.com>
This commit is contained in:
Anas Alkouz 2021-09-02 14:24:12 -07:00 committed by GitHub
parent 4b31e1ba04
commit f37f29c996
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 1 deletions

View File

@ -282,14 +282,30 @@ of this is `junit`.
### git-secrets ### git-secrets
Security is our top priority. Avoid checking in credentials, install [awslabs/git-secrets](https://github.com/awslabs/git-secrets). Security is our top priority. Avoid checking in credentials.
#### Installation
Install [awslabs/git-secrets](https://github.com/awslabs/git-secrets) by running the following commands.
``` ```
git clone https://github.com/awslabs/git-secrets.git git clone https://github.com/awslabs/git-secrets.git
cd git-secrets cd git-secrets
make install make install
``` ```
#### Configuration
You can configure git secrets per repository, you need to change the directory to the root of the repository and run the following command.
```
git secrets --install
✓ Installed commit-msg hook to .git/hooks/commit-msg
✓ Installed pre-commit hook to .git/hooks/pre-commit
✓ Installed prepare-commit-msg hook to .git/hooks/prepare-commit-msg
```
Then, you need to apply patterns for git-secrets, you can install the AWS standard patterns by running the following command.
```
git secrets --register-aws
```
## Submitting Changes ## Submitting Changes
See [CONTRIBUTING](CONTRIBUTING.md). See [CONTRIBUTING](CONTRIBUTING.md).