mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
Update the README with some details about the configuration file
fixes #269
This commit is contained in:
parent
f87af5fa72
commit
5d33e6ebe1
1 changed files with 21 additions and 0 deletions
21
README.md
21
README.md
|
@ -87,6 +87,27 @@ $ gosec -include=G101,G203,G401 ./...
|
||||||
$ gosec -exclude=G303 ./...
|
$ gosec -exclude=G303 ./...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
A number of global settings can be provided in a configuration file as follows:
|
||||||
|
|
||||||
|
```JSON
|
||||||
|
{
|
||||||
|
"global": {
|
||||||
|
"nosec": "enabled",
|
||||||
|
"audit": "enabled",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- `nosec`: this setting will overwrite all `#nosec` directives defined throughout the code base
|
||||||
|
- `audit`: runs is audit mode which enables addition checks that for normal code analysis might be too nosy
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run with a global configuration file
|
||||||
|
$ goesc -config config.json
|
||||||
|
```
|
||||||
|
|
||||||
### Excluding files
|
### Excluding files
|
||||||
|
|
||||||
gosec will ignore dependencies in your vendor directory any files
|
gosec will ignore dependencies in your vendor directory any files
|
||||||
|
|
Loading…
Reference in a new issue