Skip to content

Commit 1412357

Browse files
committed
Add some documentation for G104 whitelist configuration
Signed-off-by: Cosmin Cojocar <[email protected]> Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent f344524 commit 1412357

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ A number of global settings can be provided in a configuration file as follows:
121121
# Run with a global configuration file
122122
$ gosec -conf config.json .
123123
```
124+
Also some rules accept configuration. For instance on rule `G104`, it is possible to define packages along with a list
125+
of functions which will be skipped when auditing the not checked errors:
126+
127+
```JSON
128+
{
129+
"G104": {
130+
"io/ioutil": ["WriteFile"]
131+
}
132+
}
133+
```
124134

125135
### Excluding files
126136

0 commit comments

Comments
 (0)