Change container scan setting in config.toml
This commit is contained in:
@@ -339,7 +339,7 @@ type ServerInfo struct {
|
||||
DependencyCheckXMLPath string
|
||||
|
||||
// Container Names or IDs
|
||||
Containers []string
|
||||
Containers Containers
|
||||
|
||||
IgnoreCves []string
|
||||
|
||||
@@ -394,10 +394,16 @@ func (s *ServerInfo) SetContainer(d Container) {
|
||||
s.Container = d
|
||||
}
|
||||
|
||||
// Containers has Containers information.
|
||||
type Containers struct {
|
||||
Type string
|
||||
Includes []string
|
||||
Excludes []string
|
||||
}
|
||||
|
||||
// Container has Container information.
|
||||
type Container struct {
|
||||
ContainerID string
|
||||
Name string
|
||||
Type string
|
||||
Image string
|
||||
}
|
||||
|
||||
@@ -127,12 +127,10 @@ func (c TOMLLoader) Load(pathToToml, keyPass string) error {
|
||||
}
|
||||
|
||||
s.Containers = v.Containers
|
||||
if len(s.Containers) == 0 {
|
||||
if len(s.Containers.Includes) == 0 {
|
||||
s.Containers = d.Containers
|
||||
}
|
||||
|
||||
s.Container.Type = v.Container.Type
|
||||
|
||||
s.IgnoreCves = v.IgnoreCves
|
||||
for _, cve := range d.IgnoreCves {
|
||||
found := false
|
||||
|
||||
Reference in New Issue
Block a user