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

Define timeout for vulnerabilities scan and platform detection #414

Merged
merged 1 commit into from
Apr 9, 2017
Merged

Define timeout for vulnerabilities scan and platform detection #414

merged 1 commit into from
Apr 9, 2017

Conversation

s7anley
Copy link
Contributor

@s7anley s7anley commented Apr 2, 2017

What did you implement:

I added configuration for timeouts inside of scan command, which were hard-coded until now. I came across issue with timeouts for platform detection when testing with servers in Europe.

How did you implement it:

By adding two new flags for scan command.

How can we verify it:

Either try connect to servers in opposite side of world with default configuration or decrease timeouts configuration to see that values are used.

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

Copy link
Contributor

@knqyf263 knqyf263 left a comment

Choose a reason for hiding this comment

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

Change the option names, please.
-timeout → -timeout-scan
-timeout-detect-platform → -timeout

@@ -776,6 +776,8 @@ scan:
[-ask-key-password]
[-debug]
[-pipe]
[-timeout]
Copy link
Contributor

Choose a reason for hiding this comment

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

-timeout → -timeout-scan

README.md Outdated
@@ -776,6 +776,8 @@ scan:
[-ask-key-password]
[-debug]
[-pipe]
[-timeout]
[-timeout-detect-platform]
Copy link
Contributor

Choose a reason for hiding this comment

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

-timeout-detect-platform → -timeout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about this suggestion, since we are in context of Scan, should be -timeout as main option related to it instead of platform detection?

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand what you mean.
However, timeout option is required not only for DetectPlatforms but also for InitServers.
So, we have three choices.

  1. -timeout(for scan) , -timeout-detect-platform , -timeout-init-servers
  2. -timeout(for scan) , -timeout-except-scan(for DetectPlatforms and InitServers)
  3. -timeout(for DetectPlatforms and InitServers), -timeout-scan(for scan)

I think No.3 is good, because InitServers is called in configtest.
It seems to be better to align the option name to -timeout with configtest and scan.

if err := scan.InitServers(); err != nil {

Do you have any other good idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After you summarised it, I guess your are right and options 3 looks good. We should try to minimise number of options to not make CLI to complex and chaotic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for understanding!
After you fix the option names, I will merge PR!

@s7anley
Copy link
Contributor Author

s7anley commented Apr 7, 2017

Fixed and rebased.

@knqyf263 knqyf263 merged commit eb2598f into future-architect:master Apr 9, 2017
@knqyf263
Copy link
Contributor

knqyf263 commented Apr 9, 2017

Many Thanks!!

@s7anley s7anley deleted the scan-timeouts branch May 29, 2017 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants