Change default ssh method from go library to external command (#416)
* Change default ssh method from go library to external command
This commit is contained in:
committed by
Teppei Fukuda
parent
33b2aa2d52
commit
05884c2d29
@@ -44,7 +44,7 @@ type Config struct {
|
||||
CvssScoreOver float64
|
||||
IgnoreUnscoredCves bool
|
||||
|
||||
SSHExternal bool
|
||||
SSHNative bool
|
||||
ContainersOnly bool
|
||||
SkipBroken bool
|
||||
|
||||
@@ -82,8 +82,8 @@ type Config struct {
|
||||
func (c Config) ValidateOnConfigtest() bool {
|
||||
errs := []error{}
|
||||
|
||||
if runtime.GOOS == "windows" && c.SSHExternal {
|
||||
errs = append(errs, fmt.Errorf("-ssh-external cannot be used on windows"))
|
||||
if runtime.GOOS == "windows" && !c.SSHNative {
|
||||
errs = append(errs, fmt.Errorf("-ssh-native-insecure is needed on windows"))
|
||||
}
|
||||
|
||||
_, err := valid.ValidateStruct(c)
|
||||
@@ -114,8 +114,8 @@ func (c Config) ValidateOnScan() bool {
|
||||
}
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" && c.SSHExternal {
|
||||
errs = append(errs, fmt.Errorf("-ssh-external cannot be used on windows"))
|
||||
if runtime.GOOS == "windows" && !c.SSHNative {
|
||||
errs = append(errs, fmt.Errorf("-ssh-native-insecure is needed on windows"))
|
||||
}
|
||||
|
||||
if len(c.ResultsDir) != 0 {
|
||||
|
||||
Reference in New Issue
Block a user