Skip to content
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

CIS 4.1 remediation fails and is not remediate in v1.5.0 #68

Closed
6 tasks
andm1 opened this issue Oct 13, 2022 · 5 comments
Closed
6 tasks

CIS 4.1 remediation fails and is not remediate in v1.5.0 #68

andm1 opened this issue Oct 13, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@andm1
Copy link

andm1 commented Oct 13, 2022

image
Describe the bug

After being v1.5.0 , CIS 4.1 remediation fails and is not remediate.
the workflow of SecurityHub has been changed to "NOTICED" and the following comments are displayed.
”update_text
Security Standard CIS v1.2.0 control 4.1 has no automated remediation.”

Also, there are some issues founded as follows;

  • the execution log of StepFunction says that the document cannot be found.
    ChoiceStateEnteredAutomation Doc Active
      "AutomationDocument": {
    "ResourceRegion": "ap-northeast-1",
    "DocState": "NOTFOUND",
    "SecurityStandardVersion": "1.2.0",
    "AccountId": "XXXXXXXXXXXX",
    "Message": "Document SHARR-CIS_1.2.0_4.1 does not exist.",
    "AutomationDocId": "SHARR-CIS_1.2.0_4.1",
    "RemediationRole": "SO0111-Remediate-CIS-1.2.0-4.1",
    "ControlId": "4.2",
    "SecurityStandard": "CIS",
    "SecurityStandardSupported": "True"

  • There are no CIS 4.1 SSM parameters in the resources deployed in CloudFormation (solutions/SO0111/CIS/4.1/remap)

Please complete the following information about the solution:

  • Version: v1.5.0
  • Region: ap-notheast-1
  • Was the solution modified from the version published on this repository? - No
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your service quotas for the sevices this solution uses? - Yes
  • Were there any errors in the CloudWatch Logs? Troubleshooting - No

Screenshots

image

@andm1 andm1 added the bug Something isn't working label Oct 13, 2022
@hearde
Copy link
Member

hearde commented Oct 13, 2022

Can you please start with these troubleshooting steps:

  1. Confirm the member stack is deployed in the admin account and the account where the remediation is being attempted
  2. Confirm the control parameter is "available" in the member stack parameters for CIS - it's a nested stack so you'll need to navigate to the nested stack in cloudformation rather than the top-level member stack

If both of those are true, then this sounds like a bug.

As a side note, it's not unexpected for there not to be a parameter solutions/SO0111/CIS/4.1/remap since the original finding was under control CIS v1.2.0 4.2, which gets remapped to 4.1 with the parameter solutions/SO0111/CIS/4.2/remap.

@andm1
Copy link
Author

andm1 commented Oct 14, 2022

Appreciated for your quick response.

1. Confirm the member stack is deployed in the admin account and the account where the remediation is being attempted

For the admin account, the following templates have been deployed. This is the state as shown in the screenshot image.
https://solutions-reference.s3.amazonaws.com/aws-security-hub-automated-response-and-remediation/latest/aws-sharr-deploy.template
image

Also, for the member account where the remediation is being attempted, the following two templates are deployed in Stacksets.
https://solutions-reference.s3.amazonaws.com/aws-security-hub-automated-response-and-remediation/latest/aws-sharr-member-roles.template
https://solutions-reference.s3.amazonaws.com/aws-security-hub-automated-response-and-remediation/latest/aws-sharr-member.template

Are these steps correct and enough?

2.Confirm the control parameter is "available" in the member stack parameters for CIS - it's a nested stack so you'll need to navigate to the nested stack in cloudformation rather than the top-level member stack

In the CIS parameter list, I found the "Enable41" is "available".
These are screenshots of parameter tab and templetes tab of member account:
image
image

@hearde
Copy link
Member

hearde commented Oct 14, 2022

If I'm understanding correctly, you're saying that the admin account has the stack aws-sharr-deploy.template deployed (and its nested stacks), and the member accounts have aws-sharr-member.template and aws-sharr-member-roles.template deployed (and their nested stacks).

The problem is that all three stacks need to be deployed into the admin account for any remediation to complete - not just for this control (CIS 4.1). So the admin account should have these three stacks (and their nested stacks):

  • aws-sharr-deploy.template
  • aws-sharr-member.template
  • aws-sharr-member-roles.template

And the member accounts should only have the member templates deployed (and their nested stacks):

  • aws-sharr-member.template
  • aws-sharr-member-roles.template

I realize this is not obvious from the template names. Sorry for the confusion. I also reviewed our implementation guide and it does not make this very clear either. I'll add an item for us to clarify this in a future update to our documentation.

If you continue to run into errors after installing those templates, please continue to update this bug.

@hearde
Copy link
Member

hearde commented Nov 4, 2022

To correct my earlier comment, deploying the member and member-roles stacks in the admin account is only necessary if you want to remediate issues in the admin account. What you described is a correct way to set up the solution.

We will try to reproduce this and figure out what's going on.

@hearde
Copy link
Member

hearde commented Nov 9, 2023

We have been unable to reproduce this issue. Please reopen this if you can provide steps to reproduce this in the latest version.

@hearde hearde closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants