Skip to content

Commit a2a40de

Browse files
ccojocarCosmin Cojocar
authored andcommitted
Update the README with an example to configure the hard-coded credentials rule
Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent 802292c commit a2a40de

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,20 @@ of functions which will be skipped when auditing the not checked errors:
171171
}
172172
```
173173

174+
You can also configure the hard-coded credentials rule `G101` with additional patters, or adjust the entropy threshold:
175+
176+
```JSON
177+
{
178+
"G101": {
179+
"pattern": "(?i)passwd|pass|password|pwd|secret|private_key|token",
180+
"ingnore_entropy": false,
181+
"entropy_threshold": "80.0",
182+
"per_char_threshold": "3.0",
183+
"trucate": "32"
184+
}
185+
}
186+
```
187+
174188
### Dependencies
175189

176190
gosec will fetch automatically the dependencies of the code which is being analyzed when go module is turned on (e.g.` GO111MODULE=on`). If this is not the case,

0 commit comments

Comments
 (0)