autotailor(8) System Administration Utilities autotailor(8)

# [NAME](#NAME)

autotailor - CLI tool for tailoring of SCAP data streams.

# [DESCRIPTION](#DESCRIPTION)

The autotailor tool produces tailoring files that SCAP-compliant scanners can use to complement SCAP data streams. A tailoring file adds a new profile, which is supposed to extend a profile that is already present in the data stream.

Tailoring can add, remove or refine rules, and it also can redefine contents of XCCDF variables.

The tool requires data stream location and ID of the base profile as inputs. Note however, that the referenced data stream is not opened, and the validity of tailoring is not checked against it. The tool doesn't prevent you from extending non-existent profiles, selecting non-existent rules, and so on.

# [SYNOPSIS](#SYNOPSIS)

autotailor \[OPTION...] DATASTREAM\_FILE \[BASE\_PROFILE\_ID]

# [OPTIONS](#OPTIONS)

[**--title TITLE**](#title)

Title of the new profile.

[**--id-namespace ID\_NAMESPACE**](#id_namespace)

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.

[**-v VAR=VALUE, --var-value VAR=VALUE**](#v)

Specify modification of the XCCDF value in form &lt;varname&gt;=&lt;value&gt;. Name of the variable can be either its full name, or the suffix, in which case the 'xccdf\_&lt;id-namespace&gt;\_value' prefix will be prepended internally. Specify the argument multiple times if needed.

[**-v VAR=SELECTOR, --var-value VAR=SELECTOR**](#v~2)

Specify refinement of the XCCDF value in form &lt;varname&gt;=&lt;selector&gt;. Name of the variable can be either its full name, or the suffix, in which case the 'xccdf\_&lt;id-namespace&gt;\_value' prefix will be prepended internally. Specify the argument multiple times if needed.

[**-r RULE=ROLE, --rule-role RULE=ROLE**](#r)

Specify refinement of the XCCDF rule role in form &lt;rule\_id&gt;=&lt;role&gt;. Name of the rule can be either its full name, or the suffix, in which case the 'xccdf\_&lt;id-namespace&gt;\_rule\_' prefix will be prepended internally. The value of &lt;role&gt; can be one of full, unscored, unchecked. Specify the argument multiple times if needed.

[**-e RULE=SEVERITY, --rule-severity RULE=SEVERITY**](#e)

Specify refinement of the XCCDF rule severity in form &lt;rule\_id&gt;=&lt;severity&gt;. Name of the rule can be either its full name, or the suffix, in which case the 'xccdf\_&lt;id-namespace&gt;\_rule\_' prefix will be prepended internally. The value of &lt;severity&gt; can be one of unknown, info, low, medium, high. Specify the argument multiple times if needed.

[**-s RULE\_ID, --select RULE\_ID**](#s)

Specify the rule to select. The rule ID can be either full, or just the suffix, in which case the 'xccdf\_&lt;id-namespace&gt;\_rule' prefix will be prepended internally. Specify the argument multiple times if needed.

[**-u RULE\_ID, --unselect RULE\_ID**](#u)

Specify the rule to unselect. The argument works the same way as the --select argument.

[**-p TAILORED\_PROFILE\_ID, --tailored-profile-id TAILORED\_PROFILE\_ID**](#p)

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\_&lt;id-namespace&gt;\_profile\_' prefix will be prepended internally. If left out, the new ID will be obtained by appending '\_customized' to the tailored profile ID.

[**--new-profile-id NEW\_PROFILE\_ID**](#new_profile_id)

Synonym of --tailored-profile-id.

[**--json-tailoring JSON\_TAILORING\_FILE**](#json_tailoring)

Import tailoring from a JSON file (https://github.com/ComplianceAsCode/schemas/tree/main/tailoring). This option makes BASE\_PROFILE\_ID positional argument optional. However, data passed in the command line options takes precedence over JSON contents, including the BASE\_PROFILE\_ID argument. 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.

# [USAGE](#USAGE)

## [Modify a variable value](#Modify_a_variable_value)

$ 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

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. The default namespace ID is actually org.ssgproject.content, so the following invocations are equivalent to the first one:

$ autotailor --var-value var\_screensaver\_lock\_delay=120 --namespace-id org.ssgproject.content -o tailoring.xml ssg-rhel8-ds.xml pci\_dss

$ autotailor --var-value var\_screensaver\_lock\_delay=120 -o tailoring.xml ssg-rhel8-ds.xml pci\_dss

The tailoring tailoring\_file defines a new profile, xccdf\_org.ssgproject.content\_profile\_pci\_dss\_customized, which alters the screensaver lock delay.

## [Perform more modifications](#Perform_more_modifications)

$ 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

## [Import JSON tailoring](#Import_JSON_tailoring)

$ autotailor ssg-rhel8-ds.xml --json-tailoring tailoring.json

# [REPORTING BUGS](#REPORTING_BUGS)

```
Please report bugs using https://github.com/OpenSCAP/openscap/issues
```

# [AUTHORS](#AUTHORS)

```
Matěj Týč <matyc@redhat.com>
Jan Černý <jcerny@redhat.com>
Evgenii Kolesnikov <ekolesni@redhat.com>
```

January 2024 Red Hat, Inc.

---

Document: autotailor(8) from openscap-fips 1.4.4-r7 (Chainguard OS)
Source: https://github.com/OpenSCAP/openscap
