跳到正文
cccskills
免费在 GitHub 公开

dependency-scanning

Scan project dependencies for known vulnerabilities, generate software bills of materials, and enforce license compliance across the software supply chain. Use when the user requests dependency scanning or provides relevant inputs for this workflow.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md8.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Dependency Scanning

This skill enables the agent to analyze a project's direct and transitive dependencies for known security vulnerabilities, outdated packages, and license compliance issues. The agent parses manifest and lock files, queries vulnerability databases (NVD, GitHub Advisory, OSV), produces structured reports with CVE identifiers and remediation guidance, and can generate a Software Bill of Materials (SBOM) in standard formats.

Workflow

  1. Detect Package Ecosystem and Manifest Files — Identify the project's language ecosystem by locating dependency manifests such as package.json and package-lock.json (Node.js), requirements.txt and Pipfile.lock (Python), pom.xml or build.gradle (Java), go.sum (Go), or Gemfile.lock (Ruby). Detect monorepo structures with multiple manifests.

  2. Resolve the Full Dependency Tree — Parse lock files to build the complete dependency graph including transitive dependencies. Identify dependency depth, shared sub-dependencies, and version constraints. Flag phantom dependencies that are used in code but missing from the manifest.

  3. Scan Against Vulnerability Databases — Query the National Vulnerability Database (NVD), GitHub Advisory Database, and OSV for each resolved package and version. Match results by CPE or PURL identifier. Record CVE IDs, CVSS scores, severity levels, affected version ranges, and fixed versions where available.

  4. Assess License Compliance — Extract the declared license for each dependency and compare it against the project's license policy. Flag copyleft licenses (GPL, AGPL) in proprietary projects, identify packages with no declared license, and detect license conflicts between direct and transitive dependencies.

  5. Generate SBOM and Vulnerability Report — Produce a Software Bill of Materials in CycloneDX or SPDX format. Generate a vulnerability report sorted by severity, including CVE identifiers, affected dependency paths, available fix versions, and whether the vulnerable code path is reachable.

  6. Recommend and Apply Fixes — Suggest the minimum version upgrades required to resolve vulnerabilities without breaking changes. Where possible, generate updated manifest and lock files automatically. Flag cases where no fix is available and suggest alternative packages or workarounds.

Supported Technologies

  • Node.js: npm audit, yarn audit, Snyk, Dependabot
  • Python: pip-audit, Safety, Snyk, Dependabot
  • Java: OWASP Dependency-Check, Snyk, Maven Enforcer Plugin
  • Go: govulncheck, Nancy, Snyk
  • Containers: Trivy, Grype (scan OS packages and application dependencies inside images)
  • SBOM Formats: CycloneDX (JSON/XML), SPDX (JSON/Tag-Value)
  • CI/CD Integration: GitHub Actions, GitLab CI, Jenkins, CircleCI

Usage

Provide the agent with the path to a project directory or a specific manifest file. Optionally specify a license policy or target compliance standard. The agent will perform a full scan and deliver a prioritized vulnerability report.

Prompt example:

Scan the Node.js project in /app for dependency vulnerabilities. Generate a CycloneDX SBOM and flag any GPL-licensed transitive dependencies.

Examples

Example 1: Scanning a Node.js Project

Command:

npm audit --json > audit-report.json

Vulnerability Report (excerpt):

#SeverityPackageInstalledFixed InCVEDependency Path
1Criticaljsonwebtoken8.5.19.0.0CVE-2022-23529direct
2Highminimatch3.0.43.0.5CVE-2022-3517express > send > mime > minimatch
3Highqs6.5.26.5.3CVE-2022-24999express > qs
4Mediumsemver5.7.15.7.2CVE-2022-25883nodemon > semver
5Lowcookie0.4.10.4.2CVE-2024-47764express > cookie

Auto-generated fix in package.json:

{
  "dependencies": {
    "jsonwebtoken": "^9.0.0",
    "express": "^4.19.2"
  },
  "overrides": {
    "minimatch": "3.0.5",
    "semver": "5.7.2"
  }
}

Example 2: Scanning a Python Project with pip-audit

Command:

pip-audit -r requirements.txt --format json --output audit.json --fix --dry-run

Vulnerability Report (excerpt):

#SeverityPackageInstalledFixed InCVEDescription
1Criticalcryptography38.0.041.0.6CVE-2023-49083NULL pointer dereference when loading PKCS7 certificates
2Highrequests2.28.02.31.0CVE-2023-32681Leaking Proxy-Authorization header to redirected hosts
3HighJinja23.1.13.1.3CVE-2024-22195Cross-site scripting via xmlattr filter
4Mediumsetuptools65.0.070.0.0CVE-2024-6345Remote code execution via download functions

Auto-generated requirements.txt (fixed):

cryptography==41.0.6    # was 38.0.0 — fixes CVE-2023-49083
requests==2.31.0        # was 2.28.0 — fixes CVE-2023-32681
Jinja2==3.1.3           # was 3.1.1 — fixes CVE-2024-22195
setuptools>=70.0.0      # was 65.0.0 — fixes CVE-2024-6345
Flask==3.0.0
gunicorn==21.2.0

Best Practices

  • Scan on every CI build — integrate dependency scanning into CI pipelines so that new vulnerabilities are caught before code is merged, not after deployment.
  • Pin dependencies and use lock files — reproducible builds with lock files ensure that the exact versions scanned in CI are the same versions deployed to production.
  • Monitor transitive dependencies — over 80% of vulnerabilities in typical projects come from transitive dependencies. Always resolve and scan the full dependency tree, not just direct dependencies.
  • Automate update PRs — use Dependabot, Renovate, or Snyk to automatically open pull requests when fix versions become available, reducing the window of exposure.
  • Maintain a license allow-list — define an approved license list (e.g., MIT, Apache-2.0, BSD) and block builds that introduce dependencies with disallowed licenses.
  • Generate SBOMs for every release — store CycloneDX or SPDX SBOMs alongside release artifacts to support supply chain transparency and incident response.

Safety Boundaries

  • Work only on systems the user owns or is explicitly authorized to assess, and record the approved scope before testing.
  • Start with passive or read-only inspection. Obtain explicit approval before active scanning, exploitation, load generation, or disruptive remediation.
  • Never expose secrets, extract unrelated data, weaken production controls, or expand beyond the approved targets.
  • Preserve evidence, minimize impact, stop on instability, and provide rollback or containment steps for every material change.

Edge Cases

  • Vulnerabilities with no available fix — when a CVE exists but no patched version is released, assess whether the vulnerable code path is reachable in your application. If it is, consider replacing the dependency or applying a local patch.
  • Monorepos with mixed ecosystems — a single repository may contain Node.js, Python, and Go services with separate manifests. Scan each ecosystem independently and produce a unified report.
  • Private registries and internal packages — packages hosted on private npm registries or internal PyPI servers will not appear in public vulnerability databases. Maintain a private advisory feed or scan internal packages with tools like Trivy that support custom data sources.
  • Version conflicts from overrides — forcing a transitive dependency to a newer version via npm overrides or pip constraints can introduce runtime incompatibilities. Always run the test suite after applying automated fixes.
  • Archived or unmaintained dependencies — a package may have no known CVEs but also no active maintainer. Treat unmaintained packages as a supply chain risk and plan migration to actively maintained alternatives.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audit web interfaces against WCAG 2.1 AA/AAA standards, identify violations, and produce actionable remediation reports with code fixes. Use when the user requests accessibility testing or provides relevant inputs for this workflow.

中文简介正在准备中。当前显示原文说明。

seb1n/awesome-ai-agent-skills2232026年8月10日 更新

Design reproducible evaluations for AI agents with representative task sets, explicit rubrics, appropriate graders, baselines, regression gates, and failure analysis. Use when defining agent quality, comparing prompts or models, validating a release, measuring tool-use reliability, investigating regressions, or deciding whether an agent is ready for production.

中文简介正在准备中。当前显示原文说明。

seb1n/awesome-ai-agent-skills2232026年8月10日 更新

Design privacy-aware observability for AI agents using traces, spans, structured events, metrics, cost attribution, dashboards, alerts, and investigation workflows. Use when instrumenting an agent, debugging intermittent tool or model failures, defining service-level objectives, analyzing latency or spend, auditing agent decisions, or preparing production monitoring.

中文简介正在准备中。当前显示原文说明。

seb1n/awesome-ai-agent-skills2232026年8月10日 更新

Plan, execute, document, and retest authorized security assessments of AI agents and multi-agent workflows using safe adversarial cases, synthetic identities, canaries, and evidence-based findings. Use when defining red-team rules of engagement, assessing prompt injection or excessive agency, testing tool and identity boundaries, evaluating memory or cross-agent attacks, scoring a campaign, or verifying remediation in an approved environment.

中文简介正在准备中。当前显示原文说明。

seb1n/awesome-ai-agent-skills2232026年8月10日 更新

Generate comprehensive marketing analytics reports by collecting KPIs, analyzing trends, and delivering actionable insights with attribution modeling and funnel analysis. Use when the user requests analytics reporting or provides relevant inputs for this workflow.

中文简介正在准备中。当前显示原文说明。

seb1n/awesome-ai-agent-skills2232026年8月10日 更新

Design RESTful APIs with proper resource modeling, HTTP method semantics, status codes, pagination, versioning, and documentation. Use when the user requests api design or provides relevant inputs for this workflow.

中文简介正在准备中。当前显示原文说明。

seb1n/awesome-ai-agent-skills2232026年8月10日 更新

查看 seb1n 的全部技能

报告此技能的问题