Giter Site home page Giter Site logo

snyk-iac-aws-cdk's Introduction

Snyk Infrastructure as Code - AWS CDK

The Snyk Infrastructure as Code CLI can scan your CloudFormation files for configuration issues. These files are written as YAML files.

Developers can also use a general purpose programming language like Typescript with Amazons Cloud Development Kit "CDK" to also write and deploy infrastructure.

The Snyk IaC CLI does not scan these typescript files directly, but you can use the CDK CLI to render a CloudFormation template which can be scanned.

Prerequisites

  • Run npm install -g aws-cdk to install the AWS CDK CLI tool.

Scan for configuration issues

This directory contains AWS CDK Stacks written in TypeScript. To scan them with Snyk, you need to follow these steps:

  • Run npm i in the stack directory to install dependencies

  • Run cdk synth to synthesize a CloudFormation template. This will be printed in your display in YAML by default. To print it in JSON, append --json.

  • (Optional) Run cdk ls to check the name of the Stack you just synthesized

  • The cdk.out/ directory is now created and it contains two CloudFormation Templates

    • VpcStackWithIssues.template.json
    • LoadBalancerStack.template.json
  • Run snyk iac test cdk.out/VpcStackWithIssues.template.json and check out for any vulnerabilities!

  • Or snyk iac test cdk.out/LoadBalancerStack.template.json

  • If you want to output it in a different directory, you can change the directory with the --output option, e.g.: cdk synth --output=templates/

snyk-iac-aws-cdk's People

Contributors

andreeaneata avatar benlaplanche avatar dragos-cojocari avatar karniwl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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