Back to skills
SKILL.md
Container Cve Fix Validator
ASecurity容器安全CVE漏洞修复验证引擎。从容器漏扫报告(Excel)自动提取漏洞,生成修复计划, SSH到测试环境验证OS包(apt/yum/apk)、Python(pip)、Node.js(npm)、Java(JAR)四种包类型的 修复方案,产出修复验证报告。不涉及主机层漏洞修复、不处理容器编排层安全配置。 触发关键词:容器漏扫、CVE验证、漏洞修复验证、container CVE、fix validation。
- 417 stars
- 0 votes
- 0 copies
- 6 views
- Added September 8, 2026
Works with
Security analysis
100/100Pro scans all 20 files and shows the line behind each finding
npx -y skills add infometa/workbuddyskills --skill container-cve-fix-validator --agent claude-codeAre you the author of Container Cve Fix Validator?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/infometa-container-cve-fix-validator)---
name: container-cve-fix-validator
version: 1.0.0
triggers:
- 容器漏扫
- 容器CVE
- container CVE
- fix validation
- 容器修复
description: >
容器安全CVE漏洞修复验证引擎。从容器漏扫报告(Excel)自动提取漏洞,生成修复计划,
SSH到测试环境验证OS包(apt/yum/apk)、Python(pip)、Node.js(npm)、Java(JAR)四种包类型的
修复方案,产出修复验证报告。不涉及主机层漏洞修复、不处理容器编排层安全配置。
触发关键词:容器漏扫、CVE验证、漏洞修复验证、container CVE、fix validation。
allowed-tools: Read, Write, Bash, Glob, Grep
disable: false
---
# 容器安全CVE漏洞修复验证
## 角色
执行容器安全修复验证流水线。接收容器漏扫 Excel 报告,逐条在测试环境验证每个 CVE
的可修复性,出具验证结论报告。禁止跳过、合并、或自行判断"这个不用验"。
## 四步流水线
```
步骤1: parse_container_report.py → vulns.json
步骤2: run_pipeline.py --create-plan → execution_plan.json (+ OVAL 自动增强)
步骤3: run_pipeline.py --next --task-id N → 逐条循环(看返回决策)
步骤4: run_pipeline.py --summary → 汇总报告 + 自动打包
```
辅助命令(随时可用):`--status` 查看进度、`--list` 列出所有任务。
### 步骤1:解析报告
```bash
python3 scripts/parse_container_report.py "<Excel完整路径>" -o $HOME/tmp/cve_fix_test/vulns.json
```
读取 `vulns.json`,向用户汇报漏洞摘要表格(CVE、组件、版本、镜像、严重程度)。
### 步骤2:创建计划 + OVAL 自动增强
```bash
python3 scripts/run_pipeline.py --create-plan $HOME/tmp/cve_fix_test/vulns.json
```
关注返回字段:`total_tasks`、`pkg_type_stats`、`next_task_id`。
> 本步骤只调这一条命令。不要先跑 `--help`,不要先查 CVE。
### 步骤3:逐条执行(一次一条)
```bash
python3 scripts/run_pipeline.py --next --task-id <N>
```
**循环退出判断**:看 `next_action`
| `next_action` | 含义 | 操作 |
|---|---|---|
| `call_next_tool_once` | 继续 | 用 `next_task_id` 再调 `--next` |
| `run_summary` | 全部完成 | 执行步骤4 `--summary` |
**SKIPPED 状态**:`next_task_id` 直接指向下一个 pending,按指引继续即可。
**失败处理**:当 `status=FAILED` 时返回含 `fix_guidance`:
1. 分析 `fix_guidance.fix_suggestion` 理解问题
2. 从 `available_versions` 选最佳版本
3. 执行 `apply_fix_cmd` 修正
4. 用 `--next --task-id <同ID>` 重跑
5. 修正成功后继续下一条
> 严禁 shell 循环批量。失败必须修正,不得跳过。
> 12 种失败分类明细见 `references/pipeline-detail.md`。
### 步骤4:汇总报告 + 自动打包
```bash
python3 scripts/run_pipeline.py --summary
```
**拦截机制**:仍有 `pending`/`in_progress` 任务时返回 `blocked=true`,必须继续 `--next`。
## 安全版本验证
| 结果 | 含义 |
|---|---|
| `CONFIRMED_SAFE` | installed_version >= fix_versions |
| `LIKELY_SAFE` | 版本有提升但无权威基线验证 |
| `STILL_VULNERABLE` | installed_version < fix_versions → 需修正 |
数据源优先级:OVAL → CIRCL → NVD(详见 `references/ovalfeeds-guide.md`)
## 配置
所有配置通过环境变量注入。复制 `.env.example` 为 `.env` 或直接 `export`。
**必填**:`SSH_HOST`、`SSH_PASSWORD`(SSH 验证阶段4)
**可选**:`DOCKER_REGISTRY`、`YUM_SOURCES_*`、`APT_SOURCES_*`、`NVD_API_KEY`
完整参数说明见 `.env.example` 和 `references/config-guide.md`。
## 操作守则
1. **仅调用白名单脚本**:`parse_container_report.py`、`run_pipeline.py`、`apply_fix.py`、`package_and_upload.py`、`oval_query.py`。内部脚本由上述脚本子进程调起,AI 不直接调用。
2. **`--next` 一次一条**:严禁 shell for 循环批量。
3. **失败必须修正**:`fix_guidance` 提供了修正命令,必须尝试执行。
4. **pending 未清零前不得汇报"已完成"**:`--summary` 返回 `blocked=true` 时必须继续 `--next`。
5. **禁止编造数据**:脚本失败时如实报告。
6. **输出路径始终使用 `$HOME/tmp/cve_fix_test/`**:禁止向项目目录写文件。
## 参考文档
| 文档 | 说明 |
|---|---|
| `references/pipeline-detail.md` | 完整 JSON 结构、12类失败明细、输出目录结构 |
| `references/config-guide.md` | 配置指南(环境变量完整说明) |
| `references/ovalfeeds-guide.md` | OVAL feeds 管理操作手册 |
| `references/output-schema.json` | 输出 JSON Schema |
| `references/report-template.md` | 报告模板 |
Files in this skill
- LICENSE
- README.md
- SKILL.md
- references/config-guide.md
- references/output-schema.json
- references/ovalfeeds-guide.md
- references/pipeline-detail.md
- references/report-template.md
- requirements.txt
- scripts/analyze_cve.py
- scripts/apply_fix.py
- scripts/assess_target_version.py
- scripts/data_dir.py
- scripts/feeds/__init__.py
- scripts/feeds/feed_manager.py
- scripts/feeds/manifest.json
- scripts/feeds/oval_db.py
- scripts/feeds/oval_parser.py
- scripts/generate_dockerfile.py
- scripts/generate_word_report.py
Attribution
Related skills
View all in tools →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.