retrieve ips(deep security) identifiers (#852)
* retrieve ips identifiers * fix golangci * use IPS type * fix log message * fix lockfiles config * change label * IPS : only work with fast-root mode
This commit is contained in:
committed by
Kota Kanbe
parent
03c3189c02
commit
7b78ebbc42
@@ -54,6 +54,7 @@ type osTypeInterface interface {
|
||||
setDistro(string, string)
|
||||
getDistro() config.Distro
|
||||
detectPlatform()
|
||||
detectIPSs()
|
||||
getPlatform() models.Platform
|
||||
|
||||
checkScanMode() error
|
||||
@@ -584,6 +585,28 @@ func detectPlatforms(timeoutSec int) {
|
||||
return
|
||||
}
|
||||
|
||||
// DetectIPSs detects the IPS of each servers.
|
||||
func DetectIPSs(timeoutSec int) {
|
||||
detectIPSs(timeoutSec)
|
||||
for i, s := range servers {
|
||||
if !s.getServerInfo().IsContainer() {
|
||||
util.Log.Infof("(%d/%d) %s has %d IPS integration",
|
||||
i+1, len(servers),
|
||||
s.getServerInfo().ServerName,
|
||||
len(s.getServerInfo().IPSIdentifiers),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func detectIPSs(timeoutSec int) {
|
||||
parallelExec(func(o osTypeInterface) error {
|
||||
o.detectIPSs()
|
||||
// Logging only if IPS can not be specified
|
||||
return nil
|
||||
}, timeoutSec)
|
||||
}
|
||||
|
||||
// Scan scan
|
||||
func Scan(timeoutSec int) error {
|
||||
if len(servers) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user