All Projects → awslabs → amazon-inspector-auto-remediate

awslabs / amazon-inspector-auto-remediate

Licence: Apache-2.0 license
Lambda job in Python to automatically patch EC2 instances when an inspector assessment generates a CVE finding

Programming Languages

python
139335 projects - #7 most used programming language

AmazonInspectorAutoRemediation

This script is designed to run in AWS Lambda and will not work elsewhere.

This is an AWS Lambda job, written in Python, to automatically patch EC2 instances when an inspector assessment generates a CVE finding.

The job requires that the EC2 instance to be patched have the SSM (EC2 Simple System Manager) agent installed, and the agent must have a role attached with necessary SSM permissions. For details on this, see https://docs.aws.amazon.com/ssm/latest/APIReference/Welcome.html.

The job is triggered by an SNS notification of a new finding from Inspector. The job checks to make sure that the finding is a CVE missing patch finding, and if so, it checks to ensure tha the SSM agent is running. It then uses SSM to issue the appropriate patch-and-reboot commands to either Ubuntu or Amazon Linux.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].