Giter VIP home page Giter VIP logo

inspec-aws-baseline's Introduction

Table of Contents generated with DocToc

InSpec AWS Baseline Profile

GitHub release (latest SemVer)

This profile covers some parts of the "CIS Amazon Web Services Foundations Benchmark (v1.2.0)".

Batteries included:

  • IAM
    • MFA for root account ✅
    • Password Policy ✅
    • all your Access Keys - Expiration ✅
  • Logging
    • AWS Config is active ✅
    • CloudTrail is enabled ✅
  • Networking
    • Security Groups for SSH are restricted ✅
    • Security Groups for Remote Desktop (RDP) are restricted ✅
  • additional best-practices not covered by the CIS Benchmark:
    • all your S3 Buckets are not public and encrypted (per Region) ✅
    • Organizations ✅
    • all your EBS volumes should be encrypted (per region) ✅
    • ECR: Test that images are scanned for vulnerabilities at a push to repository ✅

Usage

Please make sure you have InSpec version >= 4 installed, e.g. with bundle install (see Gemfile for details).

We recommend the usage of aws-vault.

IAM Permissions

Make sure your Auditor IAM User has the following managed policy attached:

arn:aws:iam::aws:policy/SecurityAudit

It is also possible to use higher privileged policies, such as arn:aws:iam::aws:policy/ReadOnlyAccess.

Profile Execution - variant A

You can easily use this InSpec profile from Github:


  ## the "-n" instructs aws-vault not to use AWS STS session tokens:
  aws-vault exec -n <YOURNAMEDPROFILEHERE> -- inspec exec \
    -t aws:// --show-progress \
    https://github.com/centriascolocation/inspec-aws-baseline/archive/master.tar.gz

Profile Execution - variant B

Call InSpec with AWS region + your local configured Profile:


  inspec exec -t aws://eu-central-1/my-named-profile --show-progress \
    https://github.com/centriascolocation/inspec-aws-baseline/archive/master.tar.gz
  

Re-Vendor Dependencies


  inspec vendor --overwrite . 

AWS Organizations

You can also check if a given account is part of AWS Organizations (Master or Member). This feature is disabled by default. You can enable it by providing variables given as an InSpec Input File.

See example configurations here.


  aws-vault exec -n <YOURNAMEDPROFILEHERE> -- inspec exec \
    https://github.com/centriascolocation/inspec-aws-baseline/archive/master.tar.gz \
    -t aws:// --show-progress \
    --input-file enable-aws-organizations-checks.yml

Local execution of tests with Docker

  git clone https://github.com/centriascolocation/inspec-aws-baseline.git
  
  make build-docker-images
  aws-vault exec -n <YOURNAMEDPROFILEHERE> -- make test
  

Further Information

The Importance of Compliance Results

These values are based off CVSS 3.0:

numeric value impact, importance
0.0 to <0.01 none - they only provide information
0.01 to <0.4 low
0.4 to <0.7 medium
0.7 to <0.9 high
0.9 to 1.0 critical

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.