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:
Cosmin Cojocar 2019-06-25 11:26:28 +02:00
parent f3445245a2
commit 141235719b

View file

@ -121,6 +121,16 @@ A number of global settings can be provided in a configuration file as follows:
# Run with a global configuration file # Run with a global configuration file
$ gosec -conf config.json . $ 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 ### Excluding files