sswp_analyze_deps
Analyze npm dependency lists for supply-chain risks by detecting typosquatting, version anomalies, and missing integrity hashes. Optional deep reasoning with Kimi K2 enhances analysis. Outputs risk scores and suspicious package counts.
Instructions
Analyze a list of dependencies for supply-chain risk using Kimi K2 reasoning. Provide an array of {name, version} objects for any npm packages you want evaluated. The tool performs four analysis passes: typosquatting detection (matching names against known suspicious patterns like left-pad, event-stream), version anomaly scanning (flagging unpinned ranges like *, >=, ^0), metadata integrity checks (CRITICAL if a dependency lacks an integrity hash), and optional Kimi K2 deep reasoning (requires OLLAMA_CLOUD_API_KEY — returns INCONCLUSIVE without it). Returns a JSON object with per-probe results, overall risk score (0-1), and suspicious package counts. Use this for targeted supply-chain analysis on critical dependency trees. For generating full attestations that include probing, use sswp_witness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | Array of dependency objects to analyze. Each must include the package name and version string. |