依赖审计可能向配置的包注册表披露依赖名称和版本
原文依据:4 处该 Skill 把 `npm audit` 列为最低安全检查,并在安全参考中直接给出命令。运行该命令通常会把依赖包及版本信息发送给当前配置的 npm 注册表以查询漏洞。
如果项目使用私有包,包名和版本可能暴露内部产品、组件命名、技术栈或尚未公开的依赖关系。
源码确实要求或建议运行 `npm audit`,但所给内容没有说明该命令会访问哪个注册表、传输哪些依赖信息,或当前环境如何配置网络。因此无法仅凭这些行确认候选所述的数据披露。用户可要求作者说明该检查的网络行为,并在敏感项目中限制外网或先使用获准的内部注册表。
这项判断针对展示的代码和适用条件,不表示风险已经实际发生。## Audit checklist### Security (critical)- [ ] HTTPS enabled, no mixed content- [ ] No vulnerable dependencies (`npm audit`)- [ ] CSP headers configured (with `frame-ancestors`, `base-uri`, `form-action`)- [ ] `require-trusted-types-for 'script'` enforced (or report-only during rollout)查看另外 3 个位置
```bash# Check for vulnerabilitiesnpm audityarn audit# Auto-fix when possiblenpm audit fixIf live tools are unavailable, use the Lighthouse CLI plus focused dependency and header checks. Never report a high Lighthouse score as proof that the application is secure.- [ ] HTTPS enabled, no mixed content- [ ] No vulnerable dependencies (`npm audit`)- [ ] CSP headers configured (with `frame-ancestors`, `base-uri`, `form-action`)