Update the README with an example to configure the hard-coded credentials rule

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
Cosmin Cojocar 2020-04-15 16:13:40 +02:00 committed by Cosmin Cojocar
parent 802292c54f
commit a2a40de847

View file

@ -171,6 +171,20 @@ of functions which will be skipped when auditing the not checked errors:
}
```
You can also configure the hard-coded credentials rule `G101` with additional patters, or adjust the entropy threshold:
```JSON
{
"G101": {
"pattern": "(?i)passwd|pass|password|pwd|secret|private_key|token",
"ingnore_entropy": false,
"entropy_threshold": "80.0",
"per_char_threshold": "3.0",
"trucate": "32"
}
}
```
### Dependencies
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,