fix(scan): warning if err occurred while scanning ports (#1294)
[Aug 26 20:59:11] ERROR [localhost] Error on host, err: [Failed to scan Ports:
github.com/future-architect/vuls/scanner.Scanner.getScanResults.func1
/go/src/github.com/future-architect/vuls/scanner/serverapi.go:658
- dial tcp 172.19.0.1:80: connect: no route to host]
Scan Summary
================
host Error Use configtest subcommand or scan with --debug to view the details
[Aug 26 20:59:11] ERROR [localhost] Failed to scan: Failed to scan. err:
github.com/future-architect/vuls/scanner.Scanner.Scan
/go/src/github.com/future-architect/vuls/scanner/serverapi.go:103
- An error occurred on [host]
This commit is contained in:
@@ -655,7 +655,8 @@ func (s Scanner) getScanResults(scannedAt time.Time) (results models.ScanResults
|
||||
}
|
||||
if o.getServerInfo().Module.IsScanPort() {
|
||||
if err = o.scanPorts(); err != nil {
|
||||
return xerrors.Errorf("Failed to scan Ports: %w", err)
|
||||
// continue scanning
|
||||
logging.Log.Warnf("Failed to scan Ports: %w", err)
|
||||
}
|
||||
}
|
||||
if o.getServerInfo().Module.IsScanWordPress() {
|
||||
|
||||
Reference in New Issue
Block a user