Bug 2058168 - RFE: autotailor should support refine-rule
Summary: RFE: autotailor should support refine-rule
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openscap
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-24 12:22 UTC by Jan Pazdziora
Modified: 2023-08-17 13:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Story
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-113661 0 None None None 2022-02-24 12:28:19 UTC

Description Jan Pazdziora 2022-02-24 12:22:48 UTC
Description of problem:

Currently the autotailor command-line utility is useful for selecting and unselecting rules and setting variable values. However, rule properties like .role or .severity cannot be easily tailored.

Add the ability to tweak .role and .severity, to make rule which is unenforcing by default in the profile enforcing again, or vice versa.

Version-Release number of selected component (if applicable):

openscap-utils-1:1.3.6-3.el9

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have a profile which has a rule unenforcing, for example RHEL 8's OSPP profile grub2_vsyscall_argument or (after bug 2058154 is addressed) audit_access_success in RHEL 9 OSPP profile.
2. Try to use command-line utility autotailor to make tailoring where the rules will be enforcing  -- for example .role=full and .severity=medium.

Actual results:

Currently not possible, one has to manually create tailor file like

<?xml version="1.0"?>
<xccdf-1.2:Tailoring xmlns:xccdf-1.2="http://checklists.nist.gov/xccdf/1.2" id="xccdf_auto_tailoring_default">
  <xccdf-1.2:benchmark href="file:///usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml"/>
  <xccdf-1.2:version time="2022-02-24T12:30:48.396915">1</xccdf-1.2:version>
  <xccdf-1.2:Profile extends="xccdf_org.ssgproject.content_profile_ospp" id="xccdf_org.ssgproject.content_profile_ospp_customized">
    <xccdf-1.2:title override="false"/>
    <xccdf-1.2:refine-rule idref="xccdf_org.ssgproject.content_rule_grub2_vsyscall_argument" severity="unknown" role="full"/>
  </xccdf-1.2:Profile>
</xccdf-1.2:Tailoring>

Expected results:

autotailor with a couple of command-line parameters produces the necessary XML.

Additional info:

Comment 4 Jan Černý 2022-08-01 14:10:29 UTC
there is a draft PR in upstream https://github.com/OpenSCAP/openscap/pull/1877


Note You need to log in before you can comment on or make changes to this bug.