Skip to content

OS detection get unsuccessful in first run  #699

Closed
@thinksabin

Description

@thinksabin

What did you do? (required. The issue will be closed when not provided.)

vuls scan ubuntu

What did you expect to happen?

Complete scan successfully in first attempt (run)

What happened instead?

Couldn't determine OS of server. the step timeout. Or, we can cancel whole thing with ctrl+c and then again run same command "vuls scan ubuntu" and everything is fine 2nd time.

  • Current Output
    freeze in line " INFO [localhost] Detecting OS of servers... "
    Please re-run the command using -debug and provide the output below.

when used --debug, the working is normal and fine sometimes. log below:

$ vuls scan -debug ubuntu
[Aug 21 09:11:01] INFO [localhost] Start scanning
[Aug 21 09:11:01] INFO [localhost] config: /home/ubuntu/config.toml
[Aug 21 09:11:01] DEBUG [localhost] {
"logpoint": config.ServerInfo{
ServerName: “ubuntu”,
User: "vuls",
Host: “xyz”,
Port: "22",
KeyPath: "/home/ubuntu/vuls_keys/id_rsa_vuls_az",
KeyPassword: "",
CpeNames: []string{},
DependencyCheckXMLPath: "",
Containers: config.Containers{
Type: "",
Includes: []string{},
Excludes: []string{},
},
IgnoreCves: []string{},
Optional: [][]interface {}{},
Enablerepo: []string{},
Type: "",
LogMsgAnsiColor: "\x1b[33m",
Container: config.Container{
ContainerID: "",
Name: "",
Image: "",
},
Distro: config.Distro{
Family: "",
Release: "",
},
IPv4Addrs: []string{},
IPv6Addrs: []string{},
},
}
[Aug 21 09:11:01] INFO [localhost] Validating config...
[Aug 21 09:11:01] INFO [localhost] Detecting Server/Container OS...
[Aug 21 09:11:01] INFO [localhost] Detecting OS of servers...
[Aug 21 09:11:01] DEBUG [localhost] Executing... ls /etc/debian_version
[Aug 21 09:16:01] ERROR [localhost] Timed out while detecting servers
[Aug 21 09:16:01] ERROR [localhost] (1/1) Timed out: ubuntu
[Aug 21 09:16:01] ERROR [localhost] Failed to init servers: No scannable servers

Steps to reproduce the behaviour

uncertain.
vuls scan ubuntu

Configuration (MUST fill this out):

  • Go version (go version):
    go version go1.10.3 linux/amd64
  • Go environment (go env):

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build834591688=/tmp/go-build -gno-record-gcc-switches"

  • Vuls environment:

Hash : ____ vuls v0.4.2 fe582ac

To check the commit hash of HEAD
$ vuls -v

or

$ cd $GOPATH/src/github.com/future-architect/vuls
$ git rev-parse --short HEAD

  • config.toml:

  • command:

vuls scan ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions