Skip to content

Commit ded2d5c

Browse files
#1997 updating contributing guide regarding the detection of secrets
1 parent 11d3dcb commit ded2d5c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,27 @@ When doing testing of a code change, indicate this with a comment on the pull re
154154

155155
:heavy_check: `slcli vs list --new-feature`
156156
:x: `slcli vs list --broken-feature`
157+
158+
159+
### Secret Checking
160+
This repo uses [IBM Detect-Secrets](https://github.com/IBM/detect-secrets) to prevent secrets from being committed to the codebase. If your commit is rejected because of a secret make sure to remove the secret and try again. If you need to mark the secret as a false positive to the following:
161+
162+
```
163+
detect-secrets scan --update .secrets.baseline
164+
git add .secrets.baseline
165+
```
166+
167+
The first time you commit code, you may need to install detect-secrets, but hopefully that should be taken care of you by the git precommit hook.
168+
169+
```
170+
$> git commit --message="#1997 adding secret baseline"
171+
[INFO] Initializing environment for https://github.com/ibm/detect-secrets.
172+
[INFO] Installing environment for https://github.com/ibm/detect-secrets.
173+
[INFO] Once installed this environment will be reused.
174+
[INFO] This may take a few minutes...
175+
Detect secrets...........................................................Passed
176+
[issues1997 11d3dcb5] #1997 adding secret baseline
177+
2 files changed, 791 insertions(+)
178+
create mode 100644 .pre-commit-config.yaml
179+
create mode 100644 .secrets.baseline
180+
```

0 commit comments

Comments
 (0)