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:
Tomoya Amachi
2019-07-02 10:06:30 +09:00
committed by Kota Kanbe
parent 03c3189c02
commit 7b78ebbc42
6 changed files with 93 additions and 27 deletions

View File

@@ -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 {