🚀 Zero-Touch Cloud Security is here!

I’ve just published a deep-dive into automating threat detection & remediation using Wiz, AWS Security Hub, and GitHub Actions!

Mentor

Blog

Leveraging Wiz, AWS Security Hub, and GitHub Actions for Cloud Security Remediation

As cloud engineers, ensuring security across cloud infrastructure is paramount. We integrated Wiz, an infrastructure scanning tool, with AWS Security Hub to monitor and remediate security vulnerabilities. By further integrating GitHub Actions and AWS Lambda, we streamlined security issue detection and automated remediation. Here's how we achieved this:

Step 1: Wiz Integration with AWS Security Hub

Wiz provides comprehensive cloud security scanning. It identifies vulnerabilities and compliance issues across AWS resources. After running scans, we integrated Wiz with AWS Security Hub to centralize security findings in a single dashboard. AWS Security Hub aggregates security alerts, allowing us to monitor security statuses across multiple AWS services.

Configuration:

  1. Enable AWS Security Hub
    1. Configure Wiz

      Step 2: Automating Security Findings with GitHub Actions

      Next, we leveraged GitHub Actions to automate the process of creating issues in GitHub repositories based on findings from AWS Security Hub. This helps the team track and resolve issues using their existing workflows.

      Workflow:

      1. AWS Security Hub API
        1. Issue Generation

          Step 3: AWS Lambda for Automated Remediation

          After identifying issues via GitHub, we integrated AWS Lambda to automate the remediation of specific security vulnerabilities.

          Use Case:

          For example, when AWS Security Hub identifies an open S3 bucket, we trigger a Lambda function via SNS or EventBridge that automatically updates the bucket policy to make it private.

          AWS Lambda Steps:

          1. Define Lambda Function
            1. Deploy and Link with AWS Security Hub

              Step 4: Closing the Issue Post-Remediation

              Once the AWS Lambda function successfully remediates the issue, the workflow updates the status of the corresponding GitHub issue as Closed, indicating that the vulnerability has been fixed.

              GitHub Actions Workflow for Closing Issues:

              1. Poll for updates on remediation status using AWS CloudWatch or Lambda logs.
                1. Once confirmed, use the GitHub REST API to close the related issue.

                  Summary Workflow:

                  1. Wiz
                    1. GitHub Actions
                      1. AWS Lambda
                        1. Once remediation is complete, 

                          Benefits:

                          • Fully Automated
                            • Fast Response
                              • Integrated Workflow

                                This solution ensures security vulnerabilities are handled efficiently, automating both detection and remediation processes in a seamless manner.

                                Conclusion

                                This end-to-end workflow integrates WizAWS Security HubGitHub Actions, and AWS Lambda to automate the detection, tracking, and remediation of security vulnerabilities in your AWS environment. By integrating infrastructure scanning tools like Wiz and leveraging automation, we enhance security practices, reduce manual intervention, and streamline remediation, providing a scalable approach to cloud security.

                                To fully automate the process of security detection and remediation using WizAWS Security HubGitHub Actions, and AWS Lambda, follow these advanced steps: