Coder Social home page Coder Social logo

isabella232 / serverless-vulnerability-scanner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silinternational/serverless-vulnerability-scanner

0.0 0.0 0.0 193 KB

Use AWS Lambda to regularly scan your repos for vulnerabilities

Shell 24.75% JavaScript 30.00% Makefile 3.86% HCL 38.75% Dockerfile 2.63%

serverless-vulnerability-scanner's Introduction

Serverless Vulnerability Scanner

Use AWS Lambda to regularly scan your repos for vulnerabilities

Environment Variables

To deploy this, you will need to provide the following environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • GITHUB_TOKEN
  • RESULTS_S3_BUCKET_PREFIX

In addition, you will need to provide EITHER...

  • GITHUB_ORG

... (to scan a GitHub organization) AND/OR...

  • BITBUCKET_USERNAME
  • BITBUCKET_APP_PASSWORD
  • BITBUCKET_WORKSPACE

... (to scan a Bitbucket workspace).

If you also want to check the PHP versions used in the repos' Dockerfiles (such as for use of End-Of-Life versions of PHP), also provide...

  • VERSIONS_CSV_URL

For details on what that CSV file needs to contain, see https://github.com/silinternational/vulnerability-scanner#checking-php-versions

Results S3 Bucket

A CSV file of the results of the scan will be uploaded to an Amazon S3 bucket named using this template:

`${RESULTS_S3_BUCKET_PREFIX}-${STAGE}`

For example, if you use RESULTS_S3_BUCKET_PREFIX=scan-results and deploy a production copy of this, the bucket will be named scan-results-prod.

AWS IAM Permissions for CI/CD (deployments, removals)

The /terraform directory contains Terraform configuration to create an AWS IAM user for Serverless deployment. If you prefer to create the user manually, the /templates/iam-role-for-ci-cd.json file contains a template for what your AWS IAM user's permission policy will probably need to be in order to successfully deploy (serverless deploy) or remove (serverless remove) this serverless application.

HOWEVER, you will need to replace every occurrence of {RESULTS_S3_BUCKET_PREFIX} in that JSON file with the actual value you used for that environment variable. After you do that replacement, you should be able to create an AWS IAM user, add a custom policy to that user (using that JSON you just assembled), and use that user's AWS key/secret as the values for the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY on your CI/CD platform.

serverless-vulnerability-scanner's People

Contributors

briskt avatar forevermatt 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.