Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions products/rhel10/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set(PRODUCT "rhel10")

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 -%}}

Copy link
Member Author

Choose a reason for hiding this comment

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

This sounds like a good idea.

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.


ssg_build_html_cce_table(${PRODUCT})

ssg_build_html_srgmap_tables(${PRODUCT})
Expand Down
2 changes: 2 additions & 0 deletions products/rhel9/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set(PRODUCT "rhel9")

ssg_build_product(${PRODUCT})

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

ssg_build_html_cce_table(${PRODUCT})

ssg_build_html_srgmap_tables(${PRODUCT})
Expand Down
4 changes: 4 additions & 0 deletions utils/tables/reference_tables_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<table>
<thead>
<th>Mapping</th>
<th>CCE</th>
<th>Rule Title</th>
<th>Description</th>
<th>Rationale</th>
Expand All @@ -16,6 +17,9 @@
{{% for rule in rules -%}}
<tr>
<td>{{{ "<br/>".join(rule.relevant_refs) }}}</td>
<td xml:lang="en-US">
{{{ rule.identifiers["cce"] }}}
</td>
<td>{{{ rule.title }}}</td>
<td xml:lang="en-US">
{{{ rule.description }}}
Expand Down
Loading