build(deps): bump github.com/securego/gosec/v2 from 2.8.1 to 2.9.1 (#2299)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2021-10-19 00:20:49 +02:00 committed by GitHub
parent 680f3e6c8e
commit 6edca924d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 13 deletions

View file

@ -294,9 +294,10 @@ type GoModGuardSettings struct {
}
type GoSecSettings struct {
Includes []string
Excludes []string
Config map[string]interface{} `mapstructure:"config"`
Includes []string
Excludes []string
ExcludeGenerated bool `mapstructure:"exclude-generated"`
Config map[string]interface{} `mapstructure:"config"`
}
type GovetSettings struct {

View file

@ -54,7 +54,7 @@ func NewGosec(settings *config.GoSecSettings) *goanalysis.Linter {
nil,
).WithContextSetter(func(lintCtx *linter.Context) {
analyzer.Run = func(pass *analysis.Pass) (interface{}, error) {
gosecAnalyzer := gosec.NewAnalyzer(gasConfig, true, logger)
gosecAnalyzer := gosec.NewAnalyzer(gasConfig, true, settings.ExcludeGenerated, logger)
gosecAnalyzer.LoadRules(ruleDefinitions.Builders())
pkg := &packages.Package{