Blame utils/oscap.8

Packit Bot 61bab5
.TH OSCAP "8" "March 2021" "Red Hat" "System Administration Utilities"
Packit 517ee8
Packit 517ee8
.SH NAME
Packit 517ee8
oscap \- OpenSCAP command line tool
Packit 517ee8
Packit 517ee8
.SH SYNOPSIS
Packit 517ee8
\fBoscap\fR [\fIgeneral-options\fR] \fBmodule\fR operation [\fIoperation-options-and-arguments\fR]
Packit 517ee8
Packit 517ee8
.SH DESCRIPTION
Packit Bot 61bab5
\fBoscap\fP is Security Content Automation Protocol (SCAP) toolkit based on OpenSCAP library. It provides various functions for different SCAP specifications (modules).
Packit 517ee8
Packit 517ee8
OpenSCAP tool claims to provide capabilities of Authenticated Configuration Scanner and Authenticated Vulnerability Scanner as defined by The National Institute of Standards and Technology.
Packit 517ee8
Packit 517ee8
.SH GENERAL OPTIONS
Packit 517ee8
.TP
Packit 517ee8
\fB\-V, -\-version\fR
Packit 517ee8
Print supported SCAP specifications, location of schema files, schematron files, CPE files, probes and supported OVAL objects.
Packit 517ee8
Displays a list of inbuilt CPE names.
Packit 517ee8
.TP
Packit 517ee8
\fB\-h, \-\-help\fR
Packit 517ee8
Help screen.
Packit 517ee8
Packit 517ee8
.SH MODULES
Packit 517ee8
.TP
Packit 517ee8
\fBinfo\fR
Packit 517ee8
Determine type and print information about a file.
Packit 517ee8
.TP
Packit 517ee8
\fBxccdf\fR
Packit 517ee8
The eXtensible Configuration Checklist Description Format.
Packit 517ee8
.TP
Packit 517ee8
\fBoval\fR
Packit 517ee8
Open Vulnerability and Assessment Language.
Packit 517ee8
.TP
Packit 517ee8
\fBds\fR
Packit 517ee8
SCAP Data Stream
Packit 517ee8
.TP
Packit 517ee8
\fBcpe\fR
Packit 517ee8
Common Platform Enumeration.
Packit 517ee8
.TP
Packit 517ee8
\fBcvss\fR
Packit 517ee8
Common Vulnerability Scoring System
Packit 517ee8
.TP
Packit 517ee8
\fBcve\fR
Packit 517ee8
Common Vulnerabilities and Exposures
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fBcvrf\fR
Packit Bot 61bab5
Common Vulnerability Reporting Framework
Packit 517ee8
Packit 517ee8
.SH COMMON OPTIONS FOR ALL MODULES
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-verbose VERBOSITY_LEVEL\fR
Packit 517ee8
.RS
Packit 517ee8
Turn on verbose mode at specified verbosity level. VERBOSITY_LEVEL is one of: DEVEL, INFO, WARNING, ERROR.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-verbose-log-file FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Set filename to write additional information.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH INFO OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
[\fIoptions\fR] any-scap-file.xml
Packit 517ee8
.RS
Packit 517ee8
This module prints information about SCAP content in a file specified on a command line. It determines SCAP content type, specification version, date of creation, date of import and so on. Info module doesn't require any additional operation switch.
Packit 517ee8
Packit Bot 61bab5
For XCCDF or SCAP source data stream files, the info module prints out IDs of incorporated profiles, components, and data streams. These IDs can be used to specify the target for evaluation. Use options --profile, --xccdf-id (or --oval-id), and --datastream-id respectively.
Packit 517ee8
.PP
Packit 517ee8
\fB\-\-fetch-remote-resources\fR
Packit 517ee8
.RS
Packit Bot 61bab5
Allow download of remote components referenced from data stream.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-profile PROFILE\fR
Packit 517ee8
.RS
Packit 517ee8
Show info of the profile with the given ID.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-profiles\fR
Packit 517ee8
.RS
Packit 517ee8
Show profiles from the input file in the <id>:<title> format, one line per profile.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH XCCDF OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
.B \fBeval\fR [\fIoptions\fR] INPUT_FILE [\fIoval-definitions-files\fR]
Packit 517ee8
.RS
Packit Bot 61bab5
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).
Packit 517ee8
.PP
Packit Bot 61bab5
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.
Packit 517ee8
.PP
Packit 517ee8
.PP
Packit Bot 61bab5
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.
Packit 517ee8
.PP
Packit 517ee8
You may specify OVAL Definition files as the last parameter, XCCDF evaluation will then proceed only with those specified files. Otherwise, when \fIoval-definitions-files\fR parameter is missing, oscap tool will try to load all OVAL Definition files referenced from XCCDF automatically (search in the same path as XCCDF).
Packit 517ee8
.PP
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-profile PROFILE\fR
Packit 517ee8
.RS
Packit 517ee8
Select a particular profile from XCCDF document. If "(all)" is given a virtual profile that selects all groups and rules will be used.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-rule RULE\fR
Packit 517ee8
.RS
Packit 517ee8
Select a particular rule from XCCDF document. Only this rule will be evaluated. Rule will use values according to the selected profile. If no profile is selected, default values are used.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-tailoring-file TAILORING_FILE\fR
Packit 517ee8
.RS
Packit 517ee8
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-tailoring-id COMPONENT_REF_ID\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-cpe CPE_FILE\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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)
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-results FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Write XCCDF results into FILE.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-results-arf FILE\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-stig-viewer FILE\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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 \fIhttps://public.cyber.mil/stigs/srg-stig-tools/\fR for information about DISA STIG Viewer.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-thin-results\fR
Packit 517ee8
.RS
Packit 517ee8
Thin Results provides only minimal amount of information in OVAL/ARF results. The option --without-syschar is automatically enabled when you use Thin Results.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-without-syschar\fR
Packit 517ee8
.RS
Packit 517ee8
Don't provide system characteristics in OVAL/ARF result files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-report FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Write HTML report into FILE.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-oval-results\fR
Packit 517ee8
.RS
Packit 517ee8
Generate OVAL Result file for each OVAL session used for evaluation. File with name '\fIoriginal-oval-definitions-filename\fR.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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-check-engine-results\fR
Packit 517ee8
.RS
Packit 517ee8
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-export-variables\fR
Packit 517ee8
.RS
Packit 517ee8
Generate OVAL Variables documents which contain external variables' values that were provided to the OVAL checking engine during evaluation. The filename format is '\fIoriginal-oval-definitions-filename\fR-\fIsession-index\fR.variables-\fIvariables-index\fR.xml'.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-datastream-id ID\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-xccdf-id ID\fR
Packit 517ee8
.RS
Packit Bot 61bab5
Takes component ref with given ID from checklists. This allows to select a particular XCCDF component even in cases where there are 2 XCCDFs in one data stream. If none is given, the first component from the checklists element is used.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-benchmark-id ID\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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!
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid\fR, \fB\-\-skip-validation\fR
Packit 517ee8
.RS
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-signature-validation\fR
Packit Bot 61bab5
.RS
Packit Bot 61bab5
Do not validate digital signatures in digitally signed SCAP source data streams.
Packit Bot 61bab5
.RE
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fB\-\-enforce-signature\fR
Packit Bot 61bab5
.RS
Packit Bot 61bab5
Process only digitally signed SCAP source data streams. Data streams without a signature would be rejected if this switch is used.
Packit Bot 61bab5
.RE
Packit Bot 61bab5
.TP
Packit 517ee8
\fB\-\-fetch-remote-resources\fR
Packit 517ee8
.RS
Packit 517ee8
Allow download of remote OVAL content referenced from XCCDF by check-content-ref/@href.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-remediate\fR
Packit 517ee8
.RS
Packit 517ee8
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.
Packit 517ee8
.RE
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B remediate\fR [\fIoptions\fR] INPUT_FILE [\fIoval-definitions-files\fR]
Packit 517ee8
.RS
Packit 517ee8
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.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-result-id ID
Packit 517ee8
.RS
Packit 517ee8
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid\fR, \fB\-\-skip-validation\fR
Packit 517ee8
.RS
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-fetch-remote-resources\fR
Packit 517ee8
.RS
Packit 517ee8
Allow download of remote OVAL content referenced from XCCDF by check-content-ref/@href.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-cpe CPE_FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Use given CPE dictionary or language (auto-detected) for applicability checks.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-results FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Write XCCDF results into FILE.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-results-arf FILE\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-stig-viewer FILE\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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 \fIhttps://public.cyber.mil/stigs/srg-stig-tools/\fR for information about DISA STIG Viewer.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-report FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Write HTML report into FILE.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-oval-results\fR
Packit 517ee8
.RS
Packit 517ee8
Generate OVAL Result file for each OVAL session used for evaluation. File with name '\fIoriginal-oval-definitions-filename\fR.result.xml' will be generated for each referenced OVAL file.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-check-engine-results\fR
Packit 517ee8
.RS
Packit 517ee8
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-export-variables\fR
Packit 517ee8
.RS
Packit 517ee8
Generate OVAL Variables documents which contain external variables' values that were provided to the OVAL checking engine during evaluation. The filename format is '\fIoriginal-oval-definitions-filename\fR-\fIsession-index\fR.variables-\fIvariables-index\fR.xml'.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-progress\fR
Packit 517ee8
.RS
Packit 517ee8
Switch to sparse output suitable for progress reporting. Format of the output is "$rule_id:$result\\n".
Packit 517ee8
.RE
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B resolve\fR -o output-file xccdf-file
Packit 517ee8
.RS
Packit 517ee8
Resolve an XCCDF file as described in the XCCDF specification. It will flatten inheritance hierarchy of XCCDF profiles, groups, rules, and values. Result is another XCCDF document, which will be written to \fIoutput-file\fR.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-force\fR
Packit 517ee8
Force resolving XCCDF document even if it is already marked as resolved.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B validate\fR [\fIoptions\fR] xccdf-file
Packit 517ee8
.RS
Packit 517ee8
Validate given XCCDF file against a XML schema. Every found error is printed to the standard error. Return code is 0 if validation succeeds, 1 if validation could not be performed due to some error, 2 if the XCCDF document is not valid.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-schematron\fR
Packit Bot 61bab5
Turn off Schematron-based validation. It is able to find more errors and inconsistencies but is much slower. Schematron is available only for XCCDF version 1.2.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B export-oval-variables\fR [\fIoptions\fR] xccdf-file [\fIoval-definitions-files\fR]
Packit 517ee8
.RS
Packit 517ee8
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 '\fIoriginal-oval-definitions-filename\fR-\fIsession-index\fR.variables-\fIvariables-index\fR.xml'.
Packit 517ee8
.PP
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-profile PROFILE\fR
Packit 517ee8
.RS
Packit 517ee8
Select a particular profile from XCCDF document.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-fetch-remote-resources\fR
Packit 517ee8
.RS
Packit 517ee8
Allow download of remote OVAL content referenced from XCCDF by check-content-ref/@href.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid\fR, \fB\-\-skip-validation\fR
Packit 517ee8
.RS
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-datastream-id ID\fR
Packit 517ee8
.RS
Packit Bot 61bab5
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.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-xccdf-id ID\fR
Packit 517ee8
.RS
Packit Bot 61bab5
Takes component ref with given ID from checklists. This allows to select a particular XCCDF component even in cases where there are 2 XCCDFs in one data stream.
Packit Bot 61bab5
.RE
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fB\-\-benchmark-id ID\fR
Packit Bot 61bab5
.RS
Packit Bot 61bab5
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!
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-cpe CPE_FILE\fR
Packit 517ee8
.RS
Packit 517ee8
Use given CPE dictionary or language (auto-detected) for applicability checks. The variables documents are created only for xccdf:Rules which are applicable.
Packit 517ee8
.RE
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBgenerate\fR [\fIoptions\fR] <submodule> [submodule-specific-options]
Packit 517ee8
.RS
Packit 517ee8
Generate another document from an XCCDF file such as security guide or result report.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-profile ID\fR
Packit 517ee8
Apply profile with given ID to the Benchmark before further processing takes place.
Packit 517ee8
.TP
Packit 517ee8
Available submodules:
Packit 517ee8
.TP
Packit 517ee8
.B \fBguide\fR  [\fIoptions\fR] xccdf-file
Packit 517ee8
.RS
Packit 517ee8
Generate a HTML document containing a security guide from an XCCDF Benchmark. Unless the --output option is specified it will be written to the standard output. Without profile being set only groups (not rules) will be included in the output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-output FILE\fR
Packit 517ee8
Write the guide to this file instead of standard output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-hide-profile-info\fR
Packit 517ee8
This option has no effect and is kept only for backward compatibility purposes.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-benchmark-id ID\fR
Packit 517ee8
Selects a component ref from any datastream that references a component with XCCDF Benchmark such that its @id attribute matches given string exactly.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-xccdf-id ID\fR
Packit Bot 61bab5
Takes component ref with given ID from checklists. This allows to select a particular XCCDF component even in cases where there are 2 XCCDFs in one data stream. If none is given, the first component from the checklists element is used.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-tailoring-file TAILORING_FILE\fR
Packit 517ee8
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.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-tailoring-id COMPONENT_REF_ID\fR
Packit Bot 61bab5
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.
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fB\-\-skip-signature-validation\fR
Packit Bot 61bab5
Do not validate digital signatures in digitally signed SCAP source data streams.
Packit Bot 61bab5
.RE
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fB\-\-enforce-signature\fR
Packit Bot 61bab5
.RS
Packit Bot 61bab5
Process only digitally signed SCAP source data streams. Data streams without a signature would be rejected if this switch is used.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBreport\fR  [\fIoptions\fR] xccdf-file
Packit 517ee8
.RS
Packit 517ee8
Generate a HTML document containing results of an XCCDF Benchmark execution. Unless the --output option is specified it will be written to the standard output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-output FILE\fR
Packit 517ee8
Write the report to this file instead of standard output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-result-id ID\fR
Packit 517ee8
ID of the XCCDF TestResult from which the report will be generated.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-oval-template \fItemplate-string\fR
Packit 517ee8
To use the ability to include additional information from OVAL in xccdf result file, a template which will be used to obtain OVAL result file names has to be specified. The template can be either a filename or a string containing wildcard character (percent sign '%'). Wildcard will be replaced by the original OVAL definition file name as referenced from the XCCDF file. This way it is possible to obtain OVAL information even from XCCDF documents referencing several OVAL files. To use this option with results from an XCCDF evaluation, specify \fI%.result.xml\fR as a OVAL file name template.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-sce-template \fItemplate-string\fR
Packit 517ee8
To use the ability to include additional information from SCE in XCCDF result file, a template which will be used to obtain SCE result file names has to be specified. The template can be either a filename or a string containing wildcard character (percent sign '%'). Wildcard will be replaced by the original SCE script file name as referenced from the XCCDF file. This way it is possible to obtain SCE information even from XCCDF documents referencing several SCE files. To use this option with results from an XCCDF evaluation, specify \fI%.result.xml\fR as a SCE file name template.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBfix\fR  [\fIoptions\fR] xccdf-file
Packit 517ee8
.RS
Packit 517ee8
Generate a script that shall bring the system to a state of compliance with given XCCDF Benchmark. There are 2 possibilities when generating fixes: Result-oriented fixes (--result-id) or Profile-oriented fixes (--profile). Result-oriented takes precedences over Profile-oriented, if result-id is given, oscap will ignore any profile provided.
Packit 517ee8
.TP
Packit 517ee8
Result-oriented fixes are generated using result-id provided to select only the failing rules from results in xccdf-file, it skips all other rules.
Packit 517ee8
.TP
Packit 517ee8
Profile-oriented fixes are generated using all rules within the provided profile. If no result-id/profile are provided, (default) profile will be used to generate fixes.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-fix-type TYPE\fR
Packit 517ee8
Specify fix type. There are multiple programming languages in which the fix script can be generated. TYPE should be one of: bash, ansible, puppet, anaconda, ignition, kubernetes. Default is bash. This option is mutually exclusive with --template, because fix type already determines the template URN.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-output FILE\fR
Packit 517ee8
Write the report to this file instead of standard output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-result-id \fIID\fR\fR
Packit 517ee8
Fixes will be generated for failed rule-results of the specified TestResult.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-template \fIID|FILE\fR\fR
Packit 517ee8
Template to be used to generate the script. If it contains a dot '.' it is interpreted as a location of a file with the template definition. Otherwise it identifies a template from standard set which currently includes: \fIbash\fR (default if no --template switch present). Brief explanation of the process of writing your own templates is in the XSL file \fIxsl/legacy-fix.xsl\fR in the openscap data directory. You can also take a look at the default template \fIxsl/legacy-fixtpl-bash.xml\fR.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-xccdf-id ID\fR
Packit Bot 61bab5
Takes component ref with given ID from checklists. This allows to select a particular XCCDF component even in cases where there are 2 XCCDFs in one data stream. If none is given, the first component from the checklists element is used.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-benchmark-id ID\fR
Packit Bot 61bab5
Selects a component ref from any data stream that references a component with XCCDF Benchmark such that its @id attribute matches given string exactly.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-tailoring-file TAILORING_FILE\fR
Packit 517ee8
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.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-tailoring-id COMPONENT_REF_ID\fR
Packit Bot 61bab5
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.
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fB\-\-skip-signature-validation\fR
Packit Bot 61bab5
Do not validate digital signatures in digitally signed SCAP source data streams.
Packit Bot 61bab5
.RE
Packit Bot 61bab5
.TP
Packit Bot 61bab5
\fB\-\-enforce-signature\fR
Packit Bot 61bab5
.RS
Packit Bot 61bab5
Process only digitally signed SCAP source data streams. Data streams without a signature would be rejected if this switch is used.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBcustom\fR  --stylesheet xslt-file [\fIoptions\fR] xccdf-file
Packit 517ee8
.RS
Packit 517ee8
Generate a custom output (depending on given XSLT file) from an XCCDF file.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-stylesheet \fIFILE\fR\fR
Packit 517ee8
Specify an absolute path to a custom stylesheet to format the output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-output FILE\fR
Packit 517ee8
 Write the document into file.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH OVAL OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
.B eval\fR [\fIoptions\fR] INPUT_FILE
Packit 517ee8
.RS
Packit 517ee8
Probe the system and evaluate all definitions from OVAL Definition file. Print result of each definition to standard output. The return code is 0 after a  successful evaluation. On error, value 1 is returned.
Packit 517ee8
.PP
Packit Bot 61bab5
INPUT_FILE can be either OVAL Definition File or SCAP source data stream, it depends on used options.
Packit 517ee8
.PP
Packit Bot 61bab5
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.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-id DEFINITION-ID\fR
Packit 517ee8
Evaluate ONLY specified OVAL Definition from OVAL Definition File.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-variables FILE\fR
Packit 517ee8
Provide external variables expected by OVAL Definition File.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-directives FILE\fR
Packit 517ee8
Use OVAL Directives content to specify desired results content.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-without-syschar\fR
Packit 517ee8
Don't provide system characteristics in result file.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-results FILE\fR
Packit 517ee8
Write OVAL Results into file.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-report FILE\fR
Packit 517ee8
Create human readable (HTML) report from OVAL Results.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-datastream-id ID\fR
Packit Bot 61bab5
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 OVAL file.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-oval-id ID\fR
Packit Bot 61bab5
Takes component ref with given ID from checks. This allows to select a particular OVAL component even in cases where there are 2 OVALs in one data stream.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid\fR, \fB\-\-skip-validation\fR
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-fetch-remote-resources\fR
Packit Bot 61bab5
Allow download of remote components referenced from data stream.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.TP
Packit 517ee8
.B collect\fR [\fIoptions\fR] definitions-file
Packit 517ee8
.RS
Packit 517ee8
Probe the system and gather system characteristics for all objects in OVAL Definition file.
Packit 517ee8
.PP
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-id OBJECT-ID\fR
Packit 517ee8
Collect system characteristics ONLY for specified OVAL Object.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-variables FILE\fR
Packit 517ee8
Provide external variables expected by OVAL Definitions.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-syschar FILE\fR
Packit 517ee8
Write OVAL System Characteristic into file.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid\fR, \fB\-\-skip-validation\fR
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.TP
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.TP
Packit 517ee8
.B analyse\fR [\fIoptions\fR] --results FILE definitions-file syschar-file
Packit 517ee8
.RS
Packit 517ee8
In this mode, the oscap tool does not perform data collection on the local system, but relies upon the input file, which may have been generated on another system. The output (OVAL Results) is printed to file specified by \fB--results\fR parameter.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-variables FILE\fR
Packit 517ee8
Provide external variables expected by OVAL Definitions.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-directives FILE\fR
Packit 517ee8
Use OVAL Directives content to specify desired results content.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid\fR, \fB\-\-skip-validation\fR
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.TP
Packit 517ee8
.B validate\fR [\fIoptions\fR] oval-file
Packit 517ee8
.RS
Packit 517ee8
Validate given OVAL file against a XML schema. Every found error is printed to the standard error. Return code is 0 if validation succeeds, 1 if validation could not be performed due to some error, 2 if the OVAL document is not valid.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-definitions\fR, \fB\-\-variables\fR, \fB\-\-syschar\fR, \fB\-\-results\fR \fB\-\-directives\fR
Packit 517ee8
Type of the OVAL document is automatically detected by default. If you want enforce certain document type, you can use one of these options.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-schematron\fR
Packit Bot 61bab5
Turn off Schematron-based validation. It is able to find more errors and inconsistencies but is much slower.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBgenerate\fR <submodule> [submodule-specific-options]
Packit 517ee8
.RS
Packit 517ee8
Generate another document from an OVAL file.
Packit 517ee8
.TP
Packit 517ee8
Available submodules:
Packit 517ee8
.TP
Packit 517ee8
.B \fBreport\fR  [\fIoptions\fR] oval-results-file
Packit 517ee8
.RS
Packit 517ee8
Generate a formatted HTML page containing visualisation of an OVAL results file. Unless the --output option is specified it will be written to the standard output.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-output FILE\fR
Packit 517ee8
Write the report to this file instead of standard output.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH CPE OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
.B \fBcheck\fR name
Packit 517ee8
.RS
Packit 517ee8
Check whether name is in correct CPE format.
Packit 517ee8
.RE
Packit 517ee8
.PP
Packit 517ee8
.B \fBmatch\fR name dictionary.xml
Packit 517ee8
.RS
Packit 517ee8
Find an exact match of CPE name in the dictionary.
Packit 517ee8
.RE
Packit 517ee8
.PP
Packit 517ee8
.B validate\fR  cpe-dict-file
Packit 517ee8
.RS
Packit 517ee8
Validate given CPE dictionary file against a XML schema. Every found error is printed to the standard error. Return code is 0 if validation succeeds, 1 if validation could not be performed due to some error, 2 if the XCCDF document is not valid.
Packit 517ee8
Packit 517ee8
.SH CVSS OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
.B \fBscore\fR \fIcvss_vector\fR
Packit 517ee8
.RS
Packit 517ee8
Calculate score from a CVSS vector. Prints base score for base CVSS vector, base and temporal score for temporal CVSS vector, base and temporal and environmental score for environmental CVSS vector.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBdescribe\fR \fIcvss_vector\fR
Packit 517ee8
.RS
Packit 517ee8
Describe individual components of a CVSS vector in a human-readable format and print partial scores.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fICVSS vector\fR consists of several slash-separated components specified as key-value pairs. Each key can be specified at most once. Valid CVSS vector has to contain at least base CVSS metrics, i.e. AV, AC, AU, C, I, and A. Following table summarizes the components and possible values (second column is metric category: B for base, T for temporal, E for environmental):
Packit 517ee8
.RS
Packit 517ee8
.P
Packit 517ee8
AV:[L|A|N]            B   Access vector: Local, Adjacent network, Network
Packit 517ee8
.P
Packit 517ee8
AC:[H|M|L]            B   Access complexity: High, Medium, Low
Packit 517ee8
.P
Packit 517ee8
AU:[M|S|N]            B   Required authentication: Multiple instances, Single instance, None
Packit 517ee8
.P
Packit 517ee8
C:[N|P|C]             B   Confidentiality impact: None, Partial, Complete
Packit 517ee8
.P
Packit 517ee8
I:[N|P|C]             B   Integrity impact: None, Partial, Complete
Packit 517ee8
.P
Packit 517ee8
A:[N|P|C]             B   Availability impact: None, Partial, Complete
Packit 517ee8
.P
Packit 517ee8
E:[ND|U|POC|F|H]      T   Exploitability: Not Defined, Unproven, Proof of Concept, Functional, High
Packit 517ee8
.P
Packit 517ee8
RL:[ND|OF|TF|W|U]     T   Remediation Level: Not Defined, Official Fix, Temporary Fix, Workaround, Unavailable
Packit 517ee8
.P
Packit 517ee8
RC:[ND|UC|UR|C]       T   Report Confidence: Not Defined, Unconfirmed, Uncorroborated, Confirmed
Packit 517ee8
.P
Packit 517ee8
CDP:[ND|N|L|LM|MH|H]  E   Collateral Damage Potential: Not Defined, None, Low, Low-Medium, Medium-High, High
Packit 517ee8
.P
Packit 517ee8
TD:[ND|N|L|M|H]       E   Target Distribution: Not Defined, None, Low, Medium, High
Packit 517ee8
.P
Packit 517ee8
CR:[ND|L|M|H]         E   Confidentiality requirement: Not Defined, Low, Medium, High
Packit 517ee8
.P
Packit 517ee8
IR:[ND|L|M|H]         E   Integrity requirement: Not Defined, Low, Medium, High
Packit 517ee8
.P
Packit 517ee8
AR:[ND|L|M|H]         E   Availability requirement: Not Defined, Low, Medium, High
Packit 517ee8
.RE
Packit 517ee8
.RE
Packit 517ee8
.PP
Packit 517ee8
Packit 517ee8
.SH DS OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
.B \fBsds-compose\fR [\fIoptions\fR] SOURCE_XCCDF TARGET_SDS
Packit 517ee8
.RS
Packit Bot 61bab5
Creates an SCAP source data stream from the XCCDF file given in SOURCE_XCCDF and stores the result in TARGET_SDS. Dependencies like OVAL files are automatically detected and bundled in the created source data stream.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid, \fB\-\-skip-validation
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBsds-add\fR [\fIoptions\fR] NEW_COMPONENT EXISTING_SDS
Packit 517ee8
.RS
Packit Bot 61bab5
Adds given NEW_COMPONENT file to the existing source data stream (EXISTING_SDS). Component file might be OVAL, XCCDF or CPE Dictionary file. Dependencies like OVAL files are automatically detected and bundled in target source data stream.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-datastream-id DATASTREAM_ID\fR
Packit Bot 61bab5
Uses a data stream with that particular ID from the given data stream collection. If not given the first data stream is used.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid, \fB\-\-skip-validation
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBsds-split\fR [\fIoptions\fR] SOURCE_DS TARGET_DIR
Packit 517ee8
.RS
Packit Bot 61bab5
Splits given source data stream into multiple files and stores all the files in TARGET_DIR.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-datastream-id DATASTREAM_ID\fR
Packit Bot 61bab5
Uses a data stream with that particular ID from the given data stream collection. If not given the first data stream is used.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-xccdf-id XCCDF_ID\fR
Packit Bot 61bab5
Takes component ref with given ID from checklists. This allows to select a particular XCCDF component even in cases where there are 2 XCCDFs in one data stream.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid, \fB\-\-skip-validation
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.TP
Packit 517ee8
\fB\-\-fetch-remote-resources\fR
Packit Bot 61bab5
Allow download of remote components referenced from data stream.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBsds-validate\fR SOURCE_DS
Packit 517ee8
.RS
Packit Bot 61bab5
Validate given source data stream file against a XML schema. Every found error is printed to the standard error. Return code is 0 if validation succeeds, 1 if validation could not be performed due to some error, 2 if the source data stream is not valid.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBrds-create\fR [\fIoptions\fR] SDS TARGET_ARF XCCDF_RESULTS [OVAL_RESULTS [OVAL_RESULTS ..]]
Packit 517ee8
.RS
Packit Bot 61bab5
Takes given source data stream, XCCDF and OVAL results and creates a result data stream (in Asset Reporting Format) and saves it to file given in TARGET_ARF.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid, \fB\-\-skip-validation
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBrds-split\fR [\fIoptions\fR] [--report-id REPORT_ID] RDS TARGET_DIR
Packit 517ee8
.RS
Packit Bot 61bab5
Takes given result data stream (also called ARF = asset reporting format) and splits given report and its respective report-request to given target directory. If no report-id is given, we assume user wants the first applicable report in top-down order in the file.
Packit 517ee8
.TP
Packit Bot 61bab5
\fB\-\-skip-valid, \fB\-\-skip-validation
Packit 517ee8
Do not validate input/output files.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B \fBrds-validate\fR SOURCE_RDS
Packit 517ee8
.RS
Packit Bot 61bab5
Validate given result data stream file against a XML schema. Every found error is printed to the standard error. Return code is 0 if validation succeeds, 1 if validation could not be performed due to some error, 2 if the result data stream is not valid.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH CVE OPERATIONS
Packit 517ee8
.TP
Packit 517ee8
.B validate\fR cve-nvd-feed.xml
Packit 517ee8
.RS
Packit 517ee8
Validate given CVE data feed.
Packit 517ee8
.RE
Packit 517ee8
.TP
Packit 517ee8
.B find\fR CVE cve-nvd-feed.xml
Packit 517ee8
.RS
Packit 517ee8
Find given CVE in data feed and report base score, vector string and vulnerable software list.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH EXIT STATUS
Packit 517ee8
.TP
Packit Bot 61bab5
Normally, the exit status is 0 when operation finished successfully and 1 otherwise. In cases when oscap performs evaluation of the system it may return 2 indicating success of the operation but incompliance of the assessed system.
Packit 517ee8
.RE
Packit 517ee8
Packit 517ee8
.SH EXAMPLES
Packit Bot 61bab5
Evaluate XCCDF content using CPE dictionary and produce HTML report. In this case we use United States Government Configuration Baseline (USGCB) for Red Hat Enterprise Linux 5 Desktop.
Packit 517ee8
.PP
Packit 517ee8
.nf
Packit 517ee8
.RS
Packit 517ee8
\& oscap xccdf eval \-\-fetch-remote-resources \-\-oval-results \e
Packit 517ee8
\&         \-\-profile united_states_government_configuration_baseline \e
Packit 517ee8
\&         \-\-report usgcb-rhel5desktop.report.html \e
Packit 517ee8
\&         \-\-results usgcb-rhel5desktop-xccdf.xml.result.xml \e
Packit 517ee8
\&         \-\-cpe usgcb-rhel5desktop-cpe-dictionary.xml \e
Packit 517ee8
\&         usgcb-rhel5desktop-xccdf.xml
Packit 517ee8
.RE
Packit 517ee8
.fi
Packit 517ee8
.PP
Packit 517ee8
Packit 517ee8
.SH CONTENT
Packit 517ee8
\fB SCAP Security Guide\fR - \fIhttps://github.com/OpenSCAP/scap-security-guide/\fR
Packit 517ee8
.TP
Packit 517ee8
\fB National Vulnerability Database\fR - \fIhttp://web.nvd.nist.gov/view/ncp/repository\fR
Packit 517ee8
.TP
Packit Bot 61bab5
\fB Red Hat CVE content repository\fR - \fIhttps://www.redhat.com/security/data/metrics/ds/v2/\fR
Packit 517ee8
Packit 517ee8
Packit 517ee8
.SH REPORTING BUGS
Packit 517ee8
.nf
Packit 517ee8
Please report bugs using https://github.com/OpenSCAP/openscap/issues
Packit 517ee8
Make sure you include the full output of `oscap --v` in the bug report.
Packit 517ee8
Packit 517ee8
.SH AUTHORS
Packit 517ee8
.nf
Packit 517ee8
Peter Vrabec <pvrabec@redhat.com>
Packit 517ee8
Šimon Lukašík
Packit 517ee8
Martin Preisler <mpreisle@redhat.com>
Packit 517ee8
.fi