All Projects → prancer-io → Cloud Validation Framework

prancer-io / Cloud Validation Framework

Licence: mpl-2.0
prancer platform is an IaC Security engine + Continuous Compliance for your cloud and Kuberneted environment

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Cloud Validation Framework

Ansible Dcos
[DEPRECATED] Please consider using the Ansible Roles for DC/OS maintained by the Mesosphere SRE team
Stars: ✭ 41 (-21.15%)
Mutual labels:  cloud
Couchdb Couch
Mirror of Apache CouchDB
Stars: ✭ 43 (-17.31%)
Mutual labels:  cloud
Cloudstack Cloudmonkey
Apache Cloudstack Cloudmonkey
Stars: ✭ 47 (-9.62%)
Mutual labels:  cloud
Go Cloud
The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.
Stars: ✭ 8,124 (+15523.08%)
Mutual labels:  cloud
Docker Swarm
🐳🐳🐳 This repository is part of a blog series on Docker Swarm example using VirtualBox, OVH Openstack, Azure and Amazon Web Services AWS
Stars: ✭ 43 (-17.31%)
Mutual labels:  cloud
Pacbot
PacBot (Policy as Code Bot)
Stars: ✭ 1,017 (+1855.77%)
Mutual labels:  cloud
Pas On Cloud
CyberArk Privileged Access Security on Cloud
Stars: ✭ 39 (-25%)
Mutual labels:  cloud
Cloudsimsdn
CloudSimSDN is an SDN extension of CloudSim project to simulate SDN and SFC features in the context of a cloud data center.
Stars: ✭ 51 (-1.92%)
Mutual labels:  cloud
Hpccloud
A Cloud/Web-Based Simulation Environment
Stars: ✭ 43 (-17.31%)
Mutual labels:  cloud
Nff Go
NFF-Go -Network Function Framework for GO (former YANFF)
Stars: ✭ 1,036 (+1892.31%)
Mutual labels:  cloud
Chalice
Python Serverless Microframework for AWS
Stars: ✭ 8,513 (+16271.15%)
Mutual labels:  cloud
Openwhisk Runtime Nodejs
Apache OpenWhisk Runtime NodeJS supports Apache OpenWhisk functions written in JavaScript for NodeJS
Stars: ✭ 43 (-17.31%)
Mutual labels:  cloud
Infra Personal
Terraform for setting up my personal infrastructure
Stars: ✭ 45 (-13.46%)
Mutual labels:  cloud
Activiti
Activiti is a light-weight workflow and Business Process Management (BPM) Platform targeted at business people, developers and system admins. Its core is a super-fast and rock-solid BPMN 2 process engine for Java. It's open-source and distributed under the Apache license. Activiti runs in any Java application, on a server, on a cluster or in the…
Stars: ✭ 8,227 (+15721.15%)
Mutual labels:  cloud
Cloudsplaining
Cloudsplaining is an AWS IAM Security Assessment tool that identifies violations of least privilege and generates a risk-prioritized report.
Stars: ✭ 1,057 (+1932.69%)
Mutual labels:  cloud
Nagios Plugins
450+ AWS, Hadoop, Cloud, Kafka, Docker, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Cloudera etc...
Stars: ✭ 1,000 (+1823.08%)
Mutual labels:  cloud
Iv
Asignatura de infraestructuras virtuales para el Grado de Informática
Stars: ✭ 43 (-17.31%)
Mutual labels:  cloud
Airflow Toolkit
Any Airflow project day 1, you can spin up a local desktop Kubernetes Airflow environment AND one in Google Cloud Composer with tested data pipelines(DAGs) 🖥 >> [ 🚀, 🚢 ]
Stars: ✭ 51 (-1.92%)
Mutual labels:  cloud
Cloud Trace Java
Stars: ✭ 51 (-1.92%)
Mutual labels:  cloud
Examples
Demo applications and code examples for Confluent Platform and Apache Kafka
Stars: ✭ 571 (+998.08%)
Mutual labels:  cloud

Introduction

Prancer is a pre-deployment and post-deployment multi-cloud security platform for your Infrastructure as Code (IaC) and live cloud resources. It shifts the security to the left and provides end-to-end security scanning based on the Policy as Code concept. DevOps engineers can use it for static code analysis on IaC to find security drifts and maintain their cloud security posture with continuous compliance features. you can get more information from our website at : https://www.prancer.io

prerequisites

  • Linux-based OS
  • Python 3.6.8 / 3.8 or 3.9
  • mongo database (optional)

Note: mongo database is not a hard requirement to run prancer basic platform. It is possible to run the framework and write all the outputs to the file system. To learn more, you can review prancer documentation

Running Prancer from the code

You can run Prancer Basic Platform from your file system or the database. There are three modes available:

  • --db NONE It means all the files are expected to be on the file system, and the results also will be written on the file system.
  • --db SNAPSHOT It means all the configuration files and output files will be written on the filesystem. but the resource snapshots are being kept in the database
  • --db FULL It means all the configuration files and snapshots are stored in the database

Running Prancer with no database

  • Clone the Prancer repository at https://github.com/prancer-io/cloud-validation-framework.git

  • cd cloud-validation-framework

  • Install the dependent packages as present in requirements.txt pip3 install -r requirements.txt

  • export the following variables:

    export BASEDIR=`pwd`
    export PYTHONPATH=$BASEDIR/src
    export FRAMEWORKDIR=$BASEDIR
    
  • Run the sample scenario from the filesystem: python3 utilities/validator.py gitScenario --db NONE

  • Review the result cat realm/validation/gitScenario/output-test.json

For more scenarios, visit our Hello World application at : https://github.com/prancer-io/prancer-hello-world

Running Prancer with no database in a virtual environment

git clone https://github.com/prancer-io/cloud-validation-framework.git

cd cloud-validation-framework

make sure python virtual environment is installed and set up. (https://docs.python.org/3/tutorial/venv.html)

python3 -m venv tutorial-env

source tutorial-env/bin/activate

pip install -r requirements.txt

export the following variables:

export BASEDIR=`pwd`
export PYTHONPATH=$BASEDIR/src
export FRAMEWORKDIR=$BASEDIR

Run the sample scenario from the filesystem: python utilities/validator.py gitScenario --db NONE

Review the result cat realm/validation/gitScenario/output-test.json

How to run crawler

Whenever you have the master snapshot configuration files available, you need to first run the crawler. Crawler finds individual objects from the target provider based on the master snapshot configuration file guidance. And generate snapshot configuration files that contains the reference to individual objects. You can crawl a target environment by specifying --crawler to your command.

python utilities/validator.py gitScenario --db NONE --crawler

To understand more about the crawling, check our documentation at : https://docs.prancer.io/crawler/crawler-definition/

How to upload files to database and run prancer from database

First, make sure you have the MongoDB up and running. you can refer to this documentation from MongoDB: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Edit config.ini and add these lines if they are not already there

  [MONGODB]
  dburl = mongodb://localhost:27017/validator
  dbname = validator
  COLLECTION = resources
  SNAPSHOT = snapshots
  TEST = tests
  STRUCTURE = structures
  MASTERSNAPSHOT = mastersnapshots
  MASTERTEST = mastertests
  OUTPUT = outputs
  NOTIFICATIONS = notifications

You can use populate_json.py file in the utilities folder to upload files from filesystem to mongodb:

upload connectors

python utilities/populate_json.py scenario-pass --file connector.json

Check the DB's structures collection to make sure the connector is uploaded successfully.

upload snapshots

python utilities/populate_json.py scenario-pass --file snapshot.json

Check the DB's snapshots collection to make sure the snapshot is uploaded successfully.

upload tests

python utilities/populate_json.py scenario-pass --file test.json

Check the DB's tests collection to make sure the test is uploaded successfully.

Note: You can do the same for the scenario fail.

Now you can run the framework from the database: python utilities/validator.py scenario-fail --db FULL

Check the DB's webserver and outputs collection in mongoDB to see the results.

what are the environment variables

We have three environment variables that need to be set before running the code.

export BASEDIR=`pwd`
export PYTHONPATH=$BASEDIR/src
export FRAMEWORKDIR=$BASEDIR

BASEDIR is the base directory for the codebase. It is the folder you have cloned your git repository to.

PYTHONPATH is where the code resides. It is in the src folder inside the cloned directory.

FRAMEWORKDIR is where the configuration files available. We expect config.ini available in this directory. other folders are referenced in the config.ini

Debugging with VSCode

Make sure these files exists under .vscode folder

  • launch.json
  • settings.json

The content of these files are as follows:

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "env": {
                "BASEDIR": "${workspaceFolder}",
                "PYTHONPATH": "${workspaceFolder}/src",
                "FRAMEWORKDIR": "${workspaceFolder}"
            },
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "python": "${command:python.interpreterPath}",
            "args": [
                "gitScenario"
            ]
        }
    ]
}

In the args attribute, you will put the name of the collection you want to run the code for. For example, we have a gitScenario you can use for testing purposes.

settings.json

{
    "python.pythonPath": "testenv/bin/python"
}

In python.pythonPath file you put the path to your python. In the above example, we are using a virtual python environment testenv

Note : These files already available in our repository and you can modify them based on your requirements.

This document helps you how to do debugging of Python applications in VSCode : https://code.visualstudio.com/docs/python/debugging

Further documentation

To learn more about the Prancer Platform, review our documentation site

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