8000 Build reference tables in RHEL9 and RHEL10 and include CCE by ggbecker · Pull Request #13890 · ComplianceAsCode/content · GitHub
[go: up one dir, main page]

Skip to content

Conversation

ggbecker
Copy link
Member
@ggbecker ggbecker commented Sep 12, 2025

Description:

  • Build reference tables in RHEL9 and RHEL10 and include CCE

Rationale:

  • These tables are a good source of information for people mapping things. The CCE is a unique identifier for rules and should help people managing content.

  • Tables are published at: https://complianceascode.github.io/content-pages/tables and can be easily accessed by people.

  • Note: These tables will be built into the final package and are seen as a change in the content of the rpm package for example. They will trigger a change and this change needs to be acknowledged.

  • Build the content and inspect files at build/tables

Rendered table
Screenshot From 2025-09-12 15-07-22

@ggbecker ggbecker added this to the 0.1.79 milestone Sep 12, 2025
@jan-cerny jan-cerny self-assigned this Sep 15, 2025

ssg_build_product(${PRODUCT})

ssg_build_html_ref_tables("${PRODUCT}" "table-${PRODUCT}-{ref_id}refs" "anssi;cis;cui;nist;pcidss")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not happy about reactivating the legacy tables in new products. Our goal is to get rid of them instead. We replaced them by control files, and also by rendering the control files as HTML online.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I understand that. The thing is that we don't have an easy way to map CCEs into references, and some customers find it useful.

Would be another way to creating these mappings?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I understand that. The thing is that we don't have an easy way to map CCEs into references, and some customers find it useful.

Good point, I have missed that CCEs can be useful to some people. But I still think we should evaluate whether a separate table is what you want. People also can see the CCEs in HTML guides and HTML reports.

Would be another way to creating these mappings?

You should be able to add CCE number to rendered control files (eg. https://complianceascode.github.io/content-pages/rendered-policies/rhel9/cis_rhel9.html ) this way:

diff --git a/utils/rendering/controls-template.html b/utils/rendering/controls-template.html
index 89d41299b0..0db14fc67b 100644
--- a/utils/rendering/controls-template.html
+++ b/utils/rendering/controls-template.html
@@ -30,7 +30,7 @@ based on <a href="{{{ policy.source }}}">{{{ policy.source }}}</a>
     {{%- endif -%}}
     {{%- else %}}
     {{%- if selection in rules %}}
-    <li><a href="https://github.com/ComplianceAsCode/content/tree/master/{{{ rules[selection].relative_definition_location }}}">{{{ selection }}}</a>: {{{ rules[selection].title }}}</li>
+    <li> {{{ rules[selection].identifiers['cce'] }}} <a href="https://github.com/ComplianceAsCode/content/tree/master/{{{ rules[selection].relative_definition_location }}}"> {{{ selection }}}</a>: {{{ rules[selection].title }}}</li>
     {{%- else %}}
     <li>{{{ selection }}} - not available for this product</li>
     {{%- endif -%}}


ssg_build_product(${PRODUCT})

ssg_build_html_ref_tables("${PRODUCT}" "table-${PRODUCT}-{ref_id}refs" "anssi;cis;cui;nist;pcidss")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this selection of profiles? What about E8, STIG, and other profiles?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's the same we had in RHEL8

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that if we do it we should do it for all profiles existing.

Copy link
openshift-ci bot commented Sep 22, 2025

@ggbecker: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-openshift-node-compliance db9179e link true /test e2e-aws-openshift-node-compliance
ci/prow/e2e-aws-openshift-platform-compliance db9179e link true /test e2e-aws-openshift-platform-compliance

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0