----- Original Message -----
From: "Shawn Wells" <shawn(a)redhat.com>
Sent: Thursday, December 5, 2013 8:33:17 AM
Subject: Re: [PATCH] [RFC] Creating shared bash script directory
On 12/4/13, 5:13 AM, Jan Lieskovsky wrote:
> Hello Shawn,
> just to known the current status of this one..
> Are we waiting for wider feedback from other participants
> of this mailing list for their opinion prior going ahead
> implementing this?
> Or should I first look what would need to be changed (and
> come with a proposal how to fix) wrt to RPM packages building
> from new scheme prior actually starting using your proposal?
Many of us are just getting back online after the US holidays, so
apologies for the delay. I did want to give others a chance to chime in
Thank you. No worries (understandable).
A few comments in-line below.
> ----- Original Message -----
>> From: "Jan Lieskovsky" <jlieskov(a)redhat.com>
>> To: scap-security-guide(a)lists.fedorahosted.org
>> Sent: Tuesday, December 3, 2013 10:59:58 AM
>> Subject: Re: [PATCH] [RFC] Creating shared bash script directory
>> ----- Original Message -----
>>> From: "Shawn Wells" <shawn(a)redhat.com>
>>> To: scap-security-guide(a)lists.fedorahosted.org
>>> Sent: Tuesday, December 3, 2013 5:56:48 AM
>>> Subject: Re: [PATCH] [RFC] Creating shared bash script directory
>>> On 12/2/13, 7:42 AM, Jan Lieskovsky wrote:
>>> ----- Original Message -----
>>> >From 3ad8ce28808123fb2d66db09afb98a3b7fd105b4 Mon Sep 17 00:00:00 2001
>>>> From: Shawn Wells <shawn at redhat.com> > Date: Fri, 29 Nov
>>>> -0500 > Subject: [PATCH] [RFC] Creating shared bash script directory
>>>> As remediation content expands, many scripts will be repurposed across
>>>> operating system releases. To reduce > the maintanence burden of
>>>> the same script in multiple places, I propose to create a shared fix
>>>> directory. A patch to demonstrate this concept is attached.
>>> This is a great idea.
>>>> combinefixes was modified to first look at input/fixes/bash, then .. /
>>>> shared/fixes / , else echo a "no fix exists" message.
>>>> The downside to this approach is "exclusion" -- just because a
>>>> not exist within RHEL6/fixes/bash does not > automatically mean we
>>>> the .. / shared/fixes / version. Unsure how to handle this. One idea
>>>> to 'touch RHEL6/fixes/bash', > and then delete that file if
>>>> version was to be inherited.
>>> How about to keep the shared fixes scripts as proposed, but have
>>> unmodified? IOW
>>> when the fix should be included, we would create just symlink from the
>>> to particular product fixes directory (no symlink => fix isn't
>>> add some README
>>> file in the shared directory documenting this practice (IOW when adding
>>> fixes the
>>> contributor to consider if the fix is universal enough and could be
>>> also in
>>> other product).
>>> That's completely common sensical.
>>> What are your thoughts on doing this for OVAL as well? We'd need to
>>> the platform tags, however that's much simpler than retaining multiple
>>> copies of the core OVAL.
>> Was thinking about OVAL checks too - I think it would make sense to share
>> checks as much as possible also. Two cases can happen (I can quickly think
>> * just platform would differ - we could handle this via XSLT
>> the Makefile stage for product (IOW the shared version would have some
>> evaluated during build of the content to one of RHEL6 / Fedora 19
I really like your idea of XSLT. To expand upon this, perhaps we could
write logic into the XSLT that would verify the OVAL has received
test_attestation for the associated platform.
I think this is another great proposal.
> <definition class="compliance" id="umask_for_daemons"
> <title>Set Daemon umask</title>
> <affected family="unix">
> <platform>Red Hat Enterprise Linux 6</platform>
For the initial version I will replace platform value with
system_name in the XSLT transform for the beginning. Should we find
better way how to reference it, it can be changed later yet.
> <description>The daemon umask should be set as
> <reference source="swells" ref_id="20130901"
> ref_url="test_attestation" />
> <criterion test_ref="test_umask_for_daemons" />
I propose we extend the <reference> tag, to something similar to:
<reference source="swells" ref_id="20130901"
And if the check should be for more platforms, there would be multiple
platform="" attributes or multiple 'reference' rows?
Besides that (maybe subject for another thread again), since the test
attestations seems to have unique identifiers already, would we want
to save the content / scenario, that have been performed within that
testing? Meaning the exact list of commands, that have been executed
(together with possible configuration changes if involved), so person
performing attestation (again) later (in case check got enhanced) could
run that steps / scenario again (still manually) to ensure no regression
was introduced? Would we want to keep this information within scap-security-guide
Git repository or in some new Git repository? SSG-tests or SCAP-tests?
This would be one set of tests to be performed, and hopefully in the
future we will come with a way how automated testing could be performed
too (so from this perspective having this testing information stored
[if agreed to] in separate repository would make more sense).
The XSLT would check for test_attestation against platform=RHEL6, and if
so, continue the build. If the Make was running against Fedora, the
build would fail with an error similar to "Error: No test_attestation
for umask_for_daemons against Fedora 19"
I can see the benefit here. Also this somehow concludes we (I) should
start creating attestations for Fedora rules :) (or maybe wait and
do it later when we merged the content and provide them only once
tested on Fedora).
We'd probably want some developer level flag to override this though,
for non-RPM builds that the development community runs on their local
This should be possible to implement too. Looks like another great proposal.
>> * whole OVAL check would differ (examples SysV Init vs systemd) - in this
>> each of the products would have its own OVAL implementation at
>> I think this proposal is elastic enough to allow us to have shared
>> on one side (symlinks to shared code case), and also deal with
>> of a specific product (instead of symlink it would have the OVAL
>> definition /
>> remediation script implementation on expected place for that product).
>> To get this working we would need yet slightly to modify the way how RPMs
>> created for both of RHEL / Fedora (include the shared directory etc.), but
>> (I think) the advantages / simplification this concept brings are worthy
>> Thank you && Regards, Jan.
>> Jan iankko Lieskovsky / Red Hat Security Technologies Team
Thank you && Regards, Jan.
Jan iankko Lieskovsky / Red Hat Security Technologies Team
scap-security-guide mailing list