| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
In addition to the AWS environment exposure assessment Cloud Insight provides, we provide an open source project that allows users to extend available Cloud Insight results.
ci_lambda_checks is a 'node js'-based AWS Lambda project that evaluates changes to your environment, and then publishes exposures to the Cloud Insight product. The ci_lambda_checks checks are evaluated in response to events received by the lambda function and supports the following modes:
Currently this project enables integrations with 'Amazon Inspector', 'AWS Config Rules', 'EC2' and 'VPC' services.
awsInspector is a check executed periodically, based on the AWS Lambda 'Scheduled Event' notifications. This check enumerates all Amazon Inspector findings generated by the Amazon Inspector service, converts the findings to Cloud Insight exposures, and then publishes the exposures, for the specified assets, to Cloud Insight.
Note: The check publishes exposures as a set. Each subsequent run of the check replaces the set of exposures published during the previous run of the check.
awsConfigRules is a check executed when a new AWS Config snapshot is generated, a single AWS environment change is reported by the AWS Config service, or when an AWS Config Rule evaluation is completed for an AWS resource. The check converts reported evaluation results to Cloud Insight exposures, based on the map specified in the awsConfigRules check's configuration within the 'config.js' file. The check then publishes the exposures, for the specified assets, to Cloud Insight.
ci_lambda_checks contains the following set of sample custom checks for users to extend the functionality of Cloud Insight with their own custom ci_lambda_checks:
ci_lambda_checks is able to read AWS Config snapshots stored in an S3 bucket belonging to a different AWS account. Account A: AWS Account where ci_lambda_checks lambda is installed Account B: AWS Account where AWS Congig snapshots are stored
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::config-bucket",
"arn:aws:s3:::config-bucket/*"
]
}
]
}
1.2. Record Role's ARN and ExternalId you specified during role's creation
{
"Sid": "AllowReadingConfigObjects",
"Effect": "Allow",
"Principal": {
"AWS": "ROLE ARN FROM STEP 1"
},
"Action": [
"s3:GetObject",
],
"Resource": "arn:aws:s3:::config-bucket/*"
},
{
"Sid": "AllowGettingBucketLocation",
"Effect": "Allow",
"Principal": {
"AWS": "ROLE ARN FROM STEP 1"
},
"Action": [
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::config-bucket"
}
*~ You must install XCode and accept the licensing agreement before you continue with this document ~*
Install Homebrew, which allows us to easily install and manage packages with dependencies.
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Use Homebrew to install Node
$ brew install node
Note: To run Lambda cli tools, you must install Javascript runtime.
###Linux Installation Requirements
Install the latest distribution of Node from Distributions
Note: To run Lambda cli tools, you must install Javascript runtime.
###Create Your Development Environment
To create your environment, clone this repository somewhere within your home directory. We recommend ~/workspace.
$ git clone git@github.com:alertlogic/ci_lambda_checks.git ci_lambda_checks
$ cd ci_lambda_checks
Execute the Lambda development environment installation script.
$ build/install.sh
The NPM install process that you ran earlier installed some Node modules that make the Lambda framework much more helpful than simple code checkouts. Starting the framework will enable real-time linting, as well as the artifact build system.
You must have a valid account in Cloud Insight and have already set up a valid environment. In addition, you must correctly set up your your AWS Credentials for use with the AWS SDKs. Refer to http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/set-up-creds.html.
To disable checks:
| Back | FazBrowse Home | New Git URL |