Debian Codegraph @

utils/oscap.8

raw
1 .TH OSCAP "8" "March 2021" "Red Hat" "System Administration Utilities"
2
3 .SH NAME
4 oscap \- OpenSCAP command line tool
5
6 .SH SYNOPSIS
7 \fBoscap\fR [\fIgeneral-options\fR] \fBmodule\fR operation [\fIoperation-options-and-arguments\fR]
8
9 .SH DESCRIPTION
10 \fBoscap\fP is Security Content Automation Protocol (SCAP) toolkit based on OpenSCAP library. It provides various functions for different SCAP specifications (modules).
11
12 OpenSCAP tool claims to provide capabilities of Authenticated Configuration Scanner and Authenticated Vulnerability Scanner as defined by The National Institute of Standards and Technology.
13
14 .SH GENERAL OPTIONS
15 .TP
16 \fB\-V, -\-version\fR
17 Print supported SCAP specifications, location of schema files, schematron files, CPE files, probes and supported OVAL objects.
18 Displays a list of inbuilt CPE names.
19 .TP
20 \fB\-h, \-\-help\fR
21 Help screen.
22
23 .SH MODULES
24 .TP
25 \fBinfo\fR
26 Determine type and print information about a file.
27 .TP
28 \fBxccdf\fR
29 The eXtensible Configuration Checklist Description Format.
30 .TP
31 \fBoval\fR
32 Open Vulnerability and Assessment Language.
33 .TP
34 \fBds\fR
35 SCAP Data Stream
36 .TP
37 \fBcpe\fR
38 Common Platform Enumeration.
39
40 .SH COMMON OPTIONS FOR ALL MODULES
41 .RE
42 .TP
43 \fB\-\-verbose VERBOSITY_LEVEL\fR
44 .RS
45 Turn on verbose mode at specified verbosity level. VERBOSITY_LEVEL is one of: DEVEL, INFO, WARNING, ERROR.
46 .RE
47 .TP
48 \fB\-\-verbose-log-file FILE\fR
49 .RS
50 Set filename to write additional information.
51 .RE
52
53 .SH INFO OPERATIONS
54 .TP
55 [\fIoptions\fR] any-scap-file.xml
56 .RS
57 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.
58
59 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.
60 .PP
61 \fB\-\-fetch-remote-resources\fR
62 .RS
63 Allow download of remote components referenced from data stream.
64 .RE
65 .TP
66 \fB\-\-list-rules\fR
67 .RS
68 Print IDs of XCCDF rules that are selected by the given profile, one per line. This option must be used together with \fB\-\-profile\fR. The output is machine-readable and contains only rule IDs with no additional decoration.
69 .RE
70 .TP
71 \fB\-\-list-vars\fR
72 .RS
73 Print XCCDF Value IDs and their resolved values for the given profile, one per line, tab-separated. This option must be used together with \fB\-\-profile\fR. The output is machine-readable.
74 .RE
75 .TP
76 \fB\-\-local-files DIRECTORY\fR
77 .RS
78 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.
79 This option works only with SCAP 1.3 source data streams. It can't be used with SCAP 1.2 source data streams.
80 .RE
81 .TP
82 \fB\-\-profile PROFILE\fR
83 .RS
84 Show info of the profile with the given ID.
85 .RE
86 .TP
87 \fB\-\-profiles\fR
88 .RS
89 Show profiles from the input file in the <id>:<title> format, one line per profile.
90 .RE
91 .TP
92 \fB\-\-references\fR
93 .RS
94 Show list of references available in each benchmark.
95 .RE
96
97 .SH XCCDF OPERATIONS
98 .TP
99 .B \fBeval\fR [\fIoptions\fR] INPUT_FILE [\fIoval-definitions-files\fR]
100 .RS
101 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(CCE). Optionally you can give an SCAP source data stream as the INPUT_FILE instead of an XCCDF file (see --datastream-id).
102 .PP
103 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.
104 .PP
105 .PP
106 Unless --skip-validation is used, the INPUT_FILE is validated using XSD schemas (depending on document type of INPUT_FILE) and rejected if invalid.
107 .PP
108 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).
109 .PP
110 .TP
111 \fB\-\-profile PROFILE\fR
112 .RS
113 Select a particular profile from XCCDF document. If "(all)" is given a virtual profile that selects all groups and rules will be used.
114 .RE
115 .TP
116 \fB\-\-rule RULE\fR
117 .RS
118 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.
119 .RE
120 .TP
121 \fB\-\-skip-rule RULE\fR
122 .RS
123 Skip a particular rule from XCCDF document. This option can be used multiple times to skip multiple rules at once.
124 .RE
125 .TP
126 \fB\-\-reference NAME:IDENTIFIER\fR
127 .RS
128 Evaluate rules matching the given reference. This option can be used to check for evaluating compliance with a particular policy requirement. Rules that match the reference will be evaluated, other rules will be skipped and a result of notselected will be returned. The argument needs to be provided in the form NAME:IDENTIFIER (colon is a separator), where NAME is the reference name used as a text of xccdf:reference elements that are child of xccdf:Benchmark element and IDENTIFIER is a text of xccdf:reference element that is child of a particular xccdf:Rule element which has the same @href value as the xccdf:reference element of the NAME value. This feature requires SCAP content to be formed in the aforementioned way. For example: --reference "cis:4.1.3.19", --reference "anssi:BP28(R29)"
129 List of references available in the given benchmark can be obtained by running the oscap info --references command.
130 .RE
131 .TP
132 \fB\-\-tailoring-file TAILORING_FILE\fR
133 .RS
134 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.
135 .RE
136 .TP
137 \fB\-\-tailoring-id COMPONENT_REF_ID\fR
138 .RS
139 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.
140 .RE
141 .TP
142 \fB\-\-cpe CPE_FILE\fR
143 .RS
144 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)
145 .RE
146 .TP
147 \fB\-\-results FILE\fR
148 .RS
149 Write XCCDF results into FILE.
150 .RE
151 .TP
152 \fB\-\-results-arf FILE\fR
153 .RS
154 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.
155 .RE
156 .TP
157 \fB\-\-stig-viewer FILE\fR
158 .RS
159 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.
160 .RE
161 .TP
162 \fB\-\-thin-results\fR
163 .RS
164 Thin Results provides only minimal amount of information in OVAL/ARF results. The option --without-syschar is automatically enabled when you use Thin Results.
165 .RE
166 .TP
167 \fB\-\-without-syschar\fR
168 .RS
169 Don't provide system characteristics in OVAL/ARF result files.
170 .RE
171 .TP
172 \fB\-\-report FILE\fR
173 .RS
174 Write HTML report into FILE.
175 .RE
176 .TP
177 \fB\-\-oval-results\fR
178 .RS
179 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.
180 .RE
181 .TP
182 \fB\-\-check-engine-results\fR
183 .RS
184 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.
185 .RE
186 .TP
187 \fB\-\-export-variables\fR
188 .RS
189 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'.
190 .RE
191 .TP
192 \fB\-\-datastream-id ID\fR
193 .RS
194 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.
195 .RE
196 .TP
197 \fB\-\-xccdf-id ID\fR
198 .RS
199 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.
200 .RE
201 .TP
202 \fB\-\-benchmark-id ID\fR
203 .RS
204 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!
205 .RE
206 .TP
207 \fB\-\-skip-validation\fR
208 .RS
209 Do not validate input/output files.
210 .RE
211 .TP
212 \fB\-\-skip-signature-validation\fR
213 .RS
214 Do not validate digital signatures in digitally signed SCAP source data streams.
215 .RE
216 .TP
217 \fB\-\-enforce-signature\fR
218 .RS
219 Process only digitally signed SCAP source data streams. Data streams without a signature would be rejected if this switch is used.
220 .RE
221 .TP
222 \fB\-\-fetch-remote-resources\fR
223 .RS
224 Allow download of remote OVAL content referenced from XCCDF by check-content-ref/@href.
225 .RE
226 .TP
227 \fB\-\-local-files DIRECTORY\fR
228 .RS
229 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.
230 This option works only with SCAP 1.3 source data streams. It can't be used with SCAP 1.2 source data streams.
231 .RE
232 .TP
233 \fB\-\-remediate\fR
234 .RS
235 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.
236 .RE
237 .TP
238 \fB\-\-show-rule-details\fR
239 .RS
240 Show rule description and rationale when reporting results.
241 .RE
242 .RE
243 .TP
244 .B remediate\fR [\fIoptions\fR] INPUT_FILE [\fIoval-definitions-files\fR]
245 .RS
246 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.
247 .TP
248 \fB\-\-result-id ID
249 .RS
250 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.
251 .RE
252 .TP
253 \fB\-\-skip-validation\fR
254 .RS
255 Do not validate input/output files.
256 .RE
257 .TP
258 \fB\-\-fetch-remote-resources\fR
259 .RS
260 Allow download of remote OVAL content referenced from XCCDF by check-content-ref/@href.
261 .RE
262 .TP
263 \fB\-\-local-files DIRECTORY\fR
264 .RS
265 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.
266 This option works only with SCAP 1.3 source data streams. It can't be used with SCAP 1.2 source data streams.
267 .RE
268 .TP
269 \fB\-\-cpe CPE_FILE\fR
270 .RS
271 Use given CPE dictionary or language (auto-detected) for applicability checks.
272 .RE
273 .TP
274 \fB\-\-results FILE\fR
275 .RS
276 Write XCCDF results into FILE.
277 .RE
278 .TP
279 \fB\-\-results-arf FILE\fR
280 .RS
281 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.
282 .RE
283 .TP
284 \fB\-\-stig-viewer FILE\fR
285 .RS
286 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.
287 .RE
288 .TP
289 \fB\-\-report FILE\fR
290 .RS
291 Write HTML report into FILE.
292 .RE
293 .TP
294 \fB\-\-oval-results\fR
295 .RS
296 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.
297 .RE
298 .TP
299 \fB\-\-check-engine-results\fR
300 .RS
301 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.
302 .RE
303 .TP
304 \fB\-\-export-variables\fR
305 .RS
306 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'.
307 .RE
308 .TP
309 \fB\-\-progress\fR
310 .RS
311 Switch to sparse output suitable for progress reporting. Format of the output is "$rule_id:$result\\n".
312 .RE
313 .TP
314 \fB\-\-progress-full\fR
315 .RS
316 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".
317 .RE
318 .RE
319 .TP
320 .B resolve\fR -o output-file xccdf-file
321 .RS
322 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.
323 .TP
324 \fB\-\-force\fR
325 Force resolving XCCDF document even if it is already marked as resolved.
326 .RE
327 .TP
328 .B validate\fR [\fIoptions\fR] xccdf-file
329 .RS
330 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.
331 .TP
332 \fB\-\-skip-schematron\fR
333 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.
334 .RE
335 .TP
336 .B export-oval-variables\fR [\fIoptions\fR] xccdf-file [\fIoval-definitions-files\fR]
337 .RS
338 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'.
339 .PP
340 .TP
341 \fB\-\-profile PROFILE\fR
342 .RS
343 Select a particular profile from XCCDF document.
344 .RE
345 .TP
346 \fB\-\-fetch-remote-resources\fR
347 .RS
348 Allow download of remote OVAL content referenced from XCCDF by check-content-ref/@href.
349 .RE
350 .TP
351 \fB\-\-local-files DIRECTORY\fR
352 .RS
353 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.
354 This option works only with SCAP 1.3 source data streams. It can't be used with SCAP 1.2 source data streams.
355 .RE
356 .TP
357 \fB\-\-skip-validation\fR
358 .RS
359 Do not validate input/output files.
360 .RE
361 .TP
362 \fB\-\-datastream-id ID\fR
363 .RS
364 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.
365 .RE
366 .TP
367 \fB\-\-xccdf-id ID\fR
368 .RS
369 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.
370 .RE
371 .TP
372 \fB\-\-benchmark-id ID\fR
373 .RS
374 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!
375 .RE
376 .TP
377 \fB\-\-cpe CPE_FILE\fR
378 .RS
379 Use given CPE dictionary or language (auto-detected) for applicability checks. The variables documents are created only for xccdf:Rules which are applicable.
380 .RE
381 .RE
382 .TP
383 .B \fBgenerate\fR [\fIoptions\fR] <submodule> [submodule-specific-options]
384 .RS
385 Generate another document from an XCCDF file such as security guide or result report.
386 .TP
387 \fB\-\-profile ID\fR
388 Apply profile with given ID to the Benchmark before further processing takes place.
389 .TP
390 Available submodules:
391 .TP
392 .B \fBguide\fR [\fIoptions\fR] xccdf-file
393 .RS
394 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.
395 .TP
396 \fB\-\-output FILE\fR
397 Write the guide to this file instead of standard output.
398 .TP
399 \fB\-\-hide-profile-info\fR
400 This option has no effect and is kept only for backward compatibility purposes.
401 .TP
402 \fB\-\-benchmark-id ID\fR
403 Selects a component ref from any datastream that references a component with XCCDF Benchmark such that its @id attribute matches given string exactly.
404 .TP
405 \fB\-\-xccdf-id ID\fR
406 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.
407 .TP
408 \fB\-\-tailoring-file TAILORING_FILE\fR
409 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.
410 .TP
411 \fB\-\-tailoring-id COMPONENT_REF_ID\fR
412 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.
413 .TP
414 \fB\-\-skip-signature-validation\fR
415 Do not validate digital signatures in digitally signed SCAP source data streams.
416 .TP
417 \fB\-\-enforce-signature\fR
418 Process only digitally signed SCAP source data streams. Data streams without a signature would be rejected if this switch is used.
419 .RE
420 .TP
421 .B \fBreport\fR [\fIoptions\fR] xccdf-file
422 .RS
423 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.
424 .TP
425 \fB\-\-output FILE\fR
426 Write the report to this file instead of standard output.
427 .TP
428 \fB\-\-result-id ID\fR
429 ID of the XCCDF TestResult from which the report will be generated.
430 .RE
431 .TP
432 .B \fBfix\fR [\fIoptions\fR] xccdf-file
433 .RS
434 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.
435 .TP
436 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.
437 It isn't possible to generate result-oriented fixes for the kickstart and bootc fix type.
438 .TP
439 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.
440 .TP
441 \fB\-\-fix-type TYPE\fR
442 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, blueprint, kickstart, bootc. Default is bash.
443 .TP
444 \fB\-\-output FILE\fR
445 Write the report to this file instead of standard output.
446 .TP
447 \fB\-\-result-id \fIID\fR\fR
448 Fixes will be generated for failed rule-results of the specified TestResult.
449 .TP
450 \fB\-\-xccdf-id ID\fR
451 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.
452 .TP
453 \fB\-\-benchmark-id ID\fR
454 Selects a component ref from any data stream that references a component with XCCDF Benchmark such that its @id attribute matches given string exactly.
455 .TP
456 \fB\-\-tailoring-file TAILORING_FILE\fR
457 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.
458 .TP
459 \fB\-\-tailoring-id COMPONENT_REF_ID\fR
460 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.
461 .TP
462 \fB\-\-skip-signature-validation\fR
463 Do not validate digital signatures in digitally signed SCAP source data streams.
464 .TP
465 \fB\-\-enforce-signature\fR
466 Process only digitally signed SCAP source data streams. Data streams without a signature would be rejected if this switch is used.
467 .RE
468 .TP
469 .B \fBcustom\fR --stylesheet xslt-file [\fIoptions\fR] xccdf-file
470 .RS
471 Generate a custom output (depending on given XSLT file) from an XCCDF file.
472 .TP
473 \fB\-\-stylesheet \fIFILE\fR\fR
474 Specify an absolute path to a custom stylesheet to format the output.
475 .TP
476 \fB\-\-output FILE\fR
477 Write the document into file.
478 .RE
479
480 .SH OVAL OPERATIONS
481 .TP
482 .B eval\fR [\fIoptions\fR] INPUT_FILE
483 .RS
484 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.
485 .PP
486 INPUT_FILE can be either OVAL Definition File or SCAP source data stream, it depends on used options.
487 .PP
488 Unless --skip-validation is used, the INPUT_FILE is validated using XSD schemas (depending on document type of INPUT_FILE) and rejected if invalid.
489 .TP
490 \fB\-\-id DEFINITION-ID\fR
491 Evaluate ONLY specified OVAL Definition from OVAL Definition File.
492 .TP
493 \fB\-\-variables FILE\fR
494 Provide external variables expected by OVAL Definition File.
495 .TP
496 \fB\-\-directives FILE\fR
497 Use OVAL Directives content to specify desired results content.
498 .TP
499 \fB\-\-without-syschar\fR
500 Don't provide system characteristics in result file.
501 .TP
502 \fB\-\-results FILE\fR
503 Write OVAL Results into file.
504 .TP
505 \fB\-\-report FILE\fR
506 Create human readable (HTML) report from OVAL Results.
507 .TP
508 \fB\-\-datastream-id ID\fR
509 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.
510 .TP
511 \fB\-\-oval-id ID\fR
512 Takes component ref with given ID from checks. This allows one to select a particular OVAL component even in cases where there are multiple OVALs in a single data stream.
513 .TP
514 \fB\-\-skip-validation\fR
515 Do not validate input/output files.
516 .TP
517 \fB\-\-fetch-remote-resources\fR
518 Allow download of remote components referenced from data stream.
519 .TP
520 \fB\-\-local-files DIRECTORY\fR
521 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.
522 This option works only with SCAP 1.3 source data streams. It can't be used with SCAP 1.2 source data streams.
523 .RE
524
525 .TP
526 .B collect\fR [\fIoptions\fR] definitions-file
527 .RS
528 Probe the system and gather system characteristics for all objects in OVAL Definition file.
529 .PP
530 .TP
531 \fB\-\-id OBJECT-ID\fR
532 Collect system characteristics ONLY for specified OVAL Object.
533 .TP
534 \fB\-\-variables FILE\fR
535 Provide external variables expected by OVAL Definitions.
536 .TP
537 \fB\-\-syschar FILE\fR
538 Write OVAL System Characteristic into file.
539 .TP
540 \fB\-\-skip-validation\fR
541 Do not validate input/output files.
542 .TP
543 .RE
544
545 .TP
546 .B analyse\fR [\fIoptions\fR] --results FILE definitions-file syschar-file
547 .RS
548 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.
549 .TP
550 \fB\-\-variables FILE\fR
551 Provide external variables expected by OVAL Definitions.
552 .TP
553 \fB\-\-directives FILE\fR
554 Use OVAL Directives content to specify desired results content.
555 .TP
556 \fB\-\-skip-validation\fR
557 Do not validate input/output files.
558 .RE
559
560 .TP
561 .B validate\fR [\fIoptions\fR] oval-file
562 .RS
563 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.
564 .TP
565 \fB\-\-definitions\fR, \fB\-\-variables\fR, \fB\-\-syschar\fR, \fB\-\-results\fR \fB\-\-directives\fR
566 Type of the OVAL document is automatically detected by default. If you want enforce certain document type, you can use one of these options.
567 .TP
568 \fB\-\-skip-schematron\fR
569 Turn off Schematron-based validation. It is able to find more errors and inconsistencies but is much slower.
570 .RE
571 .TP
572 .B \fBgenerate\fR <submodule> [submodule-specific-options]
573 .RS
574 Generate another document from an OVAL file.
575 .TP
576 Available submodules:
577 .TP
578 .B \fBreport\fR [\fIoptions\fR] oval-results-file
579 .RS
580 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.
581 .TP
582 \fB\-\-output FILE\fR
583 Write the report to this file instead of standard output.
584 .RE
585
586 .SH CPE OPERATIONS
587 .TP
588 .B \fBcheck\fR name
589 .RS
590 Check whether name is in correct CPE format.
591 .RE
592 .PP
593 .B \fBmatch\fR name dictionary.xml
594 .RS
595 Find an exact match of CPE name in the dictionary.
596 .RE
597 .PP
598 .B validate\fR cpe-dict-file
599 .RS
600 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.
601
602 .SH DS OPERATIONS
603 .TP
604 .B \fBsds-validate\fR SOURCE_DS
605 .RS
606 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.
607 .RE
608 .TP
609 .B \fBrds-validate\fR SOURCE_RDS
610 .RS
611 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.
612 .RE
613
614 .SH REPORTING BUGS
615 .nf
616 Please report bugs using https://github.com/OpenSCAP/openscap/issues
617 Make sure you include the full output of `oscap --v` in the bug report.
618
619 .SH AUTHORS
620 .nf
621 Peter Vrabec <[email protected]>
622 Šimon Lukašík
623 Martin Preisler <[email protected]>
624 .fi