GithubHelp home page GithubHelp logo

dushyantbhardwaj9 / patchinspect Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 44 KB

PatchInspect is a serverless solution that computes patch compliance score for each server in your AWS environment using AWS Lambda and Systems Manager (SSM)

License: Apache License 2.0

HCL 12.97% Python 87.03%
aws patch ssm lambda n-1 python

patchinspect's Introduction

PatchInspect

PatchInspect is a serverless solution that computes patch compliance percentages for each server in your AWS environment using AWS Lambda and Systems Manager (SSM). Utilizing this tool makes it simple to oversee patch compliance across your whole AWS infrastructure.

Table of Contents

Features

  • Serverless: PatchInspect is built on AWS Lambda, making it cost-effective and scalable.
  • Automated: It automatically collects and computes patch compliance, reducing manual effort.
  • Customizable: You can customize PatchInspect to fit your organization's patch compliance policies.
  • Reporting: Obtain patch compliance reports as raw findings in JSON format.
  • Logging: PatchInspect logs findings in a CloudWatch Log Group for further analysis.

Prerequisites

Before getting started with PatchInspect, make sure you have the following prerequisites:

  • An AWS account with appropriate permissions to create and manage Lambda functions, SSM resources, EventBridge rules, and CloudWatch Logs.
  • AWS CLI installed and configured with the necessary credentials.
  • Terraform installed on your local machine.

Deployment

To deploy PatchInspect in your AWS environment using Terraform, follow these steps:

  1. Clone this GitHub repository:

    git clone https://github.com/yourusername/PatchInspect.git
  2. Navigate to the PatchInspect directory:

    cd PatchInspect
  3. Initialize Terraform:

    terraform init
  4. Review and customize the following configuration files to match your AWS environment:

    • variables.tf: Define Terraform variables that can be customized.
    • terraform.auto.tfvars: Provide values for the Terraform variables, including AWS region, tags, IAM roles, and other settings.
  5. Apply the Terraform configuration to create the necessary resources:

    terraform apply
  6. Once the deployment is complete, PatchInspect will be up and running in your AWS environment.

Usage

  1. Every Monday morning, on a predetermined schedule through AWS EventBridge, PatchInspect gathers patch compliance data. It can be set up to collect at any time period (hours, days, or weeks). If required, it can also be triggered on demand.
  2. The Lambda function runs on every Monday to check patch compliance for all servers in the accounts specified in accounts.json.

Patch compliance reports are obtained as raw findings for each server in JSON format. You can export and analyze these findings using your preferred log analysis or visualization tool.

Configuration

  • variables.tf and terraform.auto.tfvars
  • variables.tf: This file defines Terraform variables that can be customized. Review and modify this file to suit your configuration needs.
  • terraform.auto.tfvars: Provide values for the Terraform variables in this file. Include AWS region, tags, IAM roles, and other settings as required.

Logging

PatchInspect logs its findings in a CloudWatch Log Group named PatchInspect_findings. You can configure log retention policies and access controls for this log group in the AWS Management Console.

Visualization

To visualize and analyze the findings logged by PatchInspect, you can integrate the CloudWatch Logs with visualization tools like ELK (Elasticsearch, Logstash, Kibana) or other log analysis solutions. Here are the general steps:

  1. Set up Elasticsearch: Create an Elasticsearch cluster where the log data will be stored.
  2. Set up Logstash: Configure Logstash to pull data from the CloudWatch Log Group and send it to Elasticsearch.
  3. Set up Kibana: Use Kibana to create custom dashboards and visualizations for your log data.
  4. Configure Log Forwarding: Ensure that CloudWatch Logs are configured to forward log data to your Logstash instance.
  5. Analyze Data: Access Kibana to analyze and visualize your PatchInspect findings easily.

Contributing

We welcome contributions to PatchInspect! If you have any ideas for improvements, bug fixes, or new features, please open an issue or submit a pull request. Check out our contributing guidelines for more details.

License

This project is licensed under the Apache License 2.0. You are free to use, modify, and distribute the code as per the terms of the license.

patchinspect's People

Contributors

dushyantbhardwaj9 avatar

Stargazers

Corcoran Smith avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.