Coder Social home page Coder Social logo

johndutchover / regula Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fugue/regula

0.0 0.0 0.0 3.78 MB

Regula checks infrastructure as code templates (Terraform, CloudFormation, k8s manifests) for AWS, Azure, Google Cloud, and Kubernetes security and compliance using Open Policy Agent/Rego

Home Page: https://regula.dev/

License: Apache License 2.0

Shell 0.14% Go 9.71% Makefile 0.20% HCL 5.50% Dockerfile 0.01% Open Policy Agent 84.44%

regula's Introduction

Regula

Tip: See all of our documentation at regula.dev!

Introduction

Regula is a tool that evaluates infrastructure as code files for potential AWS, Azure, Google Cloud, and Kubernetes security and compliance violations prior to deployment.

Regula supports the following file types:

  • CloudFormation JSON/YAML templates
  • Terraform source code
  • Terraform JSON plans
  • Kubernetes YAML manifests
  • Azure Resource Manager (ARM) JSON templates (in preview)

Regula includes a library of rules written in Rego, the policy language used by the Open Policy Agent (OPA) project. Regula works with your favorite CI/CD tools such as Jenkins, Circle CI, and AWS CodePipeline; we’ve included a GitHub Actions example so you can get started quickly. Where relevant, we’ve mapped Regula policies to the CIS AWS, Azure, Google Cloud, and Kubernetes Foundations Benchmarks so you can assess compliance posture. Regula is maintained by engineers at Fugue.

Regula is also available as a Docker image on DockerHub here.

More information is available at regula.dev.

Installation

Homebrew (macOS & Linux)

To install Regula via Homebrew:

brew tap fugue/regula
brew install regula

To upgrade Regula:

brew upgrade regula

Prebuilt binary (all platforms)

  1. Download the Regula archive for your platform from the Releases page.

  2. Extract the downloaded archive.

  3. Move the extracted regula binary to somewhere in your PATH:

    macOS:

    mv regula /usr/local/bin
    

    Linux:

    sudo mv regula /usr/local/bin
    

    Windows (cmd):

    md C:\regula\bin
    move regula.exe C:\regula\bin
    setx PATH "%PATH%;C:\regula\bin"
    

    Windows (PowerShell):

    md C:\regula\bin
    move regula.exe C:\regula\bin
    $env:Path += ";C:\regula\bin"
    # You can add '$env:Path += ";C:\regula\bin"' to your profile.ps1 file to
    # persist that change across shell sessions.
    
  4. Windows users only: Close cmd and re-open it so the changes take effect.

  5. You can now run regula.

Docker (all platforms)

Regula is available as a Docker image on DockerHub here.

For usage, see Running Regula with Docker.

From source

macOS, Linux, and WSL only

  1. Install Go (v1.18+)

  2. Build binary and move to /usr/local/bin/regula:

    make # this builds ./bin/regula
    make install # this builds ./bin/regula and installs it to /usr/local/bin/regula

Once you've built the binary, execute the following to run tests:

git submodule update --init --recursive
make test

Usage

For a tutorial on using Regula with example IaC, see Getting Started.

Regula

Usage:
  regula [command]

Available Commands:
  completion        generate the autocompletion script for the specified shell
  help              Help about any command
  init              Create a new Regula configuration file in the current working directory.
  repl              Start an interactive session for testing rules with Regula
  run               Evaluate rules against infrastructure as code with Regula.
  show              Show debug information.
  test              Run OPA test with Regula.
  version           Print version information.
  write-test-inputs Persist dynamically-generated test inputs for use with other Rego interpreters

Flags:
  -h, --help      help for regula
  -v, --verbose   verbose output

Use "regula [command] --help" for more information about a command.

For details about each command, including examples, see Usage.

For more information

Visit regula.dev for more information about Regula, including:

regula's People

Contributors

jaspervdj-luminal avatar jason-fugue avatar becki-at-luminal avatar evan-fugue avatar chris-snyk avatar wayne-luminal avatar dependabot[bot] avatar curtis-fugue avatar snyk-bot avatar sam-snyk avatar ismailyenigul avatar darrendao avatar alleynec avatar ken-fugue avatar craigfurman avatar dkoder20 avatar fafg avatar fredgate avatar jantman avatar jason-snyk avatar kanaksinghal avatar szesch avatar somaritane avatar wbeuil avatar ameliafugue avatar matt-slalom avatar matte-fugue avatar chenrui333 avatar sam-fugue 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.