目录

gitlink-security-advisory

License Skill Type

安全漏洞检测与响应 Agent Skill — 为 gitlink-cli 提供 CVE 漏洞扫描、风险分级、修复追踪和安全公告生成能力。


功能

  • 🔍 CVE 漏洞扫描 — 解析项目依赖,通过 OSV.dev API 查询已知漏洞
  • 📊 风险分级 — 按 CVSS 评分分为 Critical / High / Medium / Low 四级
  • 🎯 修复追踪 — 关联已有 Issue/PR,追踪修复进度
  • 📢 安全公告 — 生成结构化安全公告,通知用户受影响版本和修复方案
  • 📝 自动创建 Issue — 为高危漏洞自动创建安全 Issue(需用户确认)

快速开始

安装

# 安装 gitlink-cli
npm install -g @gitlink-ai/cli

# 认证
gitlink-cli auth login

# 安装 Skill(将本目录复制到 skills/)
cp -r gitlink-security-advisory ~/.agents/skills/

# 安装 Python 依赖
pip install requests

使用

在 AI Agent(Claude Code / Cursor / Kimi Code)中对话:

"帮我扫描 gitlink-cli 的安全漏洞"
"检查 lodash 4.17.20 有没有已知 CVE"
"为项目生成安全公告"
"给发现的 CVE-2024-xxxxx 创建 Issue"

命令行直接使用

# 扫描 Go 项目
python3 scripts/cve_scanner.py --dep-file go.mod --ecosystem go

# 扫描 npm 项目(JSON 输出)
python3 scripts/cve_scanner.py --dep-file package.json --ecosystem npm --output json

# 查询单个包
python3 scripts/cve_scanner.py --package lodash --version 4.17.20 --ecosystem npm

# 生成 Markdown 报告
python3 scripts/security_reporter.py --input scan_result.json --output report.md

# 生成安全公告
python3 scripts/security_reporter.py --input scan_result.json --type advisory --output advisory.md

支持的生态

生态 依赖文件 命令参数
Go go.mod --ecosystem go
Node.js package.json --ecosystem npm
Python requirements.txt / pyproject.toml --ecosystem pypi
Rust Cargo.toml --ecosystem crates
Java pom.xml --ecosystem maven

目录结构

gitlink-security-advisory/
├── SKILL.md                      # Agent 指令(核心)
├── README.md                     # 本文件
├── LICENSE                       # Apache-2.0
├── references/
│   ├── cve_severity_guide.md     # CVSS 评分体系参考
│   └── osv_api_reference.md      # OSV.dev API 使用指南
├── scripts/
│   ├── cve_scanner.py            # CVE 扫描引擎
│   └── security_reporter.py      # 报告生成器
├── examples/
│   └── security-scan-workflow.md # 完整扫描工作流示例
└── templates/
    ├── security_report_template.md # 安全评估报告模板
    └── advisory_template.md        # 安全公告模板

相关 Skills

数据来源

漏洞数据来自 OSV.dev(Open Source Vulnerabilities),由 Google 维护,聚合 20+ 语言生态的 CVE 数据。API 免费、无需认证,中国大陆可直接访问。

许可证

Apache-2.0 — 详见 LICENSE

关于

让 AI Agent 自动追踪开源项目的安全漏洞 —— CVE 匹配、风险分级、修复 PR 验证、安全公告生成。

51.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号