首页/ AI 技能 / @skilllib/skill-2014279404539555842
Skill站外收录 @skilllib/skill-2014279404539555842

security-scan

修复 npm 依赖中的安全漏洞,通过分析漏洞报告识别直接或传递性依赖风险,结合版本策略与代码检查实施升级或替换,在保证类型、构建和测试通过的前提下完成加固,优先处理高危漏洞并避免使用非精确版本声明。

0.0 (0) 176 次安装 原作者 编程导航
收录于 2026-01-22
效率工具 AI 技能

Skills.MD

# Security Scan Resolve npm dependency vulnerabilities detected by Snyk.io security scans. ## Activation Conditions - User shares Snyk vulnerability reports - Mentions CVEs/CWEs - Asks to fix security issues in npm dependencies ## Quick Reference | Action | Rule | |--------|------| | Fix direct deps | `vuln-direct-deps.md` | | Fix transitive deps | `vuln-transitive-deps.md` | ## Workflow ### 1. Assess - Parse vulnerability report: package, version, CVE/CWE, severity, fixed version - Categorize as **direct** (in package.json) or **transitive** (pulled in by another package) ### 2. Explore - Check `package.json` for current versions and existing overrides - Check lockfile for actual resolved versions - Search source code for direct usage of vulnerable package - Check npm registry for available fixed versions: `npm view <package> versions --json` ### 3. Fix See rules for specific fix patterns. ### 4. Verify ```bash bun i --yarn bun run type:check bun run lint bun run build bun run test ``` All must pass. ## Tips - Use exact versions for security fixes (no `^` prefix) - Fix Critical/High severity first - Replace unmaintained packages rather than patching - Document workarounds with comments explaining why ## Rules See `rules/` directory for detailed guidance.

评论 0

还没有评论,来抢沙发。