ComplianceAsCode / content

Security automation content in SCAP, Bash, Ansible, and other formats
https://complianceascode.readthedocs.io/en/latest/
Other
2.17k stars 685 forks source link

[RHEL/6] Collect all lines matching the specified pattern (AKA "USGCB instance issue") #433

Closed iankko closed 1 year ago

iankko commented 9 years ago

The issue:

There's a large number of textfilecontent54 objects collecting only the first match:

$ fgrep -ri '<ind:instance datatype="int">1</ind:instance>' RHEL/6/output/ssg-rhel6-oval.xml | wc -l
207

This can be a problem in case of a configuration file where only the last occurrence of a keyword is significant. Even in the case of configurations where only the first instance is significant, presence of repeating keywords is ambiguous.

Stages of the proposed fix:

/etc/grub.conf fixes: https://github.com/OpenSCAP/scap-security-guide/pull/437 /etc/login.defs instance fixes: https://github.com/OpenSCAP/scap-security-guide/pull/438

matejak commented 5 years ago

The point in the issue description is valid, but those referenced PRs look over-engineered. It would be nice to have a second opinion here.

marcusburghardt commented 1 year ago

RHEL6 no longer present in the project.