Git Product home page Git Product logo

sizing-test's Introduction

Cloud API scanning

Report size estimation

Chose one account from each of the cloud providers (AWS, GCP, AZURE). We want to estimate conservitivly so please try to choose the 3 largest accounts on each cloud.


Large accounts would be those containing the most inspec cloud resources; for AWS this would include things like S3 bucket, IAM users and security groups. The more of these resources the more control checks inspec will execute and the larget the report size will be.


Process

Clone the repo onto a system with docker installed, we run 3 scans in parrallel so the more vcpu the better. The tar file contains 3 inspec profiles (one for each cloud).


admin-cis-aws-benchmark-level2-1.0.0-2.tar.gz  admin-cis-azure-foundations-level2-1.1.0-4.tar.gz  admin-cis-gcp-benchmark-level2-1.0.0-2.tar.gz get_size.sh  README.md

First edit the get_size.sh script

#!/bin/bash

docker run -it -e CHEF_LICENSE="accept" \
  -e AWS_REGION='<ANY REGION>' \ # just need to specify one, it will scan all
  -e AWS_ACCESS_KEY_ID="<ACCOUNT ACCESS KEY>" \
  -e AWS_SECRET_ACCESS_KEY="<ACCOUNT SECRET ACCESS KEY>" \
  -e AWS_SESSION_TOKEN="<ACCOUNT SESSION TOKEN>" \ # this may not be needed, depends on the account settings (just remove if not needed)
  --rm -v $(pwd):/share chef/inspec exec \
  /share/admin-cis-aws-benchmark-level2-1.0.0-2.tar.gz \
  -t aws:// --reporter=cli json:aws_out.json &

docker run -it -e CHEF_LICENSE="accept" \
  -e AZURE_SUBSCRIPTION_ID="<ACCOUNT SUBSCRIPTION ID>"  \
  -e AZURE_CLIENT_ID="<ACCOUNT CLIENT ID>" \
  -e AZURE_TENANT_ID="<ACCOUNT TENANT ID>" \
  -e AZURE_CLIENT_SECRET="<ACCOUNT CLIENT SECRET>" \
  --rm -v $(pwd):/share chef/inspec exec \
  /share/admin-cis-azure-foundations-level2-1.1.0-4.tar.gz \
  -t azure:// --reporter=cli json:azure_out.json &

docker run -it -e CHEF_LICENSE="accept" \
  -e GOOGLE_APPLICATION_CREDENTIALS="/creds/application_default_credentials.json" \ # change application_default_credentials.json to match your credentials.json (keep the /creds)
  --rm -v $(pwd):/share -v ~/.config/gcloud:/creds chef/inspec exec \ # set the ~/.config/gcloud to the directory containing your credentials.json 
  /share/admin-cis-gcp-benchmark-level2-1.0.0-2.tar.gz \
  -t gcp:// --input gcp_project_id='<PROJECT ID>' --reporter=cli json:gcp_out.json & # fill in your project id

Replace the values in between the <> with the correct credentials for the large cloud accounts. Note the gcp inspec scan also mounts your ~/.config/gcloud directory by default. So that either needs to be created or changed to a location containing the service accont credentials for the large GCP account.


Once get_size.sh has been updated execute it ./get_size.sh. once running it will start 3 docker contianers running inspec in the background and exit the script. when all three contianers have finished running you will have 3 JSON files in the working directory:

aws_out.json  azure_out.json  gcp_out.json

record the sizes of these files and tar them up to send to Chef.

sizing-test's People

Contributors

tpbansal avatar

Watchers

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