Skip to content
cccskills
FreePublished on GitHub

dependency-audit

依赖安全审计时使用。覆盖 npm audit / Snyk / Trivy / 密钥扫描 / 容器扫描。

The English summary is being prepared. Showing the original description.

Works withDockerTerraform
See how to install

Files included (2)

  • SKILL.md3.8 KB
  • templates/dependency-audit-template.md668 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

依赖安全审计(Dependency Audit)

适用场景

  • 第三方依赖漏洞扫描
  • 容器镜像安全扫描
  • Git 历史密钥泄露检测
  • SBOM(软件物料清单)生成
  • 供应链安全评估
  • CI/CD 安全门禁配置

与其他 skill 的分工

场景用什么
依赖/容器/密钥扫描本 skill
Web 漏洞扫描(DAST)web-vulnerability/
认证授权安全审计auth-security-audit/
渗透测试reverse-pentest 工作流

核心命令

Node.js 依赖扫描

# npm 内置审计
npm audit
npm audit fix
npm audit --production  # 只看生产依赖

# pnpm 审计
pnpm audit
pnpm audit --fix

# Snyk(更全面)
npx snyk test
npx snyk monitor  # 持续监控

# 查看过时依赖
pnpm outdated
npx npm-check-updates  # 列出可升级

Java 依赖扫描

# OWASP Dependency-Check
./gradlew dependencyCheckAnalyze
# 报告在 build/reports/dependency-check-report.html

# Maven
mvn org.owasp:dependency-check-maven:check

# Snyk
snyk test --all-projects

Python 依赖扫描

# Safety
pip install safety
safety check

# pip-audit(官方推荐)
pip install pip-audit
pip-audit

# Snyk
snyk test --file=requirements.txt

容器镜像扫描

# Trivy(推荐,最全面)
trivy image myapp:latest
trivy image --severity HIGH,CRITICAL myapp:latest

# Docker Scout(Docker 官方)
docker scout cves myapp:latest
docker scout quickview myapp:latest

# Grype
grype myapp:latest

Git 密钥扫描

# Gitleaks(推荐)
gitleaks detect --source .
gitleaks detect --source . --report-format json --report-path report.json

# 只扫描未提交的变更
gitleaks protect --staged

# TruffleHog
trufflehog git file://. --only-verified

IaC 扫描

# Trivy(支持 Terraform/CloudFormation/Docker)
trivy config .
trivy config --severity HIGH,CRITICAL .

# Checkov
checkov -d .
checkov --framework terraform -d ./infra

CI 集成(GitHub Actions)

# .github/workflows/security.yml
name: Security Scan
on: [push, pull_request]

jobs:
  dependency-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      # Node.js 依赖审计
      - run: npm audit --audit-level=high
      
      # 密钥泄露检测
      - uses: gitleaks/gitleaks-action@v2
      
      # 容器扫描(如有 Dockerfile)
      - uses: aquasecurity/trivy-action@master
        with:
          scan-type: fs
          severity: HIGH,CRITICAL
          exit-code: 1

处理策略

发现高危漏洞时:
  1. 检查是否影响生产(只在 devDependencies?)
  2. 有补丁 → 立即升级
  3. 无补丁 → 评估替代库 or 临时缓解
  4. 误报 → 加入 ignore list(备注原因)

severity 对应 SLA:
  CRITICAL → 24h 内修复
  HIGH     → 7 天内修复
  MEDIUM   → 下个迭代修复
  LOW      → 评估后决定

配套模板

  • templates/dependency-audit-template.md

常见坑

1. npm audit 报100+ 漏洞 → 大多数在 devDependencies,先过滤
2. 强制 npm audit fix → 可能引入破坏性升级
3. 忽略间接依赖 → 供应链攻击就从间接依赖来
4. 只扫不修 → 扫描结果没人看等于没扫
5. 不配 CI 门禁 → 新漏洞照样进代码
6. 密钥已提交再删 → Git 历史里还在(需要 rewrite)
7. 容器用 latest → 基础镜像漏洞无法追溯
8. 不生成 SBOM → 出事后不知道用了什么

与其他 skill 的协作

上游:
  backend-engineer / frontend-engineer → 代码 + 依赖
  devops-engineer → 容器镜像 + IaC

下游:
  ci-cd-pipeline → 安全门禁
  security-report → 安全报告

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

A/B 测试设计与分析时使用。适用于产品实验、功能验证、转化率优化。融合假设驱动 + 样本量计算 + 置信度判断。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

上线前业务方/产品方验收时使用。适用于功能交付确认、UAT、发布会签。融合 BDD Given-When-Then、Specification by Example、ATDD。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

设计无障碍可访问的界面时使用。适用于满足 WCAG 标准、键盘导航、屏幕阅读器支持。优先使用 WCAG 2.2 AA 级标准 + 键盘 + 焦点 + 对比度 + ARIA。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

实现可访问性(无障碍)时使用。覆盖 WCAG 2.2 AA / ARIA / 键盘导航 / 屏幕阅读器 / 颜色对比 / 焦点管理。融合 React Aria / Radix UI / Headless UI 实践 + axe-core 自动化测试。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

AI 模型部署时使用。适用于推理服务 / GPU / TensorRT / 监控 / 扩缩容。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

数据分析报告输出时使用。适用于业务分析报告、周报、专项分析、决策支持。融合洞察 + 建议 + 行动项。

The English summary is being prepared. Showing the original description.

zhaoxuya520/AI-Fullstack-Delivery-Workflow54Updated May 19, 2026

See all skills by zhaoxuya520

Report a problem with this skill