-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run Linux-level CIS benchmark on EKS Management Node Group #3776
Comments
Created this issue to track upstream ticket, |
We were able to run the CIS DIL benchmarks by hand. (See the "sketch" section of the post above for the how-to.) The results for both the stock AWS Linux 2 optimized for EKS image and the GSA ISE-hardened image are in this Google Drive folder. We compared the results and communicated them with our ISSM and the folks providing the hardened AMI in the email thread |
I'm documenting the issue we ran into when trying to automate the CIS audit through the AWS SSM console here, both as a reference point for people searching, and so that I can point AWS support at this info. Following this article, I was able to successfully run a Linux Inspec profile (linux-baseline) using
The resulting reports were integrated into the Then I tried to run the CIS Distribution Independent Benchmark (cis-dil-benchmark) with this sourceInfo:
I got errors. The stderr under RunCommand said:
Note in particular the error: Although that error is documented in the AWS SDK docs, I couldn't figure out why I would be seeing it when we run this InSpec profile, but not the previous one. We only saw this one Gitter reference describing what we were seeing, and no indication that anyone got an answer there. Searching more we found it's failing a validation set by AWS itself. There appears to be hard requirement on the technical specifications of a benchmark in terms of a service quota for We figured that 800K must refer to the size of the report generated by the Here's the thing, though: The Inspec report output was only 123K! So our hypothesis that the error was due to the RunCommand output being bigger than 800K went out the window. For compliance purposes, we do eventually want to go back and ensure the CIS benchmark is periodically run, and that the results are auditable using nice tools like Compliance. However, we're stumped as to why we ran into the |
I reproduced this with our AWS rep in a screenshare session. We found that the AWS-RunInSpecChecks document includes the flag Reported upstream to AWS in the ssb-production account and asked for the service quota to be increased if possible, since the forms don't allow for it... Case ID 9924596491. |
Note that if you want to see what a
In this case the script was called
|
Following back here, running Inspec in a docker container does not fulfill the purpose of the # On Host
Profile Summary: 141 successful controls, 56 control failures, 38 controls skipped
Test Summary: 831 successful, 1934 failures, 38 skipped
# In Docker
Profile Summary: 75 successful controls, 96 control failures, 56 controls skipped
Test Summary: 495 successful, 267 failures, 59 skipped |
That's about what I would expect... The DIL benchmark only makes sense on container hosts! |
The only reason I mentioned it was because, in the sketch, we had put,
That doesn't work, inspec would need to be installed with something like this. So, to summarize, our original findings were bad. |
Oh good point! |
User Story
In order to understand the risk of running non-CIS-compliant EC2 AMIs in our EKS managed node groups, the SSB team wants to run the CIS Distribution-Independent Linux Benchmark on instances running both the stock and GSA-hardened image.
Acceptance Criteria
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]
THEN I see files clearly labeled that include test results from scans on the two AMIs.
Background
[Any helpful contextual notes or links to artifacts/evidence, if needed]
Security Considerations (required)
No impact... We are doing this work to gather information for decision making, but not actually changing our system.
Sketch
Find an instance of the type you want to test in AWS SSM Fleet Manager, and start a terminal session there. Then:
The text was updated successfully, but these errors were encountered: