| 1 |
.TH autotailor "8" "January 2024" "Red Hat, Inc." "System Administration Utilities" |
| 2 |
.SH NAME |
| 3 |
autotailor \- CLI tool for tailoring of SCAP data streams. |
| 4 |
.SH DESCRIPTION |
| 5 |
The autotailor tool produces tailoring files that SCAP-compliant scanners can use to complement SCAP data streams. |
| 6 |
A tailoring file adds a new profile, which is supposed to extend a profile that is already present in the data stream. |
| 7 |
|
| 8 |
Tailoring can add, remove or refine rules, and it also can redefine contents of XCCDF variables. |
| 9 |
|
| 10 |
The tool requires data stream location and ID of the base profile as inputs. |
| 11 |
Note however, that the referenced data stream is not opened, and the validity of tailoring is not checked against it. |
| 12 |
The tool doesn't prevent you from extending non-existent profiles, selecting non-existent rules, and so on. |
| 13 |
|
| 14 |
.SH SYNOPSIS |
| 15 |
autotailor [OPTION...] DATASTREAM_FILE [BASE_PROFILE_ID] |
| 16 |
|
| 17 |
.SH OPTIONS |
| 18 |
.TP |
| 19 |
\fB--title TITLE\fR |
| 20 |
.RS |
| 21 |
Title of the new profile. |
| 22 |
.RE |
| 23 |
.TP |
| 24 |
\fB--id-namespace ID_NAMESPACE\fR |
| 25 |
.RS |
| 26 |
The reverse-DNS style string that is part of entities IDs in the corresponding data stream. If left out, the default value 'org.ssgproject.content' is used. |
| 27 |
.RE |
| 28 |
.TP |
| 29 |
\fB-v VAR=VALUE, --var-value VAR=VALUE\fR |
| 30 |
.RS |
| 31 |
Specify modification of the XCCDF value in form <varname>=<value>. Name of the variable can be either its full name, or the suffix, in which case the 'xccdf_<id-namespace>_value' prefix will be prepended internally. Specify the argument multiple times if needed. |
| 32 |
.RE |
| 33 |
.TP |
| 34 |
\fB-v VAR=SELECTOR, --var-value VAR=SELECTOR\fR |
| 35 |
.RS |
| 36 |
Specify refinement of the XCCDF value in form <varname>=<selector>. Name of the variable can be either its full name, or the suffix, in which case the 'xccdf_<id-namespace>_value' prefix will be prepended internally. Specify the argument multiple times if needed. |
| 37 |
.RE |
| 38 |
.TP |
| 39 |
\fB-r RULE=ROLE, --rule-role RULE=ROLE\fR |
| 40 |
.RS |
| 41 |
Specify refinement of the XCCDF rule role in form <rule_id>=<role>. Name of the rule can be either its full name, or the suffix, in which case the 'xccdf_<id-namespace>_rule_' prefix will be prepended internally. |
| 42 |
The value of <role> can be one of full, unscored, unchecked. Specify the argument multiple times if needed. |
| 43 |
.RE |
| 44 |
.TP |
| 45 |
\fB-e RULE=SEVERITY, --rule-severity RULE=SEVERITY\fR |
| 46 |
.RS |
| 47 |
Specify refinement of the XCCDF rule severity in form <rule_id>=<severity>. Name of the rule can be either its full name, or the suffix, in which case the 'xccdf_<id-namespace>_rule_' prefix will be prepended internally. The value of <severity> can be one of unknown, info, low, medium, high. Specify the argument multiple times if needed. |
| 48 |
.RE |
| 49 |
.TP |
| 50 |
\fB-s RULE_ID, --select RULE_ID\fR |
| 51 |
.RS |
| 52 |
Specify the rule to select. The rule ID can be either full, or just the suffix, in which case the 'xccdf_<id-namespace>_rule' prefix will be prepended internally. Specify the argument multiple times if needed. |
| 53 |
.RE |
| 54 |
.TP |
| 55 |
\fB-u RULE_ID, --unselect RULE_ID\fR |
| 56 |
.RS |
| 57 |
Specify the rule to unselect. The argument works the same way as the --select argument. |
| 58 |
.RE |
| 59 |
.TP |
| 60 |
\fB-p TAILORED_PROFILE_ID, --tailored-profile-id TAILORED_PROFILE_ID\fR |
| 61 |
.RS |
| 62 |
Specify the ID of the tailored profile. The ID of the new profile can be either its full ID, or the suffix, in which case the 'xccdf_<id-namespace>_profile_' prefix will be prepended internally. |
| 63 |
If left out, the new ID will be obtained by appending '_customized' to the tailored profile ID. |
| 64 |
.RE |
| 65 |
.TP |
| 66 |
\fB--new-profile-id NEW_PROFILE_ID\fR |
| 67 |
.RS |
| 68 |
Synonym of --tailored-profile-id. |
| 69 |
.RE |
| 70 |
.TP |
| 71 |
\fB--json-tailoring JSON_TAILORING_FILE\fR |
| 72 |
.RS |
| 73 |
Import tailoring from a JSON file (https://github.com/ComplianceAsCode/schemas/tree/main/tailoring). This option makes BASE_PROFILE_ID positional argument optional. |
| 74 |
However, data passed in the command line options takes precedence over JSON contents, including the BASE_PROFILE_ID argument. |
| 75 |
JSON tailoring can be accompanied with additional command-line options to either override contents of an existing profile (along with --tailored-profile-id identifier) or to create an extra profile (BASE_PROFILE_ID is a mandatory argument in this case and --tailored-profile-id is optional) in the resulting XCCDF tailoring file. |
| 76 |
.RE |
| 77 |
|
| 78 |
.SH USAGE |
| 79 |
.SS Modify a variable value |
| 80 |
$ autotailor --var-value xccdf_org.ssgproject.content_value_var_screensaver_lock_delay=120 -o tailoring.xml ssg-rhel8-ds.xml xccdf_org.ssgproject.content_profile_pci_dss |
| 81 |
|
| 82 |
The utility allows you to specify the ID namespace using the --namespace-id option, so you don't have to repeat the xccdf_org.ssgproject.content_... prefix everywhere. |
| 83 |
The default namespace ID is actually org.ssgproject.content, so the following invocations are equivalent to the first one: |
| 84 |
|
| 85 |
$ autotailor --var-value var_screensaver_lock_delay=120 --namespace-id org.ssgproject.content -o tailoring.xml ssg-rhel8-ds.xml pci_dss |
| 86 |
|
| 87 |
$ autotailor --var-value var_screensaver_lock_delay=120 -o tailoring.xml ssg-rhel8-ds.xml pci_dss |
| 88 |
|
| 89 |
The tailoring tailoring_file defines a new profile, xccdf_org.ssgproject.content_profile_pci_dss_customized, which alters the screensaver lock delay. |
| 90 |
|
| 91 |
.SS Perform more modifications |
| 92 |
$ autotailor --var-value var_screensaver_lock_delay=120 --select gconf_gnome_screensaver_idle_delay --var-value inactivity_timeout_value=600 ssg-rhel8-ds.xml pci_dss |
| 93 |
|
| 94 |
.SS Import JSON tailoring |
| 95 |
$ autotailor ssg-rhel8-ds.xml --json-tailoring tailoring.json |
| 96 |
|
| 97 |
.SH REPORTING BUGS |
| 98 |
.nf |
| 99 |
Please report bugs using https://github.com/OpenSCAP/openscap/issues |
| 100 |
|
| 101 |
.SH AUTHORS |
| 102 |
.nf |
| 103 |
Matěj Týč <[email protected]> |
| 104 |
Jan Černý <[email protected]> |
| 105 |
Evgenii Kolesnikov <[email protected]> |
| 106 |
.fi |