All Projects → bridgecrewio → cdkgoat

bridgecrewio / cdkgoat

Licence: Apache-2.0 license
CdkGoat is Bridgecrew's "Vulnerable by Design" AWS CDK repository. CdkGoat is a learning and training project that demonstrates how common configuration errors can find their way into production cloud environments.

Programming Languages

python
139335 projects - #7 most used programming language
Batchfile
5799 projects

Projects that are alternatives of or similar to cdkgoat

introspector
A schema and set of tools for using SQL to query cloud infrastructure.
Stars: ✭ 61 (+125.93%)
Mutual labels:  aws-security, devsecops, cloud-security
Checkov
Prevent cloud misconfigurations during build-time for Terraform, Cloudformation, Kubernetes, Serverless framework and other infrastructure-as-code-languages with Checkov by Bridgecrew.
Stars: ✭ 3,572 (+13129.63%)
Mutual labels:  cloudformation, aws-security, devsecops
Terrascan
Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure.
Stars: ✭ 2,687 (+9851.85%)
Mutual labels:  aws-security, devsecops, cloud-security
cfngoat
Cfngoat is Bridgecrew's "Vulnerable by Design" Cloudformation repository. Cfngoat is a learning and training project that demonstrates how common configuration errors can find their way into production cloud environments.
Stars: ✭ 70 (+159.26%)
Mutual labels:  cloudformation, aws-security, devsecops
cdk-constructs
Shared constructs for AWS CDK
Stars: ✭ 34 (+25.93%)
Mutual labels:  cloudformation, aws-cdk
aws-pdf-textract-pipeline
🔍 Data pipeline for crawling PDFs from the Web and transforming their contents into structured data using AWS textract. Built with AWS CDK + TypeScript
Stars: ✭ 141 (+422.22%)
Mutual labels:  cloudformation, aws-cdk
awesome-cloud-security
🛡️ Awesome Cloud Security Resources ⚔️
Stars: ✭ 1,056 (+3811.11%)
Mutual labels:  aws-security, cloud-security
CloudFrontier
Monitor the internet attack surface of various public cloud environments. Currently supports AWS, GCP, Azure, DigitalOcean and Oracle Cloud.
Stars: ✭ 102 (+277.78%)
Mutual labels:  aws-security, cloud-security
AWSXenos
AWSXenos will list all the trust relationships in all the IAM roles and S3 buckets
Stars: ✭ 57 (+111.11%)
Mutual labels:  aws-security, cloud-security
tfquery
tfquery: Run SQL queries on your Terraform infrastructure. Query resources and analyze its configuration using a SQL-powered framework.
Stars: ✭ 297 (+1000%)
Mutual labels:  devsecops, cloud-security
GDPatrol
A Lambda-powered Security Orchestration framework for AWS GuardDuty
Stars: ✭ 50 (+85.19%)
Mutual labels:  aws-security
aws-leastprivilege
Generates an IAM policy for the CloudFormation service role that adheres to least privilege.
Stars: ✭ 85 (+214.81%)
Mutual labels:  cloudformation
aws-cdk-starter
No description or website provided.
Stars: ✭ 31 (+14.81%)
Mutual labels:  aws-cdk
private-chain
⛓An Ethereum PoA private-chain environment on AWS.
Stars: ✭ 23 (-14.81%)
Mutual labels:  cloudformation
AWSlack
Get Slack notifications on AWS CloudWatch events
Stars: ✭ 21 (-22.22%)
Mutual labels:  cloudformation
qaz
qaz—A CLI tool for Templating & Managing stacks in AWS Cloudformation
Stars: ✭ 89 (+229.63%)
Mutual labels:  cloudformation
aws-transcribe-demo
A simple AWS demo utilises Amazon Transcribe to convert audio to text and analyse.
Stars: ✭ 39 (+44.44%)
Mutual labels:  aws-cdk
cloudniite
AWS Lambda Optimization and Monitoring Tool
Stars: ✭ 25 (-7.41%)
Mutual labels:  cloudformation
aws-cloudformation-simplified
AWS CloudFormation - Simplified | Hands On Learning !!
Stars: ✭ 51 (+88.89%)
Mutual labels:  cloudformation
cfsec
Static analysis for CloudFormation templates to identify common misconfiguration
Stars: ✭ 53 (+96.3%)
Mutual labels:  cloudformation

CdkGoat - Vulnerable AWS CDK Infrastructure

Maintained by Bridgecrew.io slack-community

CdkGoat is Bridgecrew's "Vulnerable by Design" AWS CDK repository. CdkGoat is a learning and training project that demonstrates how common configuration errors can find their way into production cloud environments.

It also shows how Bridgecrew can be used with the AWS CDK to provide CloudFormation template vulnerability scanning at build time, even though no CloudFormation templates exist in the source repository.

Table of Contents

Introduction

CdkGoat was built to enable DevSecOps design and implement a sustainable misconfiguration prevention strategy. It can be used to test a policy-as-code framework like Bridgecrew & Checkov, inline-linters, or other code scanning methods executed at build / deploy time.

CdkGoat follows the tradition of existing *Goat projects that provide a baseline training ground to practice implementing secure development best practices for cloud infrastructure.

Important notes

Before you proceed please take a not of these warning:

⚠️ CdkGoat creates intentionally vulnerable AWS resources into your account. DO NOT deploy CdkGoat in a production environment or alongside any sensitive AWS resources.

Requirements

This project uses the following software versions, but older versions should generally work.

  • Python 3.8.4 with virtualenv
  • Node 14.5.0
  • NPM 6.14.5
  • AWS CLI v2, configured with credentials

To prevent vulnerable infrastructure from arriving to production see: checkov, the open source static analysis tool for infrastructure as code.

Getting started

Installation

Clone this repository. Then run the following commands:

npm install -g aws-cdk
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt

Generate and scan a template

Run the following commands to generate a CloudFormation template and scan it with the Bridgecrew CLI:

cdk synth
bridgecrew -f cdk.out/cdkgoat.template.json

Deploy a CloudFormation stack

Run the following command to deploy the infrastructure into your AWS account. Warning: This will create vulnerable resources. Deploy with care into a non-prod account, and consider deleting the stack each time you finish your work. The best use of this capability is to compare these results to a runtime scanner.

cdk deploy

Note that you will probably need to change some resource names, especially S3 bucket names, to be unique.

Destroy a CloudFormation stack

Run the following command to destroy the stack and its resources. You can also delete the stack from the AWS Console.

cdk destroy

Bridgecrew's IaC herd of goats

  • CfnGoat - Vulnerable by design Cloudformation template
  • TerraGoat - Vulnerable by design Terraform stack
  • CDKGoat - Vulnerable by design CDK application

Contributing

Contribution is welcomed!

We would love to hear about more ideas on how to find vulnerable infrastructure-as-code design patterns.

Support

Bridgecrew builds and maintains CdkGoat to encourage the adoption of policy-as-code.

If you need direct support you can contact us at [email protected].

Existing misconfigs (Auto-Generated)

check_id file resource check_name guideline
0 CKV_AWS_18 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure the S3 bucket has access logging enabled https://docs.bridgecrew.io/docs/s3_13-enable-logging
1 CKV_AWS_20 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure the S3 bucket does not allow READ permissions to everyone https://docs.bridgecrew.io/docs/s3_1-acl-read-permissions-everyone
2 CKV_AWS_21 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure the S3 bucket has versioning enabled https://docs.bridgecrew.io/docs/s3_16-enable-versioning
3 CKV_AWS_53 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure S3 bucket has block public ACLS enabled https://docs.bridgecrew.io/docs/bc_aws_s3_19
4 CKV_AWS_55 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure S3 bucket has ignore public ACLs enabled https://docs.bridgecrew.io/docs/bc_aws_s3_21
5 CKV_AWS_19 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure the S3 bucket has server-side-encryption enabled https://docs.bridgecrew.io/docs/s3_14-data-encrypted-at-rest
6 CKV_AWS_57 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure the S3 bucket does not allow WRITE permissions to everyone https://docs.bridgecrew.io/docs/s3_2-acl-write-permissions-everyone
7 CKV_AWS_56 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure S3 bucket has 'restrict_public_bucket' enabled https://docs.bridgecrew.io/docs/bc_aws_s3_22
8 CKV_AWS_54 /cdk.out/cdkgoat.template.json AWS::S3::Bucket.mycdkbucketC801BBDD Ensure S3 bucket has block public policy enabled https://docs.bridgecrew.io/docs/bc_aws_s3_20
9 CKV_AWS_3 /cdk.out/cdkgoat.template.json AWS::EC2::Volume.vol100D23AE3 Ensure all data stored in the EBS is securely encrypted https://docs.bridgecrew.io/docs/general_3-encrypt-eps-volume
10 CKV_AWS_24 /cdk.out/cdkgoat.template.json AWS::EC2::SecurityGroup.sg15CEFF4E3 Ensure no security groups allow ingress from 0.0.0.0:0 to port 22 https://docs.bridgecrew.io/docs/networking_1-port-security
11 CKV_AWS_7 /cdk.out/cdkgoat.template.json AWS::KMS::Key.kms1045C8EFE Ensure rotation for customer created CMKs is enabled https://docs.bridgecrew.io/docs/logging_8

check_id file resource check_name guideline
0 CKV_SECRET_2 /cdk.out/cdkgoat.template.json d105d6e6096177be6085e7d65fe2b50e94303048 AWS Access Key https://docs.bridgecrew.io/docs/git_secrets_2
1 CKV_SECRET_2 /cdk.out/cdkgoat.template.json 1be789d57b93b4368eb001346a983f6feea25a85 AWS Access Key https://docs.bridgecrew.io/docs/git_secrets_2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].