-
Notifications
You must be signed in to change notification settings - Fork 397
oscap-vm - scan virtual machines and their images #175
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
Conversation
|
I just realized that I should have banned the remediation options. If I recall correctly remediation doesn't chroot and doesn't respect the OSCAP_PROBE_ROOT environment variable. |
| echo "$ oscap-vm image VM_STORAGE_IMAGE xccdf eval [options] INPUT_CONTENT" | ||
| echo "$ oscap-vm domain VM_DOMAIN xccdf eval [options] INPUT_CONTENT" | ||
| echo | ||
| echo "supported oscap xccdf eval options are:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using of ouput of oscap xccdf eval --help will be better.
When oscap add/remove any new parameter, nobody will update this script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that when implementing oscap-ssh but the problem is that this doesn't support all the options. I didn't like the idea of filtering the output of oscap xccdf eval and removing the options this doesn't support. I'd much rather provide a list of options that are for sure supported and wait for a request to add more.
Remediation doesn't work in offline mode, oscap will tell that to the user if it's attempted.
|
|
||
| # Learn more at https://www.redhat.com/archives/open-scap-list/2013-July/msg00000.html | ||
| export OSCAP_PROBE_ROOT="$(cd "$MOUNTPOINT"; pwd)" | ||
| export OSCAP_PROBE_OS_NAME="Linux" # TODO: This may be wrong! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be these values collected from the VM image, not from the host system ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, see the TODO comments :-)
If you have suggestions how to do that in a robust way I am all for it. I don't think this is critical for the first version though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have similar deficiency in oscap-docker. I think we can merge this and fix it when we know how to correct it. I like we have PRIMARY_HOST_NAME filled in oscap-docker and oscap-vm similarly.
|
LGTM. Special thanks for writing the man page! |
oscap-vm - scan virtual machines and their images
|
Thanks for the review! |
Offline SCAP scanning for VMs that are shutdown or running. Uses guestfs tools. My aim was to be as consistent as possible, the tool is similar to oscap-ssh and oscap-docker.
Example usage:
I will let the documentation speak for itself: