Tool for DevSecOps strategy
Project description
DevSecOps Engine Tools
Objective
Tool that unifies the evaluation of the different devsecops practices being agnostic to the devops platform, using both open source and market tools.
Component
📦 tools: DevSecOps Practice Modules
Communications channel
Here are the channels we use to communicate about the project:
1. Mailing list: You can join our mailing list to always be informed at the following link: CommunityDevsecopsEngine
2. Email: You can write to us by email: MaintainersDevsecopsEngine@googlegroups.com
Getting started
Requirements
- Python >= 3.8
Installation
pip3 install devsecops-engine-tools
Scan running - flags (CLI)
devsecops-engine-tools --platform_devops ["local","azure","github"] --remote_config_repo ["remote_config_repo"] --tool ["engine_iac", "engine_dast", "engine_secret", "engine_dependencies", "engine_container", "engine_risk", "engine_code"] --folder_path ["Folder path scan engine_iac, engine_code and engine_dependencies"] --platform ["k8s","cloudformation","docker", "openapi"] --use_secrets_manager ["false", "true"] --use_vulnerability_management ["false", "true"] --send_metrics ["false", "true"] --token_cmdb ["token_cmdb"] --token_vulnerability_management ["token_vulnerability_management"] --token_engine_container ["token_engine_container"] --token_engine_dependencies ["token_engine_dependencies"] --token_external_checks ["token_external_checks"] --xray_mode ["scan", "audit"] --image_to_scan ["image_to_scan"]
Structure Remote Config
📦Remote_Config
┣ 📂engine_core
┃ ┗ 📜ConfigTool.json
┣ 📂engine_risk
┃ ┗ 📜ConfigTool.json
┃ ┗ 📜Exclusions.json
┣ 📂engine_sast
┃ ┗ 📂engine_iac
┃ ┗ 📜ConfigTool.json
┃ ┗ 📜Exclusions.json
┃ ┗ 📂engine_secret
┃ ┗ 📜ConfigTool.json
┃ ┗ 📂engine_code
┃ ┗ 📜ConfigTool.json
┃ ┗ 📜Exclusions.json
┣ 📂engine_sca
┃ ┗ 📂engine_container
┃ ┗ 📜ConfigTool.json
┃ ┗ 📜Exclusions.json
┃ ┗ 📂engine_dependencies
┃ ┗ 📜ConfigTool.json
┃ ┗ 📜Exclusions.json
Tools available for the modules (Configuration engine_core/ConfigTool.json)
Module | Tool | Type |
---|---|---|
ENGINE_RISK | DEFECTDOJO | Free |
ENGINE_IAC | CHECKOV | Free |
KUBESCAPE | Free | |
KICS | Free | |
ENGINE_DAST | NUCLEI | Free |
ENGINE_SECRET | TRUFFLEHOG | Free |
ENGINE_CONTAINER | PRISMA | Paid |
TRIVY | Free | |
ENGINE_DEPENDENCIES | XRAY | Paid |
DEPENDENCY CHECK | Free | |
ENGINE_CODE | BEARER | Free |
Scan running sample (CLI) - Local
Complete the value in .envdetlocal file a set in execution environment
$ set -a
$ source .envdetlocal
$ set +a
devsecops-engine-tools --platform_devops local --remote_config_repo DevSecOps_Remote_Config --tool engine_iac
Scan running sample (Docker)
Installation
docker pull bancolombia/devsecops-engine-tools
docker run --rm -v ./folder_to_analyze:/folder_to_analyze bancolombia/devsecops-engine-tools:latest devsecops-engine-tools --platform_devops local --remote_config_repo docker_default_remote_config --tool engine_iac --folder_path /folder_to_analyze
The docker image have it own default remote config with basic configuration called docker_default_remote_config, but you can define your own config and pass it as volume
docker run --rm -v ./folder_to_analyze:/folder_to_analyze -v ./custom_remote_config:/custom_remote_config bancolombia/devsecops-engine-tools:latest devsecops-engine-tools --platform_devops local --remote_config_repo custom_remote_config --tool engine_iac --folder_path /folder_to_analyze
Scan running sample - Azure Pipelines
The remote config should be in a Azure Devops repository.
Note: By default the tool gets the token from the SYSTEM_ACCESSTOKEN variable to get the remote configuration repository. You must ensure that this token has permission to access this resource.
name: $(Build.SourceBranchName).$(date:yyyyMMdd)$(rev:.r)
trigger:
branches:
include:
- trunk
- feature/*
stages:
- stage: engine_tools
displayName: Example Engine Tools
jobs:
- job: engine_tools
pool:
name: Azure Pipelines
steps:
- script: |
# Install devsecops-engine-tools
pip3 install -q devsecops-engine-tools
devsecops-engine-tools --platform_devops azure --remote_config_repo remote_config --tool engine_iac
displayName: "Engine Tools"
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
Scan running sample - Github Actions
The remote config should be in a GitHub repository, either public or private.
If the repository is public:
- The yml file containing the workflow should be configured using the default secret GITHUB_TOKEN. For more information, refer to Automatic token authentication.
If the repository is private:
-
Create a personal access token with the necessary permissions to access the repository.
-
Add the token as a secret in the GitHub repository.
-
Configure the yml file containing the workflow using the created secret.
Example of the workflow yml:
name: DevSecOps Engine Tools
on:
push:
branches:
- feature/*
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_ACCESSTOKEN }} #In this case, the remote config repository is private
# When the remote config repository is public, the secret should be like this: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Python
run: |
# Install devsecops-engine-tools
pip3 install -q devsecops-engine-tools
output=$(devsecops-engine-tools --platform_devops github --remote_config_repo remote_config --tool engine_iac)
echo "$output"
if [[ $output == *"✘Failed"* ]]; then
exit 1
fi
Metrics
With the flag --send_metrics true and the configuration of the AWS-METRICS_MANAGER driven adapter in ConfigTool.json of the engine_core the tool will send the report to bucket s3. In the metrics folder you will find the base of the cloud formation template to deploy the infra and dashboard in grafana.
Config Tool Generator
To generate the ConfigTool.json file in a simple way, a web interface was created where you can configure each necessary parameter individually or use a base template that you want to modify. In the config tool generator folder you will find the code for the SPA created in Angular to run it local environment.
How can I help?
Review the issues, we hear new ideas. Read more Contributing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file devsecops_engine_tools-1.13.1.tar.gz
.
File metadata
- Download URL: devsecops_engine_tools-1.13.1.tar.gz
- Upload date:
- Size: 93.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6cf8781f355eeb84ce669ad3869cf73338ed4bdc971bd1cea1012cc6c1e52f5 |
|
MD5 | e665f4e6fd78a71f33c27f9b53cc4a5f |
|
BLAKE2b-256 | 47e1eb609a575dd7bb90e58eef4073b0034bedba1178a7b943dac5fcf3760867 |
File details
Details for the file devsecops_engine_tools-1.13.1-py3-none-any.whl
.
File metadata
- Download URL: devsecops_engine_tools-1.13.1-py3-none-any.whl
- Upload date:
- Size: 176.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30a7d0bbc9567383eef67a49148d35584cd4e9bc4f4229bde69cbc9331e7e141 |
|
MD5 | 741985a638be552b508483b5700e89ee |
|
BLAKE2b-256 | 0096fae16320d6e3bc4f8a62dcc6f55ce3438a4097bd0976e3dfcbbeabf92928 |