Skip to content

GIS-CIS-Benchmark is a Python script designed to extract recommendations from CIS Benchmark PDF documents and export them into CSV or Excel format. The output provides a structured, easy-to-read table format that simplifies compliance checks and reviews.

License

Notifications You must be signed in to change notification settings

Breitec/GIS-CIS-Benchmark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GIS-CIS-Benchmark

Author: Andreas Breitenlohner
LinkedIn: Andreas Breitenlohner
Date Created: 2024-11-29

Description

GIS-CIS-Benchmark is a Python script designed to extract recommendations from CIS Benchmark PDF documents and export them into CSV or Excel format. The output provides a structured, easy-to-read table format that simplifies compliance checks and reviews.

Features

  • Extracts recommendations, including key sections: Profile Applicability, Description, Rationale, Impact, Audit, Remediation, Default Value, References, and Additional Information.
  • Supports both CSV (using | as a delimiter) and Excel output formats.
  • Formats Excel output with styled headers, dropdowns for compliance status, and conditional formatting for easy review.

Installation

  1. Clone this repository.

  2. Install dependencies using requirements.txt:

    pip install -r requirements.txt

Usage

python gis-cis-benchmark.py -i path/to/input_file.pdf -o path/to/output_file -f [csv|excel]

Arguments

  • -i, --input : Path to the input CIS Benchmark PDF file (required).
  • -o, --output : Path to the output file (defaults to the input file name with .csv or .xlsx extension).
  • -f, --format : Output file format, either csv or excel (default: excel).

Example

python cis_benchmark_converter.py -i ./CIS_AWS_Benchmark.pdf -o ./CIS_AWS_Benchmark.xlsx -f excel

File Structure

The generated output includes the following columns:

  • Compliance Status - Dropdown with "Compliant", "Non-Compliant", "To Review".
  • Number - Recommendation number (e.g., 1.1.1).
  • Level - Recommendation level (e.g., L1, L2).
  • Title - Full title of the recommendation.
  • Additional sections from the CIS Benchmark (Profile Applicability, Description, Rationale, etc.).

Notes

  • The script automatically skips sections labeled "CIS Controls" as they aren't part of the core recommendations.

License

This script is provided under the MIT License. Respect CIS Benchmark copyright when using and sharing this tool.

About

GIS-CIS-Benchmark is a Python script designed to extract recommendations from CIS Benchmark PDF documents and export them into CSV or Excel format. The output provides a structured, easy-to-read table format that simplifies compliance checks and reviews.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%