From blank at eclipse.ncsc.mil Thu Aug 20 11:30:51 2015 Content-Type: multipart/mixed; boundary="===============2548904573855549455==" MIME-Version: 1.0 From: Jeffrey Blank To: scap-security-guide at lists.fedorahosted.org Subject: template for file entries Date: Thu, 05 Apr 2012 09:37:05 -0400 Message-ID: <4F7DA001.5090507@eclipse.ncsc.mil> In-Reply-To: 30EF6B99D744684DBB7C1A3DD5C645ED6CD6FC@Exchange10.columbia.tresys.com --===============2548904573855549455== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable A few things (and changing subject properly): 1) Is this solving a problem we really have right now? I don't really = think it is, but I'm open to being corrected. 2) This is also too clever. The clean_line function (in the patch) has = regexes to edit regexes. The script is also doing its own parsing of = its own format (instead of using existing parsers for JSON or XML or CSV = or whatever). For now I don't see this simplifying the creation of content more than = it complicates the maintenance/comprehension overhead. If we suddenly = need to do more line edits, let's revisit. I also have a draft XSLT = that might fit the bill (but I'm also not convinced it solves more = problems than it creates). On 03/30/2012 02:48 PM, Michael Palmiotto wrote: > To aid in the automation of OVAL checks, I've written a script that > generates the check.xmls to test for lines being properly added to > config files. > > Attached you'll find the example template and the output for 2.6.2.4.6 Re= cord Attempts > to Alter Process and Session Initiation Information. > > The file "test_input_1_entry" has the relevant lines for the addition of = a test: > oval_id: > title: "Title of Check" > cces: "CCE-#, CCE-#" > desc: "Description of check" > tests: > test_name_1: > filepath: "Path of file to be checked" > filename: "Name of file to be checked" > line: "Text that needs to be added to the file" > > The template file, "template_file_entries" is similar to the current temp= late files, > with tags for oval_id, title, cces, desc, tests, etc: > >