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

Improve implementation around config #1122

Merged
merged 6 commits into from Jan 12, 2021
Merged

Improve implementation around config #1122

merged 6 commits into from Jan 12, 2021

Conversation

kotakanbe
Copy link
Member

@kotakanbe kotakanbe commented Jan 11, 2021

What did you implement:

Removed some flags from scan and report subcommand.

removed from scan subcmd.

		[-containers-only]	
		[-libs-only]	
		[-wordpress-only]	

removed from report subcmd.

		[-wp-ignore-inactive]	

The format of config.toml has been changed.

before

[servers]
[servers.foo]
host = "192.168.100.1"
user = "kanbe"
keyPath = "/home/ubuntu/.ssh/id_rsa"

[servers.foo.wordpress]
osUser = "kusanagi"
docRoot = "/home/kusanagi/yokota/DocumentRoot/"
cmdPath = "/usr/local/bin/wp"
wpVulnDBToken = "TOKEN"
IgnoreInactive = false

after

[wpscan]
token = "Token"
detectInactive = false

[servers]
[servers.foo]
host = "192.168.100.1"
user = "kanbe"
keyPath = "/home/ubuntu/.ssh/id_rsa"
scanModules = ["ospkg", "wordpress", "lockfile", "port"]
containersOnly = false

[servers.foo.wordpress]
osUser = "kusanagi"
docRoot = "/home/kusanagi/yokota/DocumentRoot/"
cmdPath = "/usr/local/bin/wp"

scanMode

The following values can be specified for scanMode.
If omitted, it is equivalent to specifying all.

scanModules = ["ospkg", "wordpress", "lockfile", "port"].

For example, if you want to detect only wordPress vulnerabilities, specify the following.

scanModules = ["wordpress"]

if you want to detect vulnerabilities in OS packages and listening ports, specify the following

scanModules = ["ospkg", "port"]

If you want to specify a lockfile and scan only libraries, specify the following.

[servers.localgem]
type = "pseudo"
lockfiles = [
  "/home/ubuntu/work/redmine/Gemfile.lock"
]

If scanModules omitted, it will have the same meaning as scanModules = ["ospkg", "wordpress", "lockfile", "port"].
But since type="pseudo" in the above example, only the detection of lockfile is executed.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

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

@kotakanbe kotakanbe changed the title Config Improve implementation around config Jan 12, 2021
@kotakanbe kotakanbe marked this pull request as ready for review January 12, 2021 23:14
@kotakanbe kotakanbe merged commit 0b55f94 into master Jan 12, 2021
@kotakanbe kotakanbe deleted the config branch January 13, 2021 00:18
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.

None yet

1 participant