Skip to content

Add missing OCIL to PCI-DSS rules#14783

Open
eran132 wants to merge 2 commits into
ComplianceAsCode:masterfrom
eran132:add-missing-ocil-pcidss-rules
Open

Add missing OCIL to PCI-DSS rules#14783
eran132 wants to merge 2 commits into
ComplianceAsCode:masterfrom
eran132:add-missing-ocil-pcidss-rules

Conversation

@eran132
Copy link
Copy Markdown

@eran132 eran132 commented Jun 7, 2026

Description:

  • Adds the ocil and ocil_clause fields to three rules that were missing OCIL (manual check) content:
    • audit_rules_session_events
    • chronyd_or_ntpd_specify_multiple_servers
    • disable_prelink
  • Each new OCIL mirrors the style of an existing sibling rule (audit_rules_usergroup_modification for the audit watch, chronyd_or_ntpd_specify_remote_server for the NTP rule) and describes how to manually verify the rule's expected state.

Rationale:

Review Hints:

  • The change is additions only (33 lines across 3 rule.yml files); no checks or remediations are touched.
  • I verified the OCIL renders by building the data streams locally:
    • audit_rules_session_events and chronyd_or_ntpd_specify_multiple_servers appear in build/ssg-rhel8-ds.xml (./build_product rhel8 --datastream).
    • disable_prelink is not applicable to RHEL 8 (the prelink package isn't shipped there), so I verified it in build/ssg-sle15-ds.xml (./build_product sle15 --datastream --rule-id disable_prelink), where its OCIL text and ocil_clause render as expected.

🤖 Generated with Claude Code

Three rules referenced by the PCI-DSS controls were missing OCIL
(manual check) content, leaving them without questionnaire text in the
generated benchmarks:

- audit_rules_session_events
- chronyd_or_ntpd_specify_multiple_servers
- disable_prelink

Add an ocil_clause and ocil block to each, mirroring the style of
sibling rules (audit_rules_usergroup_modification,
chronyd_or_ntpd_specify_remote_server). The OCIL describes how to
manually verify each rule's expected state.

Verified the OCIL renders by building the data streams: session_events
and chronyd_or_ntpd_specify_multiple_servers in ssg-rhel8-ds.xml, and
disable_prelink in ssg-sle15-ds.xml.

Fixes: ComplianceAsCode#4913

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 7, 2026 04:48
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 7, 2026

Hi @eran132. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Jun 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds OCIL (manual check) guidance to several security rules so auditors have clear, standardized verification steps.

Changes:

  • Added ocil_clause and ocil sections to the disable prelinking rule.
  • Added ocil_clause and ocil sections to the multiple NTP servers rule.
  • Added ocil_clause and ocil sections to the audit session events rule.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
linux_os/guide/system/software/integrity/disable_prelink/rule.yml Adds OCIL text describing how to confirm prelinking is disabled (or package absent).
linux_os/guide/services/ntp/chronyd_or_ntpd_specify_multiple_servers/rule.yml Adds OCIL text describing how to verify multiple NTP sources are configured.
linux_os/guide/auditing/auditd_configure_rules/audit_rules_session_events/rule.yml Adds OCIL text describing how to verify audit rules covering session event files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +45 to +49
<pre>$ grep PRELINKING /etc/sysconfig/prelink</pre>
If prelinking is disabled, the output should contain the following line:
<pre>PRELINKING=no</pre>
Alternatively, if the <tt>prelink</tt> package is not installed, prelinking is
not enabled and the rule is also satisfied.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — applied in f424103. The OCIL now checks rpm -q prelink first and only greps /etc/sysconfig/prelink when the package is installed, which mirrors the OVAL check's OR structure (package not installed OR PRELINKING=no).

Comment on lines +119 to +120
In the file, there should be multiple lines similar to the following:
<pre>server <i>ntpserver</i></pre>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — I looked at the rule's OVAL before deciding. The check (shared/checks/oval/chronyd_specify_multiple_servers.xml) matches only server directives with the pattern ^([\s]*server[\s]+.+$){2,}$; it does not count pool lines. Keeping the OCIL to server keeps the manual check aligned with the automated check — if the OCIL told auditors to count pool entries, a system could pass the manual review while still failing the scan. This also matches the sibling rule chronyd_or_ntpd_specify_remote_server, whose OCIL references server only.

Comment on lines +59 to +61
<pre>auditctl -l | grep -E '(/var/run/utmp|/var/log/btmp|/var/log/wtmp)'</pre>
If the system is configured to watch for these events, lines should be returned for
each file specified (and with <tt>-p wa</tt> for each).
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The returned auditctl -l lines include the permission flags inline (e.g. -w /var/run/utmp -p wa -k session), and the OCIL already directs the reviewer to confirm -p wa is present for each file, so the procedure does verify both the watched paths and the wa permissions. I kept the phrasing consistent with the established sibling rule audit_rules_usergroup_modification, whose OCIL uses the same auditctl -l | grep -E ... approach with an explicit perm=wa confirmation note.

Address review feedback: check whether the prelink package is installed
before grepping /etc/sysconfig/prelink. This matches the OVAL check's OR
structure (package not installed OR PRELINKING=no) and avoids a missing
/etc/sysconfig/prelink looking like a failure when prelink is absent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Arden97 Arden97 self-assigned this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some rules in PCI-DSS profile are missing OCIL (RHEL8)

3 participants