<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I had the exact same issue: we required a document (call it a guide) clearly stating what rules each profile included for each of our customers/profiles.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I worked around it by creating a copy of the open-scap&#8217;s /usr/share/openscap/xsl/, and tweaked &#8216;security-guide.xsl&#8217; to match my needs. Next, run oscap against it, eg, by adding to SSG&#8217;s Makefile:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>guide: shorthand2xccdf<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>(&#8230;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>oscap xccdf generate custom --stylesheet tweaked-security-guide.xsl --profile customer-profile-1 $(OUT)/unlinked-notest-rhel-xccdf-guide.xml &gt; $(OUT)/Guide-customer-profile-1.html<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>(&#8230;)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You should have some knowledge of XSLT to customize the transform; I had none, but with a bit of trial and error the result was satisfactory.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=PT style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>--<o:p></o:p></span></p><p class=MsoNormal><span lang=PT style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>Rui Pedro Bernardino<o:p></o:p></span></p><p class=MsoNormal><span lang=PT style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>CTE2/Tecnologias e Desenvolvimento<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:#1F497D'>PT Inovação<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> open-scap-list-bounces@redhat.com [mailto:open-scap-list-bounces@redhat.com] <b>On Behalf Of </b>Sven Vermeulen<br><b>Sent:</b> quinta-feira, 12 de Dezembro de 2013 06:53<br><b>To:</b> Shawn Wells<br><b>Cc:</b> open-scap-list@redhat.com<br><b>Subject:</b> Re: [Open-scap] oscap generate guide ignores profile<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p><br>On Dec 12, 2013 3:37 AM, &quot;Shawn Wells&quot; &lt;<a href="mailto:shawn@redhat.com">shawn@redhat.com</a>&gt; wrote:<br>&gt;<br>&gt; On 12/11/13, 4:34 PM, WARREN wrote:<br>&gt;&gt;<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; One of the useful facilities in openscap is to generate a &quot;security guide&quot;<br>&gt;&gt;<br>&gt;&gt; When I run:<br>&gt;&gt; # oscap xccdf generate --profile Baseline guide --output \<br>&gt;&gt; &nbsp; &nbsp; &nbsp; BaselineGuide.html solaris-xccdf.xml<br>&gt;&gt;<br>&gt;&gt; the guide produced includes everything from the XCCDF file and not<br>&gt;&gt; just for the &quot;--profile&quot; specified. I see a table at the end telling<br>&gt;&gt; me what would be selected (or not) for the profile selected, but it<br>&gt;&gt; seems to me that having everything in the guide is confusing, as the<br>&gt;&gt; different profiles call different checks (obviously) and having them<br>&gt;&gt; all there whether they are used or not seems like not the best idea.<br>&gt;&gt;<br>&gt;&gt; Is there some way to turn off this &quot;feature&quot;? perhaps by manipulating<br>&gt;&gt; a style sheet? or should I call it a bug?<br>&gt;<br>&gt;<br>&gt; +1<br>&gt;<br>&gt; It'd be incredibly useful to generate a true guide, versus a checklist, per profile.<o:p></o:p></p><p>I don't think that is possible without changing the XCCDF schema. The content of a guide is provided by Group tags whereas the checks are Rule tags.<o:p></o:p></p><p>Profiles are used to toggle Rules, not Groups, so openscap cannot know which Groups to include and which don't.<o:p></o:p></p><p>At least, that is my feeble impression on the XCCDF standard. Might be wrong though.<o:p></o:p></p><p>Wkr,<br>&nbsp; Sven<o:p></o:p></p></div></body></html>