Code Monkey home page Code Monkey logo

themis's Introduction

Themis evaluates and fixes aws resources based on rules defined.

Themis currently supports sending non-compliant alert notification through email using ses. Feel free to raise request for any other mechanism for notification delivery.

Architecture Diagram:

Alt text

Configurations

There are 2 types of configuration

Themis project configuration:

Themis project configuration is in settings.json stored at root of the project. Settings file has parameters

  • themis sender emails, reciever emails

Themis rule configuration:

Each rule has a separate configuration in rules directory at the root of the project. Themis rule will use the default configuration when custom account rule json is not present

How to create a custom rule configuration

create aws_account_id/rule_name.json directory inside rules directory for custom rules definition based on account id.

Example: If we have two aws account with id (12345 and 67890). when we add 12345/bad_ingress.json in rules directory, bad_ingress deployed in account 12345 will use 12345/bad_ingress.json but account 67890 will used default bad ingress json

Deployment

install dependencies

pip3 install pipenv

pipenv install

run tests

pipenv run python3 -m pytest --cov=. tests/ -v

deployment command

pipenv lock -r > requirements.txt

sam deploy -t template.yml --region us-east-1 --config-file samconfig.toml --profile default --guided

EnableAutoFix is false by default. For enabling auto fix use the below deployment command: sam deploy -t template.yml --region us-east-1 --config-file samconfig.toml --profile default --guided --parameter-overrides EnableAutoFix=true

RULES:

1. Bad Ingress Rule

Evaluator:

bad ingress marks the security group as non-compliant if there is any ports mentioned in bad ingress rules json is publicly open in security group. The non-compliant security groups can be seen in aws config themis rule.

Fixer:

Fixer will close the publicly open ports to vpc cidr.

Contributions

Feel free to submit a pull request for any generic rules

themis's People

Contributors

sahroshan avatar devarahalli avatar vsagarv avatar

Watchers

Viresh Sanagoudar avatar James Cloos avatar Vaibhav Rajput avatar Satish Agnal avatar Bhargav avatar Ajith N N avatar  avatar Vinodkumar Ramachandran Nair avatar  avatar

Forkers

sahroshan

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.