Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable -timeout option when detecting OS #410

Merged
merged 1 commit into from
Apr 22, 2017

Conversation

knqyf263
Copy link
Contributor

What did you implement:

I got the following error.

$ vuls configtest
[Mar 31 20:12:18]  INFO [localhost] Validating config...
[Mar 31 20:12:18]  INFO [localhost] Detecting Server/Container OS...
[Mar 31 20:12:18]  INFO [localhost] Detecting OS of servers...
[Mar 31 20:12:28] ERROR [localhost] Timed out while detecting servers
[Mar 31 20:12:28] ERROR [localhost] (1/1) Timed out: ubuntu1404
[Mar 31 20:12:28] ERROR [localhost] Failed to init servers: No scannable servers
exit status 1

The timeout for detecting server OS is hard coded to 30 seconds.
https://github.com/future-architect/vuls/blob/master/scan/serverapi.go#L156
https://github.com/future-architect/vuls/blob/master/scan/serverapi.go#L218

I fixed this.

How did you implement it:

For configtest, -timeout option has already implemented, so I used it.
For scan, I added -timeout option.

How can we verify it:

$ vuls configtest -timeout 120
$ vuls scan -timeout 120

Todos:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@knqyf263 knqyf263 force-pushed the enable_timeout branch 2 times, most recently from 2db76f3 to dca890d Compare April 9, 2017 07:42
@knqyf263 knqyf263 requested a review from kotakanbe April 9, 2017 08:57
Copy link
Member

@kotakanbe kotakanbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kotakanbe kotakanbe merged commit 5bf4cd4 into future-architect:master Apr 22, 2017
@kotakanbe
Copy link
Member

Many Thanks!

lapthorn pushed a commit to lapthorn/vuls that referenced this pull request May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants