← Back to Skills Marketplace
0x008

Cis Rhel Openeuler Coverage

by 0X008 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
15
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cis-rhel-openeuler-coverage
Description
分析 CIS Red Hat Enterprise Linux Benchmark 中的安全规则在 OpenEuler 安全配置基线中的覆盖情况,输出完全覆盖、部分覆盖、未覆盖的规则清单。适用于:用户提供 CIS RHEL Benchmark PDF 文件路径和 OpenEuler 安全基线 MD 文件路径,要求...
README (SKILL.md)

CIS RHEL Benchmark → OpenEuler 安全基线覆盖分析

对 CIS Red Hat Enterprise Linux Benchmark PDF 中的每一条安全规则,与 OpenEuler 安全配置基线 Markdown 文档进行逐项对比,输出覆盖分析报告。

使用方式

用户提供两个文件路径即可触发完整分析流程:

老大,分析 CIS 覆盖情况
  CIS PDF: /path/to/CIS_Red_Hat_Enterprise_Linux_9_Benchmark.pdf
  OpenEuler 基线: /path/to/openeuler-security-baseline.md

工作流

步骤 1:确认输入

确认用户同时提供了以下两个文件路径:

  • CIS RHEL Benchmark PDF — CIS 官方发布的 PDF 格式 Benchmark 文档
  • OpenEuler 安全配置基线 — Markdown 格式的 OpenEuler 基线文档

步骤 2:解析 CIS PDF

运行 scripts/parse_cis_pdf.py 提取 CIS 规则清单:

python scripts/parse_cis_pdf.py "\x3Ccis-pdf-path>" -o "\x3Coutput-dir>/cis_rules.json"

输出 JSON 结构:

[
  {
    "rule_id": "1.1.1.1",
    "title": "Ensure mounting of cramfs filesystems is disabled",
    "config_path": "/etc/modprobe.d/CIS.conf",
    "config_param": "install cramfs /bin/false",
    "expected_value": "install cramfs /bin/false",
    "level": "Level 1",
    "scoring": "Scored"
  }
]

关键提取字段:规则编号、标题、配置项路径、参数名、期望值、级别、评分状态。

步骤 3:解析 OpenEuler 基线 MD

运行 scripts/parse_openeuler_md.py 提取基线条目:

python scripts/parse_openeuler_md.py "\x3Copeneuler-md-path>" -o "\x3Coutput-dir>/openeuler_items.json"

输出 JSON 结构:

[
  {
    "item_id": "2.1",
    "config_path": "/etc/ssh/sshd_config",
    "config_param": "MaxAuthTries",
    "expected_value": "3",
    "description": "SSH 最大认证尝试次数设置为 3"
  }
]

关键提取字段:条目编号、配置项路径、参数名、期望值、描述。

步骤 4:覆盖分析

运行 scripts/coverage_analyzer.py 执行匹配和判定:

python scripts/coverage_analyzer.py \
  --cis "\x3Coutput-dir>/cis_rules.json" \
  --openeuler "\x3Coutput-dir>/openeuler_items.json" \
  -o "\x3Coutput-dir>/analysis_result.json"

匹配策略

  1. 精确匹配 — 配置项路径+参数名完全一致
  2. 模糊匹配(精确匹配失败后)— 使用 thefuzz 计算路径相似度,阈值 ≥ 85%
  3. 人工标记— 对于模糊匹配结果,标记需人工确认

覆盖判定标准

状态 判定条件
✅ 完全覆盖 (Fully Covered) 路径匹配 + OpenEuler 要求值在安全严格度上 ≥ CIS 要求(同等或更安全)
⚠️ 部分覆盖 (Partially Covered) 路径匹配但要求值无法自动判定安全严格度、或存在差异但无法确认更安全
❌ 未覆盖 (Not Covered) 配置项在 OpenEuler 基线中不存在(精确 + 模糊均未匹配)

数值安全性比较规则

  • 数字比较:对于 "最大尝试次数"、"超时秒数" 等数值,CIS 要求 ≤ 3,OpenEuler 为 3 或更小 → 完全覆盖;若为 4 → 部分覆盖
  • 布尔/状态值yes/notrue/falseenabled/disabled — 优先级认定一致则为覆盖
  • 路径/Permissions:权限值 600644 更严格,700755 更严格
  • 未知模式:无法自动判断的,归类为部分覆盖,标注"需人工确认"

步骤 5:生成报告

运行 scripts/report_generator.py 输出中英文 CSV:

python scripts/report_generator.py \
  --analysis "\x3Coutput-dir>/analysis_result.json" \
  -o "\x3Copeneuler基线所在目录>"

生成文件:

  • \x3Copeneuler基线所在目录>/coverage_report_zh.csv — 中文报告
  • \x3Copeneuler基线所在目录>/coverage_report_en.csv — 英文报告

报告列定义

中文报告 英文报告 说明
CIS 规则编号 CIS Rule ID CIS 基准规则编号
CIS 规则标题 CIS Rule Title CIS 规则标题
配置项路径 Config Path 受影响的配置文件或路径
配置参数 Config Parameter 具体的配置项
CIS 期望值 CIS Expected Value CIS 要求的值
OpenEuler 要求值 OpenEuler Value OpenEuler 基线定义的值
覆盖状态 Coverage Status 完全覆盖/部分覆盖/未覆盖
备注 Remarks 差异说明或人工确认提示

文件结构

cis-rhel-openeuler-coverage/
├── SKILL.md                       # 本文件
├── requirements.txt               # Python 依赖
└── scripts/
    ├── parse_cis_pdf.py           # CIS PDF 规则提取
    ├── parse_openeuler_md.py      # OpenEuler MD 基线解析
    ├── coverage_analyzer.py       # 匹配与覆盖分析
    └── report_generator.py        # 中英文 CSV 报告输出

依赖安装

首次使用前运行:

pip install -r "\x3Cskills-dir>/cis-rhel-openeuler-coverage/requirements.txt"

安全注意事项

  • 本技能仅处理文档级分析,不修改任何系统配置
  • CIS Benchmark PDF 和 OpenEuler 基线仅用于只读分析
  • 生成的报告不包含凭据等敏感信息
Usage Guidance
Install only if you need CIS RHEL-to-OpenEuler baseline coverage analysis. Provide only the intended PDF/Markdown paths, and direct outputs to a working report directory because the scripts create JSON, CSV, and summary files locally.
Capability Assessment
Purpose & Capability
The artifacts consistently describe parsing a CIS RHEL PDF and an OpenEuler Markdown baseline, comparing rules, and generating JSON/CSV/text reports. The scripts implement that purpose directly.
Instruction Scope
The workflow requires the user to provide both input document paths before running the scripts. One trigger phrase is somewhat broad, but it appears inside a clearly scoped CIS/OpenEuler coverage-analysis description.
Install Mechanism
Installation is limited to common Python dependencies in requirements.txt. Dependency registry and static scan metadata are clean, and the scripts are not marked executable in the package file listing.
Credentials
Runtime file reads are limited to the user-specified PDF/Markdown/JSON inputs, and writes are local reports or intermediate JSON files at user-specified output paths. There are no network calls, shell execution, credential reads, or broad local indexing.
Persistence & Privilege
No startup hooks, background workers, privilege changes, credential/session handling, or durable agent-behavior modification were found.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cis-rhel-openeuler-coverage
  3. After installation, invoke the skill by name or use /cis-rhel-openeuler-coverage
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Analyze coverage of CIS Red Hat Enterprise Linux Benchmark rules against the OpenEuler security baseline at the configuration level. - Automatically parses CIS RHEL Benchmark PDF and OpenEuler security baseline Markdown files to extract rule details. - Performs rule-by-rule comparison using configurable match strategies (exact, fuzzy, manual review). - Assesses coverage status as “fully covered”, “partially covered”, or “not covered” with detailed criteria for each. - Generates bilingual (Chinese/English) CSV reports summarizing rule alignment, values, and coverage status. - Includes clear workflow and command line usage instructions for end users.
Metadata
Slug cis-rhel-openeuler-coverage
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Cis Rhel Openeuler Coverage?

分析 CIS Red Hat Enterprise Linux Benchmark 中的安全规则在 OpenEuler 安全配置基线中的覆盖情况,输出完全覆盖、部分覆盖、未覆盖的规则清单。适用于:用户提供 CIS RHEL Benchmark PDF 文件路径和 OpenEuler 安全基线 MD 文件路径,要求... It is an AI Agent Skill for Claude Code / OpenClaw, with 15 downloads so far.

How do I install Cis Rhel Openeuler Coverage?

Run "/install cis-rhel-openeuler-coverage" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Cis Rhel Openeuler Coverage free?

Yes, Cis Rhel Openeuler Coverage is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cis Rhel Openeuler Coverage support?

Cis Rhel Openeuler Coverage is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cis Rhel Openeuler Coverage?

It is built and maintained by 0X008 (@0x008); the current version is v1.0.0.

💬 Comments