Skip to content

Commit

Permalink
Adding architecture page + related images. (Checkmarx#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Markov authored Dec 29, 2020
1 parent 1b36705 commit 8b44279
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
## Architecture
## Overview

KICS Architecture was built from the ground up with cloud-native mindset.
It was designed for automation, handles state carefully and assumes that the only constant is change.
KICS is 100% open source is written in Golang using Open Policy Agent ([OPA](https://www.openpolicyagent.org/)).

Golang speed, simplicity and reliability made it the perfect choice for writing KICS, while [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/) as a query language, was a native choice to implement security queries.

So far have written 900+ ready-to-use queries that cover a wide range of vulnerabilities checks for AWS, GCP, Azure and other cloud providers.

## High Level Architecture

KICS has a pluggable architecture with extensible pipeline of parsing IaC languages, which allows an easy integration of new IaC languages and queries.

At a high very level, KICS is composed of the following main components: a command line interface, parser, queries execution engine, IaC providers, security queries, and results writer.

- Command Line Interface => Provides CLI input to KICS.
- Parser => responsible for parsing input IaC files (terraform and others)
- IaC Providers => Converts IaC language into normalized JSON
- Queries Execution Engine => applies REGO queries against normalized JSON
- Security Queries => pre-built REGO queries for each security and misconfiguration
- Writer => Writes results into JSON format

<img src="../img/arch/high-level-arch.png" align="left">


## Execution Flow

The sequence diagram below depicts interaction of the main KICS components:
<img src="../img/arch/exec-flow-1.png" align="left">
<img src="../img/arch/exec-flow-2.png" align="left">
Binary file added docs/img/arch/exec-flow-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/arch/exec-flow-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/arch/high-level-arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b44279

Please sign in to comment.