mirror of
https://github.com/securego/gosec.git
synced 2024-12-24 11:35:52 +00:00
Add some documentation for G104 whitelist configuration
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch> Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
parent
f3445245a2
commit
141235719b
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -121,6 +121,16 @@ A number of global settings can be provided in a configuration file as follows:
|
|||
# Run with a global configuration file
|
||||
$ gosec -conf config.json .
|
||||
```
|
||||
Also some rules accept configuration. For instance on rule `G104`, it is possible to define packages along with a list
|
||||
of functions which will be skipped when auditing the not checked errors:
|
||||
|
||||
```JSON
|
||||
{
|
||||
"G104": {
|
||||
"io/ioutil": ["WriteFile"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Excluding files
|
||||
|
||||
|
|
Loading…
Reference in a new issue