Giter Site home page Giter Site logo

m-mizutani / aws-securityhub-exporter Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 12 KB

CloudFormation stack to export findings of AWS Security Hub to S3 Bucket

Makefile 12.20% Go 57.94% Jsonnet 29.86%
aws securityhub cloudformation-stacks golang lambda

aws-securityhub-exporter's Introduction

aws-securityhub-exporter

aws-securityhub-exporter exports findings of AWS Security Hub to S3 bucket as objects. In this moment (2019.7), AWS does not provide feature to export or push created findings to other AWS services and security products. Then Security Hub can not be integrated with security alert management service and product, such as SIEM (Security Information & Event Manager). aws-securityhub-exporter provides source code and template of AWS CloudFormation to build Lambda function to export findings to S3 bucket. The Lambda function is invoked periodically every 1 minute and fetches fidings in last 10 minutes (default). After that, Lambda put them to S3 bucket idempotently. Then You can integrate your security service/product with S3 event notification feature.

Prerequisite

  • go >= 1.12
  • aws-cli >= 1.16.190
  • GNU make >= 3.81
  • jq >= 1.6
  • jsonnet >= 0.13.0

Deploy

Clone repository

$ git clone https://github.com/m-mizutani/aws-securityhub-exporter.git

NOTE: You do not need to change directory into the repository.

Create config files

2 jsonnet files, deploy.jsonnet and stack.jsonnet are required.

deploy.jsonnet : Configurations for deploy CloudFormation.

{
    StackName: 'your-stack-name',
    // This bucket will be put materials (zipped code) of the stack
    CodeS3Bucket: 'your-bucket-to-save-code',
    // Materials are put under the prefix
    CodeS3Prefix: "materials",
    Region: 'ap-northeast-1',
}

stack.jsonnet : Configurations for CloudFomation stack.

local template = import 'template.libsonnet';

template.build(
    // Required
    S3Bucket='your-s3-bucket',
    // Optional
    S3Prefix='your-prefix/',
    // Optional, IAM Role for Lambda is created automatically if you do not set the item
    LambdaRoleArn='arn:aws:iam::1234567890:role/YourLambdaRole'
)

Run deploy procedure

$ ls
aws-securityhub-exporter
deploy.jsonnet
stack.jsonnet
$ make deploy -f aws-securityhub-exporter/Makefile

License

aws-securityhub-exporter's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

acumenix

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.