content icon indicating copy to clipboard operation
content copied to clipboard

RHEL 7 DISA STIG REGEX Error

Open HewittJC opened this issue 8 years ago • 5 comments

Description of problem:

The regex that searches for the control:

Ensure Home Directories are Created for New Users

Is actually searching for:

^[\s]*(?i)CREATE_HOME(?-i)[\s]+no[\s]*(?:|(?:#.*))?$

But should read:

^[\s]*(?i)CREATE_HOME(?-i)[\s]+yes[\s]*(?:|(?:#.*))?$

SCAP Security Guide Version:

Unsure what version, possibly 1.2 if I am looking at the right number

Operating System Version:

CentOS 7.4

Steps to Reproduce:

  1. Add the CREATE_HOME yes to /etc/login.defs
  2. Run scan
  3. It is marked failure

Actual Results:

Marked as failure

Expected Results:

Should Pass

HewittJC avatar Oct 25 '18 16:10 HewittJC

Hi @HewittJC,

This was fixed upstream last year through https://github.com/ComplianceAsCode/content/commit/090efd487d.

Likely need to update your downstream packaging, e.g.

$ yum update scap-security-guide

If still having troubles after updating, can you share your content version?

$ rpm -qv scap-security-guide

shawndwells avatar Oct 25 '18 16:10 shawndwells

My apologies, I also should have included that I am using the MacOS version of workbench and I am using an SSH connection to perform the scan.

Should this also be fixed there? I downloaded the workbench from the website only a few days ago to make sure I was up to date.

HewittJC avatar Oct 25 '18 16:10 HewittJC

SCAP Workbench >= v1.2.0 does have the fix included (just checked on my install). Would guess the endpoint (the CentOS machine) has older scap-security-guide installed.

shawndwells avatar Oct 25 '18 18:10 shawndwells

Okay, I will try to update that on the target machine then and report back!

HewittJC avatar Oct 25 '18 18:10 HewittJC

I was out of date on my end. Thanks for the help!

HewittJC avatar Oct 26 '18 17:10 HewittJC