Code Monkey home page Code Monkey logo

lambda-github-secgroup-updater's Introduction

ƛ GitHub Security Updater

This is a Lambda to periodically synchronize security groups with the IP ranges for webhooks provided by GitHub's API.

The use case for this would be having a service locked down by source IP in the whitelist, which still needs to receive webhooks for repository events from GitHub (ie a CI/CD tool).

This tool uses the Serverless Framework for deployment

How it works

This will take the current set of webhook IP ranges from GitHub's API, and maintain a new security group allowing these IP ranges on ports 80 and 443.

This can maintain a security group across multiple VPCs.

Configuration, Installation & Deployment

Clone this repository, and change to the cloned directory.

Configuration is expected to be found in AWS EC2 Systems Manager Parameter Store.

All variables live under the prefix of /github_secgrp_updater/{STAGE}. Replace stage with the relevant stage you are deploying (ie /github_secgrp_updater/dev/)

Relevant variables are shown in the table below.

Variable Required Default Value Description
/vpc_ids Yes A comma separated list of VPC IDs in which to maintain a security group.
/secgrp_name No AllowGitHubWebhooks Override the name of the maintained security group

Finally, deploy with the following

npm install serverless -g

serverless deploy

Deploying multiple environments

This supports the serverless framework's concept of stages. Deploy additional stages like so:

serverless deploy --stage prod

Contributions & Changelog

Please see the GitHub Releases page for the changelog of this tool.

Releases will be properly versioned following Semantic Versioning.

Contributions are welcome, in the form of either issues or pull requests.

lambda-github-secgroup-updater's People

Contributors

hreeder avatar

Watchers

James Cloos 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.