Perform evaluation of XCCDF document file given as
INPUT_FILE. Print result of each rule to standard output, including rule
title, rule id and security identifier(CVE, CCE). Optionally you can give an
SCAP source data stream as the INPUT_FILE instead of an XCCDF file (see
--datastream-id).
oscap returns 0 if all rules pass. If there is an error during
evaluation, the return code is 1. If there is at least one rule with either
fail or unknown result, oscap finishes with return code 2.
Unless --skip-validation (--skip-valid) is used, the INPUT_FILE is
validated using XSD schemas (depending on document type of INPUT_FILE) and
rejected if invalid.
You may specify OVAL Definition files as the last parameter, XCCDF
evaluation will then proceed only with those specified files. Otherwise,
when oval-definitions-files parameter is missing, oscap tool will try
to load all OVAL Definition files referenced from XCCDF automatically
(search in the same path as XCCDF).
- --profile
PROFILE
Select a particular profile from XCCDF document. If
"(all)" is given a virtual profile that selects all groups and rules
will be used.
- --rule RULE
Select a particular rule from XCCDF document. Only this
rule will be evaluated. Any other rules required by this rule won't be
evaluated. Rule will use values according to the selected profile. If no
profile is selected, default values are used. This option can be used multiple
times to specify multiple rules at once.
- --skip-rule
RULE
Skip a particular rule from XCCDF document. This option
can be used multiple times to skip multiple rules at once.
- --tailoring-file
TAILORING_FILE
Use given file for XCCDF tailoring. Select profile from
tailoring file to apply using --profile. If both --tailoring-file and
--tailoring-id are specified, --tailoring-file takes priority.
- --tailoring-id
COMPONENT_REF_ID
Use tailoring component in input source data stream for
XCCDF tailoring. The tailoring component must be specified by its Ref-ID
(value of component-ref/@id attribute in input source data stream). Select
profile from tailoring component to apply using --profile. If both
--tailoring-file and --tailoring-id are specified, --tailoring-file takes
priority.
- --cpe
CPE_FILE
Use given CPE dictionary or language (auto-detected) for
applicability checks. (Some CPE names are provided by openscap, see oscap
--version for inbuilt CPE names)
- --results
FILE
Write XCCDF results into FILE.
- --results-arf
FILE
Writes results to a given FILE in Asset Reporting Format.
It is recommended to use this option instead of --results when dealing with
data streams.
- --stig-viewer
FILE
Writes XCCDF results into FILE. The rule result IDs in
FILE are modified according to STIG references in evaluated content. The FILE
can be simply imported into DISA STIG Viewer. See
https://public.cyber.mil/stigs/srg-stig-tools/ for information about
DISA STIG Viewer.
- --thin-results
Thin Results provides only minimal amount of information
in OVAL/ARF results. The option --without-syschar is automatically enabled
when you use Thin Results.
- --without-syschar
Don't provide system characteristics in OVAL/ARF result
files.
- --report
FILE
Write HTML report into FILE.
- --oval-results
Generate OVAL Result file for each OVAL session used for
evaluation. File with name
'original-oval-definitions-filename.result.xml' will be generated for
each referenced OVAL file in current working directory. To change the
directory where OVAL files are generated change the CWD using the `cd`
command.
- --check-engine-results
After evaluation is finished, each loaded check engine
plugin is asked to export its results. The export itself is plugin specific,
please refer to documentation of the plugin for more details.
- --export-variables
Generate OVAL Variables documents which contain external
variables' values that were provided to the OVAL checking engine during
evaluation. The filename format is
'original-oval-definitions-filename-session-index.variables-variables-index.xml'.
- --datastream-id
ID
Uses a data stream with that particular ID from the given
data stream collection. If not given the first data stream is used. Only
applies if you give source data stream in place of an XCCDF file.
- --xccdf-id
ID
Takes component ref with given ID from checklists. This
allows one to select a particular XCCDF component even in cases where there
are multiple XCCDFs in a single data stream. If none is given, the first
component from the checklists element is used.
- --benchmark-id
ID
Selects a component ref from any data stream that
references a component with XCCDF Benchmark such that its @id attribute
matches given string exactly. Please note that this is not the recommended way
of selecting a component-ref. You are advised to use --xccdf-id AND/OR
--datastream-id for more precision. --benchmark-id is only used when both
--xccdf-id and --datastream-id are not present on the command line!
- --skip-valid,
--skip-validation
Do not validate input/output files.
- --skip-signature-validation
Do not validate digital signatures in digitally signed
SCAP source data streams.
- --enforce-signature
Process only digitally signed SCAP source data streams.
Data streams without a signature would be rejected if this switch is
used.
- --fetch-remote-resources
Allow download of remote OVAL content referenced from
XCCDF by check-content-ref/@href.
- --local-files
DIRECTORY
Instead of downloading remote data stream components from
the network, use data stream components stored locally as files in the given
directory. In place of the remote data stream component OpenSCAP will attempt
to use a file whose file name is equal to @name attribute of the uri element
within the catalog element within the component-ref element in the data stream
if such file exists.
- --remediate
Execute XCCDF remediation in the process of XCCDF
evaluation. This option automatically executes content of XCCDF fix elements
for failed rules, and thus this shall be avoided unless for trusted content.
Use of this option is always at your own risk.
This module provides post-scan remediation. It assumes
that the INPUT_FILE is result of `oscap xccdf eval` operation. The input file
must contain TestResult element. This module executes XCCDF fix elements for
failed rule-result contained in the given TestResult. Use of this option is
always at your own risk and it shall be avoided unless for trusted content.
- --result-id
ID
ID of the XCCDF TestResult element which shall be
remedied. If this option is missing the last TestResult (in top-down
processing) will be remedied.
- --skip-valid,
--skip-validation
Do not validate input/output files.
- --fetch-remote-resources
Allow download of remote OVAL content referenced from
XCCDF by check-content-ref/@href.
- --local-files
DIRECTORY
Instead of downloading remote data stream components from
the network, use data stream components stored locally as files in the given
directory. In place of the remote data stream component OpenSCAP will attempt
to use a file whose file name is equal to @name attribute of the uri element
within the catalog element within the component-ref element in the data stream
if such file exists.
- --cpe
CPE_FILE
Use given CPE dictionary or language (auto-detected) for
applicability checks.
- --results
FILE
Write XCCDF results into FILE.
- --results-arf
FILE
Writes results to a given FILE in Asset Reporting Format.
It is recommended to use this option instead of --results when dealing with
data streams.
- --stig-viewer
FILE
Writes XCCDF results into FILE. The rule result IDs in
FILE are modified according to STIG references in evaluated content. The FILE
can be simply imported into DISA STIG Viewer. See
https://public.cyber.mil/stigs/srg-stig-tools/ for information about
DISA STIG Viewer.
- --report
FILE
Write HTML report into FILE.
- --oval-results
Generate OVAL Result file for each OVAL session used for
evaluation. File with name
'original-oval-definitions-filename.result.xml' will be generated for
each referenced OVAL file.
- --check-engine-results
After evaluation is finished, each loaded check engine
plugin is asked to export its results. The export itself is plugin specific,
please refer to documentation of the plugin for more details.
- --export-variables
Generate OVAL Variables documents which contain external
variables' values that were provided to the OVAL checking engine during
evaluation. The filename format is
'original-oval-definitions-filename-session-index.variables-variables-index.xml'.
- --progress
Switch to sparse output suitable for progress reporting.
Format of the output is "$rule_id:$result\n".
- --progress-full
Switch to sparse but a bit more saturated output also
suitable for progress reporting. Format of the output is
"$rule_id|$rule_title|$result\n".
Collect all the XCCDF values that would be used by OVAL
during evaluation of a certain profile and export them as OVAL
external-variables document(s). The filename format is
'
original-oval-definitions-filename-
session-index.variables-
variables-index.xml'.
- --profile
PROFILE
Select a particular profile from XCCDF document.
- --fetch-remote-resources
Allow download of remote OVAL content referenced from
XCCDF by check-content-ref/@href.
- --local-files
DIRECTORY
Instead of downloading remote data stream components from
the network, use data stream components stored locally as files in the given
directory. In place of the remote data stream component OpenSCAP will attempt
to use a file whose file name is equal to @name attribute of the uri element
within the catalog element within the component-ref element in the data stream
if such file exists.
- --skip-valid,
--skip-validation
Do not validate input/output files.
- --datastream-id
ID
Uses a data stream with that particular ID from the given
data stream collection. If not given the first data stream is used. Only
applies if you give an SCAP source data stream in place of an XCCDF
file.
- --xccdf-id
ID
Takes component ref with given ID from checklists. This
allows one to select a particular XCCDF component even in cases where there
are 2 XCCDFs in one data stream.
- --benchmark-id
ID
Selects a component ref from any data stream that
references a component with XCCDF Benchmark such that its @id attribute
matches given string exactly. Please note that this is not the recommended way
of selecting a component-ref. You are advised to use --xccdf-id AND/OR
--datastream-id for more precision. --benchmark-id is only used when both
--xccdf-id and --datastream-id are not present on the command line!
- --cpe
CPE_FILE
Use given CPE dictionary or language (auto-detected) for
applicability checks. The variables documents are created only for xccdf:Rules
which are applicable.