mirror of
https://github.com/securego/gosec.git
synced 2025-11-23 22:15:04 +02:00
Adding a config block to the analyzer, parsed from JSON
A CLI option can now be given to tell GAS it should parse data from a JSON file. Fatal errors are given if the file is not readable or is not valid JSON.
This commit is contained in:
@@ -15,12 +15,13 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
gas "github.com/HewlettPackard/gas/core"
|
||||
"testing"
|
||||
|
||||
gas "github.com/HewlettPackard/gas/core"
|
||||
)
|
||||
|
||||
func TestTempfiles(t *testing.T) {
|
||||
analyzer := gas.NewAnalyzer(false, nil)
|
||||
analyzer := gas.NewAnalyzer(false, nil, nil)
|
||||
analyzer.AddRule(NewBadTempFile())
|
||||
|
||||
source := `
|
||||
|
||||
Reference in New Issue
Block a user