Cisbenchmarkconverter
CIS Benchmark Converter is a Python script that extracts recommendations from CIS Benchmark PDF documents and exports them into CSV, Excel, or JSON formats. The script converts unstructured PDF content into a structured table, simplifying compliance reviews and audits.
Install / Use
/learn @Octomany/CisbenchmarkconverterREADME
CIS Benchmark Converter
Author: Octomany
LinkedIn: LinkedIn
Date Created: 2024-11-06
Last Update: 2025-14-03
Description
CIS Benchmark Converter is a Python script that extracts recommendations from CIS Benchmark PDF documents and exports them into CSV, Excel, or JSON formats. The script converts unstructured PDF content into a structured table, simplifying compliance reviews and audits.
Features
-
Configurable Extraction:
Set the start page to skip tables of contents or disclaimers, and adjust the logging level via command-line options. -
Multiple Output Formats:
Export the extracted data as CSV (using a pipe|delimiter), Excel (with styled headers, dropdowns, and conditional formatting), or JSON for easy data integration. -
Robust and Maintainable:
Usespathlibfor modern file path management, extended type annotations for static type checking, enhanced exception handling, and a progress bar (viatqdm) for user feedback.
Installation
-
Clone this repository.
-
Install dependencies using the provided
requirements.txt:pip install -r requirements.txtrequirements.txt:
pdfplumber openpyxl tqdm
Usage
Run the script from the command line as follows:
python cis_benchmark_converter.py \
-i path/to/input_file.pdf \
-o path/to/output_file \
-f [csv|excel|json] \
--start_page 10 \
--log_level INFO
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 a.csv,.xlsx, or.jsonextension).-f, --format: Output file format:csv,excel, orjson(default:excel).--start_page: Page number to start extraction (default: 10).--log_level: Logging level (DEBUG,INFO,WARNING, orERROR; default:INFO).
Example
python cis_benchmark_converter.py -i ./CIS_AWS_Benchmark.pdf -o ./CIS_AWS_Benchmark.json -f json --start_page 10 --log_level INFO
For JSON output, the data is structured as a list of dictionaries, with each dictionary representing a recommendation and its associated sections.
Note: The script automatically excludes any sections labeled "CIS Controls" to focus solely on the core recommendations.
Acknowledgements
Special thanks to Flavien Fouqueray (UnBonWhisky) for his valuable bug fixes and contributions in earlier versions of this script.
License
This project is licensed under the MIT License. Please respect the copyrights of the CIS Benchmark documents when using and sharing this tool.
Related Skills
qqbot-channel
345.9kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.0k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
345.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
