Giter Site home page Giter Site logo

onophris / cloud-reports Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tensult/cloud-reports

0.0 2.0 0.0 1.1 MB

Scans your AWS cloud resources and generates reports

Home Page: https://apps.tensult.com

License: GNU General Public License v3.0

JavaScript 0.11% HTML 7.34% TypeScript 92.50% CSS 0.05%

cloud-reports's Introduction

Donate

Cloud Reports

Collects info about various cloud resources and analyzes them against best practices and give a JSON, CSV, HTML, or PDF reports.

Modules

These collect the information about various cloud resources from the cloud provider. This information later used by Analyzers to analyze.

Analyzers are the codified best practices for the cloud and these analyzes each best practice against the collected information and generates report which then consumed by Reporters to generate reports in a desired format.

These are for generating reports in various formats and currently supported formats are JSON, HTML and PDF.

AWS (Amazon Web Services)

We are implementing checks based on AWS Well Architected best practices.

Install NodeJS

This package is based on NodeJS framework so you can it install from here.

Installing cloud-reports from source

Download

git clone https://github.com/tensult/cloud-reports.git

To get updates

If you have already cloned this repository before then for getting new updates, change directory to the cloud-reports directory and then do git pull.

git pull

Installing and Building

Make sure you are in the cloud-reports directory.

To convert typescript to javascript

npm run build 

Scan

This collects and analyzes information about your AWS cloud and stores as a report file with name scan_report.pdf.

  • To run for all modules
npm run scan -- --profile Your-AWS-profile
  • To run on an EC2 instance
    • It is recommended not to keep the hard coded credentials on the instance so make sure to configure IAM EC2 instance profile role with Read access to AWS account.
    • Kindly make sure the machine has minimum 2 GB RAM available and the IAM role has atleast ReadOnly access to the AWS account.
    • Once the above conditions are met, CloudReports can run on the instance using instance profile role so no need to pass the profile parameter.
npm run scan -- --module s3,acm
  • To run for specific module
npm run scan -- --profile Your-AWS-profile --module s3,acm
  • To run for single module
npm run scan -- --profile Your-AWS-profile  --module s3
  • We can generate report in following formats:
  • To generate HTML report file
npm run scan -- --profile Your-AWS-profile  -f html
  • To generate PDF report file
npm run scan -- --profile Your-AWS-profile  -f pdf
npm run scan -- --profile Your-AWS-profile  -f pdf -i # This will only report issues
  • To generate CSV report file
npm run scan -- --profile Your-AWS-profile  -f csv
npm run scan -- --profile Your-AWS-profile  -f csv -i # This will only report issues
  • To generate JSON report file
npm run scan -- --profile Your-AWS-profile  -f json

Debugging

You can run this tool in debug mode to generate intermediate reports: collector_report.json and analyzer_report.json

npm run scan -- --profile Your-AWS-profile  -f pdf -d

Reusing Collector report

When we are working on analyzers, we will be testing them multiple times and every time collecting data will cause delays, to avoid such delays you can use the following command to reuse already collected collector report.

npm run scan -- --profile Your-AWS-profile  -f pdf -d -u

Install as npm module to an existing package

Install cloud-reports npm module

npm install -S cloud-reports

Usage

Make sure you have initialized AWS.config, otherwise this will use default AWS profile.

    const cloudReporter = require('cloud-reports');
    // To collect for all modules
    const collectionPromise = cloudReporter.collect()
    // To collect for specific modules
    // const collectedJson = cloudReporter.collect(['s3', 'iam']);
    // const collectedJson = cloudReporter.collect('vpc');
    const analysisPromise = collectionPromise.then((collectedJson) => cloudReporter.analyze(collectedJson));
    analysisPromise.then((analysisJson) => console.log(JSON.stringify(analysisJson, null, 2)));

Multiple credentials support

You may want to run the report for multiple accounts with different set of credentials at once, then in that case you can pass different credentials to collect method.

    const cloudReporter = require('cloud-reports');
    const account1CollectionPromise = cloudReporter.collect(all, credentials1);
    const account2CollectionPromise = cloudReporter.collect(all, credentials2);

    const analysisPromise = Promise.all([account1CollectionPromise, account2CollectionPromise])
                                   .then((collectedJsons) => {
                                       return collectedJsons.map((collectedJson) => {
                                           return cloudReporter.analyze(collectedJson);
                                       });
                                    });
    analysisPromise.then((analysisJsons) => console.log(JSON.stringify(analysisJsons, null, 2)));

Update service regions

We have written a script which updates the AWS regions data

node src/scripts/updateAwsServiceRegionsData.js

Contribute

Currently this application only supports AWS, but can be extendable to other cloud providers. Contributions are most welcome.

Contact us

This product is supported and actively developed by Tensult. You can contact us at [email protected]. Also, we have a SaaS version also for this and currently it is free so please try it.

cloud-reports's People

Contributors

paragpoddar avatar koladilip avatar harshul1310 avatar anupsarkar177 avatar sumitnair001 avatar dhruvakumar07 avatar jawad846 avatar anupsarkar377 avatar agnelnandapurapu avatar

Watchers

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