Description of problem: The content_rule_audit_basic_configuration rule enforces having 10-basic-config.rules be the default configuration file, which sets internally the buffer to 8192: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- [...] ## Increase the buffers to survive stress events. ## Make this bigger for busy systems -b 8192 [...] -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- If the customer changes the value, the rule will fail. In theory the check should only make sure that the buffer is larger or equal to 8192. Version-Release number of selected component (if applicable): scap-security-guide-1.54-7.el7_9 How reproducible: Always Steps to Reproduce: 1. Modify /etc/audit/rules.d/10-basic-config.rules to increase the buffer to 16384 2. Execute xccdf_org.ssgproject.content_rule_audit_basic_configuration rule Actual results: Fails Expected results: Pass Additional info: Workaround is to create his own 99-custom.rules or similar file that modifies the buffer size
Hello, thank you for raising this issue. This particular rule treats the file as one huge blob, so it can't be easily customized. The idea behind the rule is to match files provided by Audit package in /usr/share/audit/sample-rules. Therefore, if we were about to add some explaining comment, I believe this would need to be coordinated with Audit developers as well, so that copying over the sample file does not make the rule fail. However, I think we could add the explanation either to the rule description or into the rule warning section related to performance, I like the later approach more. This would bee modification only to the SCAP content. It would be visible in the HTML report and in the HTML guides. Would this be feasible?
Yes sure, as long as there is something that would help the customers to understand what's wrong, I'll be happy.
I have confirmed that the solution works. However, be ware that files starting with letters are processed even after files which start with numbers. So if you have file: 99-my_config.rules with your custom configuration and there will be file audit.rules with a different -b it will overide your custom configuration.
Confirming also that it works for me, i now define the '-b <value>' in my 40-local.rules file and it gets applied Having a better documentation guidance here on the idea of using the standard files verbatim and then have local customizations in a file like 40-local.rules or 90-my_config.rules is ok. It shall be at least before 99-finalize that is also part of the standard set of audit example files.
I believe I fixed it upstream, there is a new warning section: https://github.com/ComplianceAsCode/content/pull/7909
Fixed upstream: https://github.com/ComplianceAsCode/content/pull/9303
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 (scap-security-guide bug fix and enhancement update), 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-2022:6576