All Projects → GeekMasher → advanced-security-compliance

GeekMasher / advanced-security-compliance

Licence: MIT license
GitHub Advance Security Compliance Action

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to advanced-security-compliance

secure-pipeline-advisor
Improve your code security by running different security checks/validation in a simple way.
Stars: ✭ 25 (-76.42%)
Mutual labels:  security-automation, devsecops
reconmap
Vulnerability assessment and penetration testing automation and reporting platform for teams.
Stars: ✭ 242 (+128.3%)
Mutual labels:  security-automation, devsecops
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+5.66%)
Mutual labels:  devsecops, code-scanning
Faraday
Faraday introduces a new concept - IPE (Integrated Penetration-Test Environment) a multiuser Penetration test IDE. Designed for distributing, indexing, and analyzing the data generated during a security audit.
Stars: ✭ 3,198 (+2916.98%)
Mutual labels:  security-automation, devsecops
Purify
All-in-one tool for managing vulnerability reports from AppSec pipelines
Stars: ✭ 72 (-32.08%)
Mutual labels:  security-automation, devsecops
Sbt Dependency Check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). 🌈
Stars: ✭ 187 (+76.42%)
Mutual labels:  security-automation, devsecops
django-security-check
Helps you continuously monitor and fix common security vulnerabilities in your Django application.
Stars: ✭ 69 (-34.91%)
Mutual labels:  security-automation, devsecops
Securecodebox
secureCodeBox (SCB) - continuous secure delivery out of the box
Stars: ✭ 279 (+163.21%)
Mutual labels:  security-automation, devsecops
Dependency Track
Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
Stars: ✭ 718 (+577.36%)
Mutual labels:  security-automation, devsecops
Django Defectdojo
DefectDojo is an open-source application vulnerability correlation and security orchestration tool.
Stars: ✭ 1,926 (+1716.98%)
Mutual labels:  security-automation, devsecops
MixewayHub
Mixeway is security orchestrator for vulnerability scanners which enable easy plug in integration with CICD pipelines. MixewayHub project contain one click docker-compose file which configure and run images from docker hub.
Stars: ✭ 80 (-24.53%)
Mutual labels:  security-automation, devsecops
ochrona-cli
A command line tool for detecting vulnerabilities in Python dependencies and doing safe package installs
Stars: ✭ 46 (-56.6%)
Mutual labels:  devsecops
cscanner
An open source, multi-cloud DevSecOps compliance checker
Stars: ✭ 19 (-82.08%)
Mutual labels:  devsecops
docker-wallarm-node
⚡️ Docker official image for Wallarm Node. API security platform agent.
Stars: ✭ 18 (-83.02%)
Mutual labels:  security-automation
dohq-ai-best-practices
Внедрение и эксплуатация PT Application Inspector. Подробнее: https://habr.com/ru/company/pt/blog/557142/
Stars: ✭ 22 (-79.25%)
Mutual labels:  devsecops
gitleaks
Protect and discover secrets using Gitleaks 🔑
Stars: ✭ 10,520 (+9824.53%)
Mutual labels:  devsecops
pyFireEye
Python API bindings for FireEye Products
Stars: ✭ 12 (-88.68%)
Mutual labels:  security-automation
gitavscan
Git Anti-Virus Scan Action - Detect trojans, viruses, malware & other malicious threats.
Stars: ✭ 23 (-78.3%)
Mutual labels:  devsecops
container-security-checklist
Checklist for container security - devsecops practices
Stars: ✭ 999 (+842.45%)
Mutual labels:  devsecops
cfngoat
Cfngoat is Bridgecrew's "Vulnerable by Design" Cloudformation repository. Cfngoat is a learning and training project that demonstrates how common configuration errors can find their way into production cloud environments.
Stars: ✭ 70 (-33.96%)
Mutual labels:  devsecops

advanced-security-compliance

This Action was designed to allow users to configure their Risk threshold for security issues reported by GitHub Code Scanning, Secret Scanning and Dependabot Security.

Capability Demonstration

advanced-security-compliance-demonstration-202109.mp4

Setup

Action

Here is how you can quickly setup advanced-security-compliance.

# Compliance
- name: Advance Security Compliance Action
  uses: GeekMasher/[email protected]

Action Examples

CLI

The CLI tool primarily using pipenv to manage dependencies and pip virtual environments to not mismatch dependencies.

# Install dependencies and virtual environment
pipenv install
# [option] Install system wide
pipenv install --system

Once installed, you can just call the module using the following command(s):

# Using pipenv script
pipenv run main --help
# ... or
pipenv run python -m ghascompliance

CLI Examples

Policy as Code / PaC

Here is an example of using a simple yet cross-organization using Policy as Code:

# Compliance
- name: Advance Security Compliance Action
  uses: GeekMasher/[email protected]
  with:
    # The owner/repo of where the policy is stored  
    policy: GeekMasher/security-queries
    # The local (within the workspace) or repository
    policy-path: policies/default.yml
    # The branch you want to target
    policy-branch: main

PaC Configuration file

The Policy as Code configuration file is very simple yet powerful allowing a user to define 4 types of rules per technologies you want to use.

# This is the technology you want to write a rule for
licensing:
  # The four main rules types to do everything you need to do for all things 
  #  compliance

  # Warnings will always occur if the rule applies and continues executing to 
  #  other rules.
  warnings:
    ids:
      - Other
      - NA
  # Ignores are run next so if an ignored rule is hit that matches the level, 
  #  it will be skipped
  ignores:
    ids:
      - MIT License
  # Conditions will only trigger and raise an error when an exact match is hit
  conditions:
    ids:
      - GPL-2.0
    names:
      - tunnel-agent

  # The simplest and ultimate rule which checks the severity of the alert and
  #  reports an issue if the level matches or higher (see PaC Levels for more info)
  level: error

PaC Levels

There are many different levels of severities with the addition of all and none (self explanatory). When a level is selected like for example error, all higher level severities (critical and high in this example) will also be added.

- critical
- high
- error
- medium
- moderate
- low
- warning
- notes

PaC Rule Blocks

For each rule you can choose either or both of the two different criteria's matches; ids and names

You can also use imports to side load data from other files to supplement the data already in the rule block

codescanning:
  conditions:
    # When the `ids` of the technologies/tool alert matches any one of the ID's in 
    #  the list specified, the rule will the triggered and report the alert.
    ids:
      # In this example case, the CodeQL rule ID below will always be reported if 
      #  present event if the severity is low or even note.
      - js/sql-injection

      # Side note: Check to see what different tools consider id's verses names,
      #  for example `licensing` considers the "Licence" name itself as the id 
      #  while the name of the package/library as the "name"
    
    # `names` allows you to specify the names of alerts or packages.
    names:
      - "Missing rate limiting"

    # The `imports` allows you to supplement your existing data with a list
    #  from a file on the system. 
    imports:
     ids: "path/to/ids/supplement/file.txt"
     names: "path/to/names/supplement/file.txt"

Wildcards

For both types of criteria matching you can use wildcards to easily match requirements in a quicker way. The matching is done using a Unix shell-style wildcards module called fnmatch which supports * for matching everything.

codescanning:
  conditions:
    ids:
      - '*/sql-injection'

Time to Remediate

The feature allows a user to define a time frame to which a security alert/vulnerability of a certain severity has before the alert triggered a violation in the Action.

By default, if this section is not defined in any part of the policy then no checks are done. Existing policy files should act the same without the new section.

general:
  # All other blocks will be inheriting the remediate section if they don't have 
  #  their own defined.
  remediate:
    # Only `error`'s and above have got 7 days to remediate according to the 
    #  policy. Any time before that, nothing will occur and post the remediation 
    #  time frame the alert will be raised. 
    error: 7

codescanning:
  # the `codescanning` block will inherit the `general` block
  # ...

dependabot:
  remediate:
    # high and critical security issues
    high: 7
    # moderate security issues
    moderate: 30
    # all other security issues
    all: 90

secretscanning:
  remediate:
    # All secrets by default are set to 'critical' severity so only `critical` 
    #  or `all` will work
    critical: 7
Time to Remediate Examples

Data Importing

Some things to consider when using imports:

  • Imports appending to existing lists and do not replace a previously generated list.
  • Imports are relative to:
    • Working Directory
    • GitHub Action / CLI directory
    • Cloned Repository Directory
  • Imports are only allowed from a number of predefined paths to prevent loading data on the system (AKA, path traversal).

Dependency Typosquatting

Dependency Typosquatting is a package or library will malicious intent to compromise supply chains or CI systems by extracting data from the environment to a threat actor.

Built into this tool is the ability to look up every package known in your supply chain from the GitHub Dependency Graph and check if it matches against a list of know malicious packages.

Licensing Notice

MIT License

Copyright (c) 2021 Mathew Payne

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].