RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1736850 - anaconda remediation not generated by oscap xccdf generate --fix-type anaconda
Summary: anaconda remediation not generated by oscap xccdf generate --fix-type anaconda
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openscap
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.2
Assignee: Jan Černý
QA Contact: Vojtech Polasek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-02 07:57 UTC by Marek Haicman
Modified: 2023-02-12 21:50 UTC (History)
4 users (show)

Fixed In Version: openscap-1.3.2-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:40:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-32421 0 None None None 2023-02-12 21:50:18 UTC
Red Hat Product Errata RHBA-2020:1629 0 None None None 2020-04-28 15:41:06 UTC

Description Marek Haicman 2019-08-02 07:57:43 UTC
Description of problem:
command

`oscap xccdf generate fix --fix-type anaconda <ds>`

 is, according to the man page, meant to generate anaconda remediation snippets. It works for other fix types (bash, ansible, puppet), but anaconda is generated empty. It only works when full name is used in --template:

`oscap xccdf generate fix --profile pci-dss --template urn:redhat:anaconda:pre <ds>`

Version-Release number of selected component (if applicable):
openscap-scanner-1.3.1-1.el8.x86_64
scap-security-guide-0.1.44-2.el8.noarch


How reproducible:
reliably

Steps to Reproduce:
1. oscap xccdf generate fix --profile pci-dss --template urn:xccdf:fix:script:puppet /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
2. oscap xccdf generate fix --profile pci-dss --fix-type puppet /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
3. oscap xccdf generate fix --profile pci-dss --template urn:redhat:anaconda:pre /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
4. oscap xccdf generate fix --profile pci-dss --fix-type anaconda /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc

Actual results:
[root@ci-vm-10-0-136-41 ~]# oscap xccdf generate fix --profile pci-dss --template urn:xccdf:fix:script:puppet /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
     28      52     420
[root@ci-vm-10-0-136-41 ~]# oscap xccdf generate fix --profile pci-dss --fix-type puppet /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
     28      52     420
[root@ci-vm-10-0-136-41 ~]# oscap xccdf generate fix --profile pci-dss --template urn:redhat:anaconda:pre /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
      8       8      92
[root@ci-vm-10-0-136-41 ~]# oscap xccdf generate fix --profile pci-dss --fix-type anaconda /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
      0       0       0


Expected results:
[root@ci-vm-10-0-136-41 ~]# oscap xccdf generate fix --profile pci-dss --fix-type anaconda /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml | wc
      8       8      92

Additional info:

Comment 1 Marek Haicman 2019-08-02 09:32:29 UTC
PR fixing the issue: https://github.com/OpenSCAP/openscap/pull/1390

Comment 2 Jan Černý 2019-08-05 10:49:34 UTC
The issue has been fixed upstream in https://github.com/OpenSCAP/openscap/pull/1390/

Comment 5 Jan Černý 2020-01-14 09:53:10 UTC
A simple test that tests this bug has been proposed to upstream in https://github.com/OpenSCAP/openscap/pull/1459

Comment 13 errata-xmlrpc 2020-04-28 15:40:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1629


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