Coder Social home page Coder Social logo

trend-anz / cloud-one-conformity-bulk-suppress-checks Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 5.0 18 KB

A python script for bulk suppression of rule findings based on the conformity checks API filters.

License: MIT License

Python 100.00%
python3 cloud cloudconformity trendmicro conformity security-automation

cloud-one-conformity-bulk-suppress-checks's Introduction

Cloud-One-Conformity-Bulk-Suppress-Checks

Script Overview

This script allows you to suppress findings in bulk based on results returned from the Cloud One Conformity Checks API endpoint.

IMPORTANT: This script will suppress ALL findings returned based on the filters you provide, please ensure you filter your results correctly with filter variables.

List of variables available within the script:

Conformity Account Info:

  • CC_REGION (defaults to us-west-2)
  • CC_APIKEY (required)
  • CC_ACCOUNTIDS (required)

Suppression Message:

  • CC_SUPPRESSION_NOTE (defaults to "Bulk Suppression Script")

Checks API Filters:

  • CC_FILTER_CATEGORIES
  • CC_FILTER_COMPLIANCES
  • CC_FILTER_NEWERTHANDAYS
  • CC_FILTER_OLDERTHANDAYS
  • CC_FILTER_REGIONS
  • CC_FILTER_RISKLEVELS
  • CC_FILTER_RULEIDS (required to prevent suppression of everything when not supplied)
  • CC_FILTER_SERVICES
  • CC_FILTER_STATUSES (defaults to "FAILURE")
  • CC_FILTER_SUPPRESSED (defaults to "false" to skip already suppressed findings)
  • CC_FILTER_SUPPRESSEDFILTERMODE (defaults to "v2")
  • CC_FILTER_TAGS

Usage

  1. Install the required pip dependencies:
pip3 install -r requirements.txt
  1. Set your environment variables for your Conformity account and desired filters for the checks query: Example to suppress all failed checks older than 7 days for the CFM-002 rule.
export CC_APIKEY=asdfasdfksjadfkljaDUMMYAPIKEY
export CC_ACCOUNTIDS=i7adfakeID
export CC_FILTER_RULEIDS=CFM-002
export CC_FILTER_OLDERTHANDAYS=7
  1. Run the script:
python3 suppresschecks.py

Example Response:

Received API response code of 200 for suppression of check ID: ccc:i7adfakeID:CFM-002:CloudFormation:us-east-1:CloudConformity
Received API response code of 200 for suppression of check ID: ccc:i7adfakeID:CFM-002:CloudFormation:us-east-1:CloudConformityMonitoring
Received API response code of 200 for suppression of check ID: ccc:i7adfakeID:CFM-002:CloudFormation:us-west-1:CloudConformityMonitoring

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

For more information about Trend Micro Cloud One & Cloud One Conformity visit:

cloud-one-conformity-bulk-suppress-checks's People

Contributors

tomryan-321 avatar

Stargazers

 avatar

Watchers

 avatar

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.