mirror of
https://github.com/securego/gosec.git
synced 2025-11-29 22:37:59 +02:00
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:
committed by
Cosmin Cojocar
parent
802292c54f
commit
a2a40de847
14
README.md
14
README.md
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user