← 返回 Skills 市场
0x008

Cis Rhel Openeuler Coverage

作者 0X008 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
15
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cis-rhel-openeuler-coverage
功能描述
分析 CIS Red Hat Enterprise Linux Benchmark 中的安全规则在 OpenEuler 安全配置基线中的覆盖情况,输出完全覆盖、部分覆盖、未覆盖的规则清单。适用于:用户提供 CIS RHEL Benchmark PDF 文件路径和 OpenEuler 安全基线 MD 文件路径,要求...
使用说明 (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 基线仅用于只读分析
  • 生成的报告不包含凭据等敏感信息
安全使用建议
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cis-rhel-openeuler-coverage
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cis-rhel-openeuler-coverage 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug cis-rhel-openeuler-coverage
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cis Rhel Openeuler Coverage 是什么?

分析 CIS Red Hat Enterprise Linux Benchmark 中的安全规则在 OpenEuler 安全配置基线中的覆盖情况,输出完全覆盖、部分覆盖、未覆盖的规则清单。适用于:用户提供 CIS RHEL Benchmark PDF 文件路径和 OpenEuler 安全基线 MD 文件路径,要求... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 15 次。

如何安装 Cis Rhel Openeuler Coverage?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cis-rhel-openeuler-coverage」即可一键安装,无需额外配置。

Cis Rhel Openeuler Coverage 是免费的吗?

是的,Cis Rhel Openeuler Coverage 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cis Rhel Openeuler Coverage 支持哪些平台?

Cis Rhel Openeuler Coverage 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cis Rhel Openeuler Coverage?

由 0X008(@0x008)开发并维护,当前版本 v1.0.0。

💬 留言讨论