Skip to content

Exit status is 0 when scanner fails to find selector ID in Benchmark #614

Description

@xprazak2

When running a scan against profile from a tailoring file and the tailoring file references a benchmark that is not in the XCCDF file, the scanner outputs the rules that could not be found:

OpenSCAP Error: Selector ID(xccdf_org.ssgproject.content_rule_firefox_preferences-on-secure_page_warning) does not exist in Benchmark.

The resulting report has all rules from XCCDF file marked as 'notselected':
arf_report.xml.gz, which makes sense, but the exit status is 0.

Steps to reproduce:

  1. Use SCAP Workbench to create a tailoring file (based on Upstream Firefog STIG), unselect at least one rule.
  2. run a scan with tailoring file created in the previous step. Supply a XCCDF file different from what was used to create tailoring file (ssg-jave-ds.xml):

oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_stig-firefox-upstream_customized --tailoring-file ssg-firefox-ds-tailored.xml --results-arf arf.xml ssg-java-ds.xml

  1. Notice there will be errors (for each rule that was deselected in tailoring).
  2. run echo $?, it will be 0

Is this intended bahavior? Why would exit status be 0, if there were clearly errors?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions