dependency-audit
它能做什么
这项技能检查项目所依赖的软件包是否存在已知的安全缺陷。适合希望保护应用免受供应链攻击的开发者。
适用场景
- ✓当你即将发布应用的新版本时。
- ✓当你听说自己使用的某个包存在安全问题时。
- ✓当你希望在构建流程中设置自动的包检查时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/dependency-audit/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能检查一下我项目的包是否存在已知的安全问题吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会运行包管理器的审计命令并审查结果。然后建议升级或替换存在漏洞的包,并设置自动扫描。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Audit dependencies for known vulnerabilities
Third-party packages are the most common attack surface in modern web applications. The 2021 Log4Shell incident, the 2022 node-ipc supply-chain attack, and countless npm package hijackings demonstrate that a single vulnerable transitive dependency can compromise every application that depends on it. Automated, continuous scanning drastically reduces the window between a CVE being published and your team being aware of it.
Quick Reference
- Run pnpm audit (or npm audit) before every production deployment
- Integrate automated dependency scanning in CI (GitHub Dependabot or Snyk)
- Treat critical and high severity findings as release blockers
- Pin transitive dependencies with a lock file committed to version control
Check
Check the project's dependencies for known security vulnerabilities using the package manager audit command.
Fix
Upgrade, patch, or replace vulnerable dependencies and configure automated scanning in the CI pipeline.
Explain
Explain how supply-chain attacks work and why dependency auditing is a critical part of modern application security.
Code Review
Review the lock file and package.json for unpinned version ranges, abandoned packages, and any packages flagged in recent CVE databases.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/security/dependency-audit
常见问题
什么是供应链攻击?
指有害的改动进入了许多应用所使用的某个包中,因此每个依赖它的应用都可能受到影响。
哪些严重级别最重要?
这项技能把严重(critical)和高(high)级别的问题视为暂停发布的理由。
为什么要保留锁文件?
锁文件会固定精确的包版本,因此每次安装的代码都相同。
详情
作者的原始描述
Use when reviewing a project's security posture, setting up CI pipelines, or responding to a reported vulnerability in a dependency.
热度
- GitHub 星标
- 75k
- 排名
- #2814
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。