code-ai-installer 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/.agents/skills/dependency-supply-chain-review/SKILL.md +181 -4
  2. package/.agents/skills/dependency-supply-chain-review/agents/claude.json +2 -2
  3. package/.agents/skills/dependency-supply-chain-review/agents/copilot.json +2 -2
  4. package/.agents/skills/dependency-supply-chain-review/agents/gemini.json +2 -2
  5. package/.agents/skills/dependency-supply-chain-review/agents/openai.yaml +1 -1
  6. package/.agents/skills/dependency-supply-chain-review/agents/qwen.json +2 -2
  7. package/.agents/skills/dependency-supply-chain-review/agents/skill.yaml +2 -2
  8. package/CONTEXT.md +4 -2
  9. package/agents/reviewer.md +4 -1
  10. package/agents/senior_full_stack.md +10 -1
  11. package/domains/content/.agents/skills/audience-analysis/agents/claude.json +2 -2
  12. package/domains/content/.agents/skills/audience-analysis/agents/copilot.json +2 -2
  13. package/domains/content/.agents/skills/audience-analysis/agents/gemini.json +2 -2
  14. package/domains/content/.agents/skills/audience-analysis/agents/qwen.json +2 -2
  15. package/domains/content/.agents/skills/audience-analysis/agents/skill.yaml +2 -2
  16. package/domains/content/.agents/skills/board/agents/claude.json +2 -2
  17. package/domains/content/.agents/skills/board/agents/copilot.json +2 -2
  18. package/domains/content/.agents/skills/board/agents/gemini.json +2 -2
  19. package/domains/content/.agents/skills/board/agents/qwen.json +2 -2
  20. package/domains/content/.agents/skills/board/agents/skill.yaml +2 -2
  21. package/domains/content/.agents/skills/brand-compliance/agents/claude.json +2 -2
  22. package/domains/content/.agents/skills/brand-compliance/agents/copilot.json +2 -2
  23. package/domains/content/.agents/skills/brand-compliance/agents/gemini.json +2 -2
  24. package/domains/content/.agents/skills/brand-compliance/agents/qwen.json +2 -2
  25. package/domains/content/.agents/skills/brand-compliance/agents/skill.yaml +2 -2
  26. package/domains/content/.agents/skills/brand-guidelines/agents/claude.json +2 -2
  27. package/domains/content/.agents/skills/brand-guidelines/agents/copilot.json +2 -2
  28. package/domains/content/.agents/skills/brand-guidelines/agents/gemini.json +2 -2
  29. package/domains/content/.agents/skills/brand-guidelines/agents/qwen.json +2 -2
  30. package/domains/content/.agents/skills/brand-guidelines/agents/skill.yaml +2 -2
  31. package/domains/content/.agents/skills/competitor-content-analysis/agents/claude.json +2 -2
  32. package/domains/content/.agents/skills/competitor-content-analysis/agents/copilot.json +2 -2
  33. package/domains/content/.agents/skills/competitor-content-analysis/agents/gemini.json +2 -2
  34. package/domains/content/.agents/skills/competitor-content-analysis/agents/qwen.json +2 -2
  35. package/domains/content/.agents/skills/competitor-content-analysis/agents/skill.yaml +2 -2
  36. package/domains/content/.agents/skills/content-brief/agents/claude.json +2 -2
  37. package/domains/content/.agents/skills/content-brief/agents/copilot.json +2 -2
  38. package/domains/content/.agents/skills/content-brief/agents/gemini.json +2 -2
  39. package/domains/content/.agents/skills/content-brief/agents/qwen.json +2 -2
  40. package/domains/content/.agents/skills/content-brief/agents/skill.yaml +2 -2
  41. package/domains/content/.agents/skills/content-calendar/agents/claude.json +2 -2
  42. package/domains/content/.agents/skills/content-calendar/agents/copilot.json +2 -2
  43. package/domains/content/.agents/skills/content-calendar/agents/gemini.json +2 -2
  44. package/domains/content/.agents/skills/content-calendar/agents/qwen.json +2 -2
  45. package/domains/content/.agents/skills/content-calendar/agents/skill.yaml +2 -2
  46. package/domains/content/.agents/skills/content-release-gate/agents/claude.json +2 -2
  47. package/domains/content/.agents/skills/content-release-gate/agents/copilot.json +2 -2
  48. package/domains/content/.agents/skills/content-release-gate/agents/gemini.json +2 -2
  49. package/domains/content/.agents/skills/content-release-gate/agents/qwen.json +2 -2
  50. package/domains/content/.agents/skills/content-release-gate/agents/skill.yaml +2 -2
  51. package/domains/content/.agents/skills/content-review-checklist/agents/claude.json +2 -2
  52. package/domains/content/.agents/skills/content-review-checklist/agents/copilot.json +2 -2
  53. package/domains/content/.agents/skills/content-review-checklist/agents/gemini.json +2 -2
  54. package/domains/content/.agents/skills/content-review-checklist/agents/qwen.json +2 -2
  55. package/domains/content/.agents/skills/content-review-checklist/agents/skill.yaml +2 -2
  56. package/domains/content/.agents/skills/cta-optimization/agents/claude.json +2 -2
  57. package/domains/content/.agents/skills/cta-optimization/agents/copilot.json +2 -2
  58. package/domains/content/.agents/skills/cta-optimization/agents/gemini.json +2 -2
  59. package/domains/content/.agents/skills/cta-optimization/agents/qwen.json +2 -2
  60. package/domains/content/.agents/skills/cta-optimization/agents/skill.yaml +2 -2
  61. package/domains/content/.agents/skills/data-storytelling/agents/claude.json +2 -2
  62. package/domains/content/.agents/skills/data-storytelling/agents/copilot.json +2 -2
  63. package/domains/content/.agents/skills/data-storytelling/agents/gemini.json +2 -2
  64. package/domains/content/.agents/skills/data-storytelling/agents/qwen.json +2 -2
  65. package/domains/content/.agents/skills/data-storytelling/agents/skill.yaml +2 -2
  66. package/domains/content/.agents/skills/email-copywriting/agents/claude.json +2 -2
  67. package/domains/content/.agents/skills/email-copywriting/agents/copilot.json +2 -2
  68. package/domains/content/.agents/skills/email-copywriting/agents/gemini.json +2 -2
  69. package/domains/content/.agents/skills/email-copywriting/agents/qwen.json +2 -2
  70. package/domains/content/.agents/skills/email-copywriting/agents/skill.yaml +2 -2
  71. package/domains/content/.agents/skills/email-engagement-tiers/agents/claude.json +16 -0
  72. package/domains/content/.agents/skills/email-engagement-tiers/agents/copilot.json +16 -0
  73. package/domains/content/.agents/skills/email-engagement-tiers/agents/gemini.json +16 -0
  74. package/domains/content/.agents/skills/email-engagement-tiers/agents/openai.yaml +8 -0
  75. package/domains/content/.agents/skills/email-engagement-tiers/agents/qwen.json +16 -0
  76. package/domains/content/.agents/skills/email-engagement-tiers/agents/skill.yaml +20 -0
  77. package/domains/content/.agents/skills/fact-checking/agents/claude.json +2 -2
  78. package/domains/content/.agents/skills/fact-checking/agents/copilot.json +2 -2
  79. package/domains/content/.agents/skills/fact-checking/agents/gemini.json +2 -2
  80. package/domains/content/.agents/skills/fact-checking/agents/qwen.json +2 -2
  81. package/domains/content/.agents/skills/fact-checking/agents/skill.yaml +2 -2
  82. package/domains/content/.agents/skills/gates/agents/claude.json +2 -2
  83. package/domains/content/.agents/skills/gates/agents/copilot.json +2 -2
  84. package/domains/content/.agents/skills/gates/agents/gemini.json +2 -2
  85. package/domains/content/.agents/skills/gates/agents/qwen.json +2 -2
  86. package/domains/content/.agents/skills/gates/agents/skill.yaml +2 -2
  87. package/domains/content/.agents/skills/google-stitch-content/agents/claude.json +16 -0
  88. package/domains/content/.agents/skills/google-stitch-content/agents/copilot.json +16 -0
  89. package/domains/content/.agents/skills/google-stitch-content/agents/gemini.json +16 -0
  90. package/domains/content/.agents/skills/google-stitch-content/agents/openai.yaml +8 -0
  91. package/domains/content/.agents/skills/google-stitch-content/agents/qwen.json +16 -0
  92. package/domains/content/.agents/skills/google-stitch-content/agents/skill.yaml +20 -0
  93. package/domains/content/.agents/skills/handoff/agents/claude.json +2 -2
  94. package/domains/content/.agents/skills/handoff/agents/copilot.json +2 -2
  95. package/domains/content/.agents/skills/handoff/agents/gemini.json +2 -2
  96. package/domains/content/.agents/skills/handoff/agents/qwen.json +2 -2
  97. package/domains/content/.agents/skills/handoff/agents/skill.yaml +2 -2
  98. package/domains/content/.agents/skills/headline-formulas/agents/claude.json +2 -2
  99. package/domains/content/.agents/skills/headline-formulas/agents/copilot.json +2 -2
  100. package/domains/content/.agents/skills/headline-formulas/agents/gemini.json +2 -2
  101. package/domains/content/.agents/skills/headline-formulas/agents/qwen.json +2 -2
  102. package/domains/content/.agents/skills/headline-formulas/agents/skill.yaml +2 -2
  103. package/domains/content/.agents/skills/image-prompt-engineering/agents/claude.json +2 -2
  104. package/domains/content/.agents/skills/image-prompt-engineering/agents/copilot.json +2 -2
  105. package/domains/content/.agents/skills/image-prompt-engineering/agents/gemini.json +2 -2
  106. package/domains/content/.agents/skills/image-prompt-engineering/agents/qwen.json +2 -2
  107. package/domains/content/.agents/skills/image-prompt-engineering/agents/skill.yaml +2 -2
  108. package/domains/content/.agents/skills/mailerlite-email-ops/agents/claude.json +16 -0
  109. package/domains/content/.agents/skills/mailerlite-email-ops/agents/copilot.json +16 -0
  110. package/domains/content/.agents/skills/mailerlite-email-ops/agents/gemini.json +16 -0
  111. package/domains/content/.agents/skills/mailerlite-email-ops/agents/openai.yaml +8 -0
  112. package/domains/content/.agents/skills/mailerlite-email-ops/agents/qwen.json +16 -0
  113. package/domains/content/.agents/skills/mailerlite-email-ops/agents/skill.yaml +20 -0
  114. package/domains/content/.agents/skills/marketing-psychology/agents/claude.json +16 -0
  115. package/domains/content/.agents/skills/marketing-psychology/agents/copilot.json +16 -0
  116. package/domains/content/.agents/skills/marketing-psychology/agents/gemini.json +16 -0
  117. package/domains/content/.agents/skills/marketing-psychology/agents/openai.yaml +8 -0
  118. package/domains/content/.agents/skills/marketing-psychology/agents/qwen.json +16 -0
  119. package/domains/content/.agents/skills/marketing-psychology/agents/skill.yaml +20 -0
  120. package/domains/content/.agents/skills/moodboard/agents/claude.json +2 -2
  121. package/domains/content/.agents/skills/moodboard/agents/copilot.json +2 -2
  122. package/domains/content/.agents/skills/moodboard/agents/gemini.json +2 -2
  123. package/domains/content/.agents/skills/moodboard/agents/qwen.json +2 -2
  124. package/domains/content/.agents/skills/moodboard/agents/skill.yaml +2 -2
  125. package/domains/content/.agents/skills/platform-compliance/agents/claude.json +2 -2
  126. package/domains/content/.agents/skills/platform-compliance/agents/copilot.json +2 -2
  127. package/domains/content/.agents/skills/platform-compliance/agents/gemini.json +2 -2
  128. package/domains/content/.agents/skills/platform-compliance/agents/qwen.json +2 -2
  129. package/domains/content/.agents/skills/platform-compliance/agents/skill.yaml +2 -2
  130. package/domains/content/.agents/skills/platform-strategy/agents/claude.json +2 -2
  131. package/domains/content/.agents/skills/platform-strategy/agents/copilot.json +2 -2
  132. package/domains/content/.agents/skills/platform-strategy/agents/gemini.json +2 -2
  133. package/domains/content/.agents/skills/platform-strategy/agents/qwen.json +2 -2
  134. package/domains/content/.agents/skills/platform-strategy/agents/skill.yaml +2 -2
  135. package/domains/content/.agents/skills/platform-visual-specs/agents/claude.json +2 -2
  136. package/domains/content/.agents/skills/platform-visual-specs/agents/copilot.json +2 -2
  137. package/domains/content/.agents/skills/platform-visual-specs/agents/gemini.json +2 -2
  138. package/domains/content/.agents/skills/platform-visual-specs/agents/qwen.json +2 -2
  139. package/domains/content/.agents/skills/platform-visual-specs/agents/skill.yaml +2 -2
  140. package/domains/content/.agents/skills/readability-scoring/agents/claude.json +2 -2
  141. package/domains/content/.agents/skills/readability-scoring/agents/copilot.json +2 -2
  142. package/domains/content/.agents/skills/readability-scoring/agents/gemini.json +2 -2
  143. package/domains/content/.agents/skills/readability-scoring/agents/qwen.json +2 -2
  144. package/domains/content/.agents/skills/readability-scoring/agents/skill.yaml +2 -2
  145. package/domains/content/.agents/skills/seo-copywriting/agents/claude.json +2 -2
  146. package/domains/content/.agents/skills/seo-copywriting/agents/copilot.json +2 -2
  147. package/domains/content/.agents/skills/seo-copywriting/agents/gemini.json +2 -2
  148. package/domains/content/.agents/skills/seo-copywriting/agents/qwen.json +2 -2
  149. package/domains/content/.agents/skills/seo-copywriting/agents/skill.yaml +2 -2
  150. package/domains/content/.agents/skills/social-media-formats/agents/claude.json +2 -2
  151. package/domains/content/.agents/skills/social-media-formats/agents/copilot.json +2 -2
  152. package/domains/content/.agents/skills/social-media-formats/agents/gemini.json +2 -2
  153. package/domains/content/.agents/skills/social-media-formats/agents/qwen.json +2 -2
  154. package/domains/content/.agents/skills/social-media-formats/agents/skill.yaml +2 -2
  155. package/domains/content/.agents/skills/source-verification/agents/claude.json +2 -2
  156. package/domains/content/.agents/skills/source-verification/agents/copilot.json +2 -2
  157. package/domains/content/.agents/skills/source-verification/agents/gemini.json +2 -2
  158. package/domains/content/.agents/skills/source-verification/agents/qwen.json +2 -2
  159. package/domains/content/.agents/skills/source-verification/agents/skill.yaml +2 -2
  160. package/domains/content/.agents/skills/storytelling-framework/agents/claude.json +2 -2
  161. package/domains/content/.agents/skills/storytelling-framework/agents/copilot.json +2 -2
  162. package/domains/content/.agents/skills/storytelling-framework/agents/gemini.json +2 -2
  163. package/domains/content/.agents/skills/storytelling-framework/agents/qwen.json +2 -2
  164. package/domains/content/.agents/skills/storytelling-framework/agents/skill.yaml +2 -2
  165. package/domains/content/.agents/skills/tone-of-voice/agents/claude.json +2 -2
  166. package/domains/content/.agents/skills/tone-of-voice/agents/copilot.json +2 -2
  167. package/domains/content/.agents/skills/tone-of-voice/agents/gemini.json +2 -2
  168. package/domains/content/.agents/skills/tone-of-voice/agents/qwen.json +2 -2
  169. package/domains/content/.agents/skills/tone-of-voice/agents/skill.yaml +2 -2
  170. package/domains/content/.agents/skills/topic-research/agents/claude.json +2 -2
  171. package/domains/content/.agents/skills/topic-research/agents/copilot.json +2 -2
  172. package/domains/content/.agents/skills/topic-research/agents/gemini.json +2 -2
  173. package/domains/content/.agents/skills/topic-research/agents/qwen.json +2 -2
  174. package/domains/content/.agents/skills/topic-research/agents/skill.yaml +2 -2
  175. package/domains/content/.agents/skills/trend-research/agents/claude.json +2 -2
  176. package/domains/content/.agents/skills/trend-research/agents/copilot.json +2 -2
  177. package/domains/content/.agents/skills/trend-research/agents/gemini.json +2 -2
  178. package/domains/content/.agents/skills/trend-research/agents/qwen.json +2 -2
  179. package/domains/content/.agents/skills/trend-research/agents/skill.yaml +2 -2
  180. package/domains/content/.agents/skills/visual-brief/agents/claude.json +2 -2
  181. package/domains/content/.agents/skills/visual-brief/agents/copilot.json +2 -2
  182. package/domains/content/.agents/skills/visual-brief/agents/gemini.json +2 -2
  183. package/domains/content/.agents/skills/visual-brief/agents/qwen.json +2 -2
  184. package/domains/content/.agents/skills/visual-brief/agents/skill.yaml +2 -2
  185. package/domains/development/.agents/skills/dependency-supply-chain-review/SKILL.md +181 -4
  186. package/domains/development/.agents/skills/dependency-supply-chain-review/agents/claude.json +2 -2
  187. package/domains/development/.agents/skills/dependency-supply-chain-review/agents/copilot.json +2 -2
  188. package/domains/development/.agents/skills/dependency-supply-chain-review/agents/gemini.json +2 -2
  189. package/domains/development/.agents/skills/dependency-supply-chain-review/agents/openai.yaml +1 -1
  190. package/domains/development/.agents/skills/dependency-supply-chain-review/agents/qwen.json +2 -2
  191. package/domains/development/.agents/skills/dependency-supply-chain-review/agents/skill.yaml +2 -2
  192. package/domains/development/agents/reviewer.md +4 -1
  193. package/domains/development/agents/senior_full_stack.md +10 -1
  194. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/SKILL.md +181 -4
  195. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/agents/claude.json +2 -2
  196. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/agents/copilot.json +2 -2
  197. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/agents/gemini.json +2 -2
  198. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/agents/openai.yaml +1 -1
  199. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/agents/qwen.json +2 -2
  200. package/domains/development/locales/en/.agents/skills/dependency-supply-chain-review/agents/skill.yaml +2 -2
  201. package/domains/development/locales/en/agents/reviewer.md +4 -1
  202. package/domains/development/locales/en/agents/senior_full_stack.md +10 -1
  203. package/locales/en/.agents/skills/dependency-supply-chain-review/SKILL.md +181 -4
  204. package/locales/en/.agents/skills/dependency-supply-chain-review/agents/claude.json +2 -2
  205. package/locales/en/.agents/skills/dependency-supply-chain-review/agents/copilot.json +2 -2
  206. package/locales/en/.agents/skills/dependency-supply-chain-review/agents/gemini.json +2 -2
  207. package/locales/en/.agents/skills/dependency-supply-chain-review/agents/openai.yaml +1 -1
  208. package/locales/en/.agents/skills/dependency-supply-chain-review/agents/qwen.json +2 -2
  209. package/locales/en/.agents/skills/dependency-supply-chain-review/agents/skill.yaml +2 -2
  210. package/locales/en/agents/reviewer.md +4 -1
  211. package/locales/en/agents/senior_full_stack.md +10 -1
  212. package/package.json +3 -2
@@ -1,13 +1,18 @@
1
1
  ---
2
2
  name: dependency-supply-chain-review
3
- description: Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.
3
+ description: Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.
4
+ last_verified: 2026-04-08
5
+ version: 2.0
6
+ mcp_server: socket-mcp
4
7
  ---
5
8
 
6
9
  # Skill: Dependency & Supply Chain Review
7
10
 
8
- Audit of npm dependencies: vulnerabilities, licenses, suspicious packages.
11
+ Audit of npm dependencies: supply chain, vulnerabilities, licenses, suspicious packages.
12
+ **Since v2.0** — mandatory integration with **socket.dev MCP** (`depscore`) for every new or updated package. P0 alerts block installation until explicit user confirmation.
9
13
 
10
14
  **Sections:**
15
+ 0. [Prerequisites — Socket.dev MCP](#0-prerequisites)
11
16
  1. [When to activate](#1-when-to-activate)
12
17
  2. [Audit Commands](#2-audit-commands)
13
18
  3. [Checklist](#3-checklist)
@@ -16,6 +21,70 @@ Audit of npm dependencies: vulnerabilities, licenses, suspicious packages.
16
21
  6. [Decision Framework](#6-decision-framework)
17
22
  7. [CI Integration](#7-ci-integration)
18
23
  8. [Output Template](#8-output-template)
24
+ 9. [Socket.dev Integration](#9-socket-dev)
25
+
26
+ ---
27
+
28
+ ## 0. Prerequisites — Socket.dev MCP <a id="0-prerequisites"></a>
29
+
30
+ > [!IMPORTANT]
31
+ > **Socket.dev MCP is mandatory since v2.0.** Without it, this skill operates in **degraded mode** with a notice in the report.
32
+
33
+ ### Why
34
+
35
+ [socket.dev](https://socket.dev) provides automated supply-chain analytics for packages: detection of malware, typosquatting, suspicious maintainer changes, native binding risks. Without it, the review relies only on `npm audit`, which catches only known CVEs.
36
+
37
+ ### Installation (recommended — HTTP, no API key required)
38
+
39
+ Add the snippet to the `mcpServers` config of your AI client (Claude Code / Codex / Qwen / Copilot / Antigravity):
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "socket-mcp": {
45
+ "type": "http",
46
+ "url": "https://mcp.socket.dev/"
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Alternative — stdio with API key (for teams with paid socket.dev account)
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "socket-mcp": {
58
+ "command": "npx",
59
+ "args": ["-y", "@socketsecurity/mcp@latest"],
60
+ "env": {
61
+ "SOCKET_API_KEY": "your-api-key-here"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ API key is available at https://socket.dev/.
69
+
70
+ ### Detection protocol (agent runs this before review)
71
+
72
+ 1. Try calling `depscore` on a known package (e.g., `lodash@4.17.21`).
73
+ 2. If the tool is available and returns a valid response → **Active mode**, proceed.
74
+ 3. If the tool is unavailable → **degraded mode**, follow the steps below.
75
+
76
+ ### Degraded mode protocol
77
+
78
+ If `socket-mcp` is not connected:
79
+
80
+ 1. **Log a warning**: `[degraded] socket-mcp not detected — falling back to npm audit only`.
81
+ 2. **Offer installation**: show the user both JSON snippets (HTTP + stdio) and ask:
82
+ > "Socket.dev MCP is not connected. Want to install it now? (HTTP mode requires no API key). [y/n]"
83
+ 3. If **y** → instruct: "Add the snippet to the `mcpServers` config of your AI client and restart the session", then re-run detection after restart.
84
+ 4. If **n** or the tool is still unavailable after installation → continue review with `Mode: Degraded` in Output Template, fall back to `npm audit` + manual checks from section 4 (Red Flags).
85
+
86
+ > [!WARNING]
87
+ > In degraded mode, the review **does not block** merge on DEP-05a/05b/05c (socket-checks), but Reviewer must explicitly record the degraded status in the Handoff Envelope.
19
88
 
20
89
  ---
21
90
 
@@ -95,11 +164,18 @@ grep_search: Query="prebuild" SearchPath="package-lock.json"
95
164
  | # | Check | Severity | Status |
96
165
  |---|-------|----------|--------|
97
166
  | DEP-05 | `npm audit` — no high/critical vulnerabilities | 🔴 P0 | ☐ |
167
+ | DEP-05a | socket.dev `depscore.supply_chain ≥ 0.75` for all new/updated deps | 🔴 P0 | ☐ |
168
+ | DEP-05b | socket.dev `depscore.vulnerability ≥ 0.80` | 🔴 P0 | ☐ |
169
+ | DEP-05c | socket.dev `depscore.license ≥ 0.50` (no copyleft contamination) | 🔴 P0 | ☐ |
170
+ | DEP-05d | socket-mcp tool detected (not degraded mode) | 🟠 P1 | ☐ |
98
171
  | DEP-06 | `package-lock.json` committed and up to date | 🔴 P0 | ☐ |
99
172
  | DEP-07 | No `npm install` with `--force` or `--legacy-peer-deps` (unless justified) | 🟠 P1 | ☐ |
100
173
  | DEP-08 | No postinstall scripts from untrusted packages | 🔴 P0 | ☐ |
101
174
  | DEP-09 | Packages use well-known publishers (npm org verified) | 🟠 P1 | ☐ |
102
175
 
176
+ > [!NOTE]
177
+ > DEP-05a/05b/05c are checked automatically via socket.dev `depscore` (see section [9. Socket.dev Integration](#9-socket-dev)). In **degraded mode** these checks are marked `N/A — degraded` and do not block merge, but Reviewer must record this in the Output Template.
178
+
103
179
  ### 3.3 Maintenance
104
180
 
105
181
  | # | Check | Severity | Status |
@@ -262,10 +338,22 @@ dependency-review:
262
338
  **Reviewer:** Reviewer Agent
263
339
  **Total deps:** production: XX, dev: YY
264
340
 
341
+ ## Socket.dev Audit
342
+ - **Mode:** ✅ Active / ⚠️ **Degraded** (socket-mcp not available)
343
+ - Packages scanned: XX
344
+ - P0 blockers: Y
345
+ - P1 warnings: Z
346
+
347
+ | Package | supply_chain | vuln | license | quality | maint | Verdict |
348
+ |---------|--------------|------|---------|---------|-------|---------|
349
+ | `zod@3.22.0` | 0.95 | 0.92 | 1.00 | 0.88 | 0.91 | ✅ OK |
350
+ | `event-stream@3.3.6` | 0.10 | 0.05 | 0.85 | 0.40 | 0.20 | 🔴 P0 BLOCK |
351
+
265
352
  ## Audit Results
266
353
  | Check | Result |
267
354
  |-------|--------|
268
355
  | npm audit | ✅ No high/critical |
356
+ | socket.dev depscore | ✅ All deps pass / 🔴 1 P0 blocker / ⚠️ Degraded |
269
357
  | License check | ⚠️ 1 GPL package found |
270
358
  | Unused deps | ✅ All used |
271
359
  | Outdated (major) | ⚠️ 3 packages behind |
@@ -274,7 +362,7 @@ dependency-review:
274
362
 
275
363
  | # | Severity | Package | Finding | Action |
276
364
  |---|----------|---------|---------|--------|
277
- | 1 | 🔴 P0 | `event-stream@3.3.6` | Known supply chain attack | Remove immediately |
365
+ | 1 | 🔴 P0 | `event-stream@3.3.6` | socket.dev: supply_chain=0.10 (known attack) | Remove immediately |
278
366
  | 2 | 🟠 P1 | `moment@2.29.1` | 290KB, abandoned | Replace with dayjs |
279
367
  | 3 | 🟠 P1 | `some-lib@0.1.0` | GPL-3.0 license | Replace or get legal approval |
280
368
  | 4 | 🟡 P2 | `lodash@4.17.21` | Only using `debounce` | Replace with `lodash.debounce` or native |
@@ -293,8 +381,97 @@ dependency-review:
293
381
 
294
382
  ---
295
383
 
384
+ ## 9. Socket.dev Integration <a id="9-socket-dev"></a>
385
+
386
+ ### Tool: `depscore`
387
+
388
+ `@socketsecurity/mcp` exposes **a single** tool — `depscore` — which returns five metrics per package:
389
+
390
+ | Metric | Meaning |
391
+ |--------|---------|
392
+ | `supply_chain` | Supply-chain attack risk (typosquatting, malware, maintainer changes, scripts) |
393
+ | `vulnerability` | Known CVEs and vulnerabilities |
394
+ | `quality` | Code quality, tests, documentation |
395
+ | `maintenance` | Maintainer activity, release frequency |
396
+ | `license` | License compliance (low = copyleft / unlicensed) |
397
+
398
+ All metrics are in the range `0.0–1.0`, where `1.0` is perfect.
399
+
400
+ ### Tool call
401
+
402
+ ```javascript
403
+ depscore({
404
+ packages: [
405
+ { ecosystem: "npm", depname: "lodash", version: "4.17.21" },
406
+ { ecosystem: "npm", depname: "zod", version: "3.22.0" }
407
+ ]
408
+ })
409
+ ```
410
+
411
+ Returns lines in the format:
412
+ ```
413
+ pkg:npm/lodash@4.17.21: supply_chain: 0.95, quality: 0.88, maintenance: 0.91, vulnerability: 0.92, license: 1.0
414
+ pkg:npm/zod@3.22.0: supply_chain: 0.97, quality: 0.95, maintenance: 0.93, vulnerability: 0.95, license: 1.0
415
+ ```
416
+
417
+ ### Threshold matrix (action policy)
418
+
419
+ | Metric | Range | Severity | Action |
420
+ |--------|-------|----------|--------|
421
+ | `supply_chain` | < 0.50 | 🔴 **P0** | **BLOCK** — escalate to user with metrics |
422
+ | `supply_chain` | 0.50 – 0.74 | 🟠 P1 | WARN — require justification |
423
+ | `supply_chain` | ≥ 0.75 | ✅ | OK |
424
+ | `vulnerability` | < 0.50 | 🔴 **P0** | **BLOCK** |
425
+ | `vulnerability` | 0.50 – 0.79 | 🟠 P1 | WARN |
426
+ | `vulnerability` | ≥ 0.80 | ✅ | OK |
427
+ | `license` | < 0.50 | 🔴 **P0** | **BLOCK** — likely copyleft/unlicensed |
428
+ | `license` | ≥ 0.50 | ✅ | OK |
429
+ | `quality` | < 0.50 | 🟡 P2 | INFO |
430
+ | `maintenance` | < 0.50 | 🟡 P2 | INFO (abandoned) |
431
+
432
+ ### Workflow (agent pseudocode)
433
+
434
+ ```
435
+ for each new or updated package (from package.json diff):
436
+ result = depscore({ packages: [{ ecosystem: "npm", depname, version }] })
437
+ metrics = parse(result)
438
+
439
+ if metrics.supply_chain < 0.50
440
+ OR metrics.vulnerability < 0.50
441
+ OR metrics.license < 0.50:
442
+ → 🔴 P0 BLOCK
443
+ → escalate to user: "Package X has critical socket.dev alert: <metric>=<value>. Installation blocked. Confirm explicitly to proceed."
444
+ → wait for confirmation
445
+
446
+ elif any metric in P1 range:
447
+ → 🟠 P1 WARN
448
+ → add to Findings with "requires justification" note
449
+
450
+ else:
451
+ → ✅ OK
452
+ → proceed
453
+
454
+ record all results in Output Template → Socket.dev Audit table
455
+ ```
456
+
457
+ ### When to call `depscore`
458
+
459
+ | Trigger | Caller |
460
+ |---------|--------|
461
+ | DEV: before `npm install <pkg>` | Senior Full Stack |
462
+ | DEV: before `npm update` or major version bump | Senior Full Stack |
463
+ | REV: when reviewing PR with `package.json` / `package-lock.json` changes | Reviewer |
464
+ | RG: pre-release full audit of all production deps | Reviewer (on Conductor request) |
465
+
466
+ ### Batch optimization
467
+
468
+ For large diffs (>10 packages) — batch calls into chunks of 10–20 packages per `depscore({ packages: [...] })`. Socket.dev accepts arrays; no need to call one-by-one.
469
+
470
+ ---
471
+
296
472
  ## See also
297
473
  - `$security-review` — application security review
298
474
  - `$security-baseline-dev` — secure coding patterns
299
475
  - `$cloud-infrastructure-security` — CI/CD pipeline security
300
- - `$tooling-bun-biome` — package manager setup
476
+ - `$tooling-bun-biome` — package manager setup
477
+ - [socket.dev MCP server](https://github.com/SocketDev/socket-mcp) — official repo
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dependency-supply-chain-review",
3
3
  "display_name": "Dependency & Supply Chain Review",
4
- "description": "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.",
4
+ "description": "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.",
5
5
  "default_prompt": "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill.",
6
6
  "triggers": [
7
7
  "dependency-supply-chain-review",
8
8
  "dependency supply chain review",
9
9
  "Dependency & Supply Chain Review",
10
- "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages"
10
+ "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation"
11
11
  ],
12
12
  "capabilities": [
13
13
  "dependency",
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dependency-supply-chain-review",
3
3
  "display_name": "Dependency & Supply Chain Review",
4
- "description": "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.",
4
+ "description": "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.",
5
5
  "default_prompt": "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill.",
6
6
  "triggers": [
7
7
  "dependency-supply-chain-review",
8
8
  "dependency supply chain review",
9
9
  "Dependency & Supply Chain Review",
10
- "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages"
10
+ "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation"
11
11
  ],
12
12
  "capabilities": [
13
13
  "dependency",
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dependency-supply-chain-review",
3
3
  "display_name": "Dependency & Supply Chain Review",
4
- "description": "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.",
4
+ "description": "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.",
5
5
  "default_prompt": "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill.",
6
6
  "triggers": [
7
7
  "dependency-supply-chain-review",
8
8
  "dependency supply chain review",
9
9
  "Dependency & Supply Chain Review",
10
- "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages"
10
+ "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation"
11
11
  ],
12
12
  "capabilities": [
13
13
  "dependency",
@@ -1,6 +1,6 @@
1
1
  interface:
2
2
  display_name: "Dependency & Supply Chain Review"
3
- short_description: "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe…"
3
+ short_description: "Dependency review with socket.dev MCP (depscore) supply chain, vuln, licenses. P0 blocks."
4
4
  default_prompt: "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill."
5
5
  dependencies:
6
6
  tools: []
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dependency-supply-chain-review",
3
3
  "display_name": "Dependency & Supply Chain Review",
4
- "description": "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.",
4
+ "description": "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.",
5
5
  "default_prompt": "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill.",
6
6
  "triggers": [
7
7
  "dependency-supply-chain-review",
8
8
  "dependency supply chain review",
9
9
  "Dependency & Supply Chain Review",
10
- "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages"
10
+ "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation"
11
11
  ],
12
12
  "capabilities": [
13
13
  "dependency",
@@ -1,13 +1,13 @@
1
1
  version: 1
2
2
  name: "dependency-supply-chain-review"
3
3
  display_name: "Dependency & Supply Chain Review"
4
- description: "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages."
4
+ description: "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation."
5
5
  default_prompt: "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill."
6
6
  triggers:
7
7
  - "dependency-supply-chain-review"
8
8
  - "dependency supply chain review"
9
9
  - "Dependency & Supply Chain Review"
10
- - "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages"
10
+ - "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation"
11
11
  capabilities:
12
12
  - "dependency"
13
13
  - "supply"
@@ -21,6 +21,7 @@ Reviewer is the “quality gate” before Tester and Release Gate.
21
21
  - API Contracts + Data Model + Threat Model baseline (if available)
22
22
  - Deployment/CI Plan + Observability Plan (if relevant)
23
23
  - PR diff / file list / branch link / CI results
24
+ - **socket-mcp tool availability** — mandatory check before reviewing `package.json` / `package-lock.json` changes. If unavailable → degraded mode (see [`$dependency-supply-chain-review`](.agents/skills/dependency-supply-chain-review/) → section 0 Prerequisites).
24
25
 
25
26
  ---
26
27
 
@@ -30,6 +31,7 @@ Reviewer is the “quality gate” before Tester and Release Gate.
30
31
  - Before starting a review, it is **required** to read the “Important vs Not Important” section of the Architecture Doc - do not block what the architect deliberately put out of scope.
31
32
  - Git hygiene checks (commit structure, branch/commit naming, diff cosmetics) are classified as 🟡 P2 if there is no direct impact on security/data/architecture.
32
33
  - Classify git hygiene checks (commit structure, branch/commit naming, cosmetic diff issues) as ?? P2 if they do not directly affect security, data, or architecture.
34
+ - **Supply chain via socket.dev is mandatory** for any change to `package.json` / `package-lock.json`. Run `$dependency-supply-chain-review` → `depscore` for all new/updated packages. P0 alerts (`supply_chain<0.5` / `vulnerability<0.5` / `license<0.5`) = 🔴 NO-GO until explicit user confirmation or package removal. In **degraded mode** (socket-mcp unavailable) — review is allowed, but the `Degraded` status must be recorded in the Handoff Envelope.
33
35
 
34
36
  ---
35
37
 
@@ -244,10 +246,11 @@ OPEN ITEMS: [list P1/P2 for tracking]
244
246
  ## HANDOFF (Mandatory)
245
247
  MERGE STATUS: GO ✅ / NO-GO ❌
246
248
  CONTAINER RELOAD VERIFIED: ✅ / ❌
249
+ SOCKET.DEV MODE: Active ✅ / Degraded ⚠️ / N/A (no package.json changes)
247
250
  ```
248
251
 
249
252
  ## HANDOFF (Mandatory)
250
253
  - Every REV output must end with a completed `Handoff Envelope`.
251
- - Required fields: `HANDOFF TO`, `ARTIFACTS PRODUCED`, `REQUIRED INPUTS FULFILLED`, `OPEN ITEMS`, `BLOCKERS FOR NEXT PHASE`, `MERGE STATUS`, `CONTAINER RELOAD VERIFIED`.
254
+ - Required fields: `HANDOFF TO`, `ARTIFACTS PRODUCED`, `REQUIRED INPUTS FULFILLED`, `OPEN ITEMS`, `BLOCKERS FOR NEXT PHASE`, `MERGE STATUS`, `CONTAINER RELOAD VERIFIED`, `SOCKET.DEV MODE`.
252
255
  - If `OPEN ITEMS` is not empty, include owner and due date per item.
253
256
  - Missing HANDOFF block means REV phase is `BLOCKED` and cannot move to QA/RG.
@@ -49,6 +49,7 @@ If it is explicitly stated that the project is a Wix iFrame app:
49
49
  7. **JSDoc is required** on all public functions/methods
50
50
  8. **Feedback loop** - after each slice a DEMO instruction is required
51
51
  9. **Batch tasks** - tasks are performed in batches (10–15), forming a tested vertical slice
52
+ 10. **Socket.dev pre-install gate** — before every `npm install <pkg>` / `npm update` / major version bump, mandatory call to `depscore` via socket-mcp. P0 alerts (`supply_chain<0.5` / `vulnerability<0.5` / `license<0.5`) → **hard block**: stop, escalate to user, wait for explicit confirmation. In **degraded mode** (socket-mcp unavailable) — follow the degraded protocol from [`$dependency-supply-chain-review`](.agents/skills/dependency-supply-chain-review/) → section 0.
52
53
 
53
54
  ---
54
55
 
@@ -129,6 +130,12 @@ According to Threat Model from the architect:
129
130
  - Uniform safe error format (no stack trace)
130
131
  - No secrets/PII in code and logs
131
132
  - Dependency hygiene
133
+ - **Socket.dev pre-install check** — before every `npm install <pkg>`:
134
+ 1. Call `depscore({ packages: [{ ecosystem: "npm", depname, version }] })` via socket-mcp
135
+ 2. If `supply_chain < 0.5` OR `vulnerability < 0.5` OR `license < 0.5` → **STOP**, escalate to user with metrics, wait for explicit confirmation
136
+ 3. If all metrics are OK → proceed with installation
137
+ 4. If socket-mcp is unavailable → degraded protocol (see `$dependency-supply-chain-review` section 0)
138
+ 5. Record metrics in DEV report for the next gate
132
139
 
133
140
  ### 6) Demo Gate
134
141
  After each `DEV-xx` provide `DEMO-xx`:
@@ -154,6 +161,7 @@ The report for the conductor contains:
154
161
  - Secrets are not in the code/logs
155
162
  - There is a DEMO instruction
156
163
  - Basic security: login validation, authorization, dependency hygiene
164
+ - **Socket.dev depscore performed for all new/updated deps; no P0 alerts (or explicit user confirmation recorded)**
157
165
  - Production-ready: no mock functions in production scripts
158
166
  - Anti-pattern self-check: PASS
159
167
 
@@ -275,6 +283,7 @@ BLOCKERS FOR REVIEW: no / [list if available]
275
283
  ANTI-PATTERN CHECK: PASS ✅ / FAIL ❌
276
284
  JSDOC COVERAGE: X/Y
277
285
  CI STATUS: GREEN ✅ / RED ❌
286
+ SOCKET.DEV PRE-INSTALL: Active ✅ (N packages scanned, 0 P0) / Degraded ⚠️ / N/A (no new deps)
278
287
  ```
279
288
 
280
289
 
@@ -284,5 +293,5 @@ CI STATUS: GREEN ✅ / RED ❌
284
293
 
285
294
  ## HANDOFF (Mandatory)
286
295
  - Every DEV output must end with a completed `Handoff Envelope`.
287
- - Required fields: `HANDOFF TO`, `ARTIFACTS PRODUCED`, `REQUIRED INPUTS FULFILLED`, `OPEN ITEMS`, `BLOCKERS FOR REVIEW`, `ANTI-PATTERN CHECK`, `JSDOC COVERAGE`, `CI STATUS`.
296
+ - Required fields: `HANDOFF TO`, `ARTIFACTS PRODUCED`, `REQUIRED INPUTS FULFILLED`, `OPEN ITEMS`, `BLOCKERS FOR REVIEW`, `ANTI-PATTERN CHECK`, `JSDOC COVERAGE`, `CI STATUS`, `SOCKET.DEV PRE-INSTALL`.
288
297
  - If `OPEN ITEMS` is not empty, include owner and due date per item.
@@ -1,13 +1,18 @@
1
1
  ---
2
2
  name: dependency-supply-chain-review
3
- description: Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.
3
+ description: Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.
4
+ last_verified: 2026-04-08
5
+ version: 2.0
6
+ mcp_server: socket-mcp
4
7
  ---
5
8
 
6
9
  # Skill: Dependency & Supply Chain Review
7
10
 
8
- Audit of npm dependencies: vulnerabilities, licenses, suspicious packages.
11
+ Audit of npm dependencies: supply chain, vulnerabilities, licenses, suspicious packages.
12
+ **Since v2.0** — mandatory integration with **socket.dev MCP** (`depscore`) for every new or updated package. P0 alerts block installation until explicit user confirmation.
9
13
 
10
14
  **Sections:**
15
+ 0. [Prerequisites — Socket.dev MCP](#0-prerequisites)
11
16
  1. [When to activate](#1-when-to-activate)
12
17
  2. [Audit Commands](#2-audit-commands)
13
18
  3. [Checklist](#3-checklist)
@@ -16,6 +21,70 @@ Audit of npm dependencies: vulnerabilities, licenses, suspicious packages.
16
21
  6. [Decision Framework](#6-decision-framework)
17
22
  7. [CI Integration](#7-ci-integration)
18
23
  8. [Output Template](#8-output-template)
24
+ 9. [Socket.dev Integration](#9-socket-dev)
25
+
26
+ ---
27
+
28
+ ## 0. Prerequisites — Socket.dev MCP <a id="0-prerequisites"></a>
29
+
30
+ > [!IMPORTANT]
31
+ > **Socket.dev MCP is mandatory since v2.0.** Without it, this skill operates in **degraded mode** with a notice in the report.
32
+
33
+ ### Why
34
+
35
+ [socket.dev](https://socket.dev) provides automated supply-chain analytics for packages: detection of malware, typosquatting, suspicious maintainer changes, native binding risks. Without it, the review relies only on `npm audit`, which catches only known CVEs.
36
+
37
+ ### Installation (recommended — HTTP, no API key required)
38
+
39
+ Add the snippet to the `mcpServers` config of your AI client (Claude Code / Codex / Qwen / Copilot / Antigravity):
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "socket-mcp": {
45
+ "type": "http",
46
+ "url": "https://mcp.socket.dev/"
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Alternative — stdio with API key (for teams with paid socket.dev account)
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "socket-mcp": {
58
+ "command": "npx",
59
+ "args": ["-y", "@socketsecurity/mcp@latest"],
60
+ "env": {
61
+ "SOCKET_API_KEY": "your-api-key-here"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ API key is available at https://socket.dev/.
69
+
70
+ ### Detection protocol (agent runs this before review)
71
+
72
+ 1. Try calling `depscore` on a known package (e.g., `lodash@4.17.21`).
73
+ 2. If the tool is available and returns a valid response → **Active mode**, proceed.
74
+ 3. If the tool is unavailable → **degraded mode**, follow the steps below.
75
+
76
+ ### Degraded mode protocol
77
+
78
+ If `socket-mcp` is not connected:
79
+
80
+ 1. **Log a warning**: `[degraded] socket-mcp not detected — falling back to npm audit only`.
81
+ 2. **Offer installation**: show the user both JSON snippets (HTTP + stdio) and ask:
82
+ > "Socket.dev MCP is not connected. Want to install it now? (HTTP mode requires no API key). [y/n]"
83
+ 3. If **y** → instruct: "Add the snippet to the `mcpServers` config of your AI client and restart the session", then re-run detection after restart.
84
+ 4. If **n** or the tool is still unavailable after installation → continue review with `Mode: Degraded` in Output Template, fall back to `npm audit` + manual checks from section 4 (Red Flags).
85
+
86
+ > [!WARNING]
87
+ > In degraded mode, the review **does not block** merge on DEP-05a/05b/05c (socket-checks), but Reviewer must explicitly record the degraded status in the Handoff Envelope.
19
88
 
20
89
  ---
21
90
 
@@ -95,11 +164,18 @@ grep_search: Query="prebuild" SearchPath="package-lock.json"
95
164
  | # | Check | Severity | Status |
96
165
  |---|-------|----------|--------|
97
166
  | DEP-05 | `npm audit` — no high/critical vulnerabilities | 🔴 P0 | ☐ |
167
+ | DEP-05a | socket.dev `depscore.supply_chain ≥ 0.75` for all new/updated deps | 🔴 P0 | ☐ |
168
+ | DEP-05b | socket.dev `depscore.vulnerability ≥ 0.80` | 🔴 P0 | ☐ |
169
+ | DEP-05c | socket.dev `depscore.license ≥ 0.50` (no copyleft contamination) | 🔴 P0 | ☐ |
170
+ | DEP-05d | socket-mcp tool detected (not degraded mode) | 🟠 P1 | ☐ |
98
171
  | DEP-06 | `package-lock.json` committed and up to date | 🔴 P0 | ☐ |
99
172
  | DEP-07 | No `npm install` with `--force` or `--legacy-peer-deps` (unless justified) | 🟠 P1 | ☐ |
100
173
  | DEP-08 | No postinstall scripts from untrusted packages | 🔴 P0 | ☐ |
101
174
  | DEP-09 | Packages use well-known publishers (npm org verified) | 🟠 P1 | ☐ |
102
175
 
176
+ > [!NOTE]
177
+ > DEP-05a/05b/05c are checked automatically via socket.dev `depscore` (see section [9. Socket.dev Integration](#9-socket-dev)). In **degraded mode** these checks are marked `N/A — degraded` and do not block merge, but Reviewer must record this in the Output Template.
178
+
103
179
  ### 3.3 Maintenance
104
180
 
105
181
  | # | Check | Severity | Status |
@@ -262,10 +338,22 @@ dependency-review:
262
338
  **Reviewer:** Reviewer Agent
263
339
  **Total deps:** production: XX, dev: YY
264
340
 
341
+ ## Socket.dev Audit
342
+ - **Mode:** ✅ Active / ⚠️ **Degraded** (socket-mcp not available)
343
+ - Packages scanned: XX
344
+ - P0 blockers: Y
345
+ - P1 warnings: Z
346
+
347
+ | Package | supply_chain | vuln | license | quality | maint | Verdict |
348
+ |---------|--------------|------|---------|---------|-------|---------|
349
+ | `zod@3.22.0` | 0.95 | 0.92 | 1.00 | 0.88 | 0.91 | ✅ OK |
350
+ | `event-stream@3.3.6` | 0.10 | 0.05 | 0.85 | 0.40 | 0.20 | 🔴 P0 BLOCK |
351
+
265
352
  ## Audit Results
266
353
  | Check | Result |
267
354
  |-------|--------|
268
355
  | npm audit | ✅ No high/critical |
356
+ | socket.dev depscore | ✅ All deps pass / 🔴 1 P0 blocker / ⚠️ Degraded |
269
357
  | License check | ⚠️ 1 GPL package found |
270
358
  | Unused deps | ✅ All used |
271
359
  | Outdated (major) | ⚠️ 3 packages behind |
@@ -274,7 +362,7 @@ dependency-review:
274
362
 
275
363
  | # | Severity | Package | Finding | Action |
276
364
  |---|----------|---------|---------|--------|
277
- | 1 | 🔴 P0 | `event-stream@3.3.6` | Known supply chain attack | Remove immediately |
365
+ | 1 | 🔴 P0 | `event-stream@3.3.6` | socket.dev: supply_chain=0.10 (known attack) | Remove immediately |
278
366
  | 2 | 🟠 P1 | `moment@2.29.1` | 290KB, abandoned | Replace with dayjs |
279
367
  | 3 | 🟠 P1 | `some-lib@0.1.0` | GPL-3.0 license | Replace or get legal approval |
280
368
  | 4 | 🟡 P2 | `lodash@4.17.21` | Only using `debounce` | Replace with `lodash.debounce` or native |
@@ -293,8 +381,97 @@ dependency-review:
293
381
 
294
382
  ---
295
383
 
384
+ ## 9. Socket.dev Integration <a id="9-socket-dev"></a>
385
+
386
+ ### Tool: `depscore`
387
+
388
+ `@socketsecurity/mcp` exposes **a single** tool — `depscore` — which returns five metrics per package:
389
+
390
+ | Metric | Meaning |
391
+ |--------|---------|
392
+ | `supply_chain` | Supply-chain attack risk (typosquatting, malware, maintainer changes, scripts) |
393
+ | `vulnerability` | Known CVEs and vulnerabilities |
394
+ | `quality` | Code quality, tests, documentation |
395
+ | `maintenance` | Maintainer activity, release frequency |
396
+ | `license` | License compliance (low = copyleft / unlicensed) |
397
+
398
+ All metrics are in the range `0.0–1.0`, where `1.0` is perfect.
399
+
400
+ ### Tool call
401
+
402
+ ```javascript
403
+ depscore({
404
+ packages: [
405
+ { ecosystem: "npm", depname: "lodash", version: "4.17.21" },
406
+ { ecosystem: "npm", depname: "zod", version: "3.22.0" }
407
+ ]
408
+ })
409
+ ```
410
+
411
+ Returns lines in the format:
412
+ ```
413
+ pkg:npm/lodash@4.17.21: supply_chain: 0.95, quality: 0.88, maintenance: 0.91, vulnerability: 0.92, license: 1.0
414
+ pkg:npm/zod@3.22.0: supply_chain: 0.97, quality: 0.95, maintenance: 0.93, vulnerability: 0.95, license: 1.0
415
+ ```
416
+
417
+ ### Threshold matrix (action policy)
418
+
419
+ | Metric | Range | Severity | Action |
420
+ |--------|-------|----------|--------|
421
+ | `supply_chain` | < 0.50 | 🔴 **P0** | **BLOCK** — escalate to user with metrics |
422
+ | `supply_chain` | 0.50 – 0.74 | 🟠 P1 | WARN — require justification |
423
+ | `supply_chain` | ≥ 0.75 | ✅ | OK |
424
+ | `vulnerability` | < 0.50 | 🔴 **P0** | **BLOCK** |
425
+ | `vulnerability` | 0.50 – 0.79 | 🟠 P1 | WARN |
426
+ | `vulnerability` | ≥ 0.80 | ✅ | OK |
427
+ | `license` | < 0.50 | 🔴 **P0** | **BLOCK** — likely copyleft/unlicensed |
428
+ | `license` | ≥ 0.50 | ✅ | OK |
429
+ | `quality` | < 0.50 | 🟡 P2 | INFO |
430
+ | `maintenance` | < 0.50 | 🟡 P2 | INFO (abandoned) |
431
+
432
+ ### Workflow (agent pseudocode)
433
+
434
+ ```
435
+ for each new or updated package (from package.json diff):
436
+ result = depscore({ packages: [{ ecosystem: "npm", depname, version }] })
437
+ metrics = parse(result)
438
+
439
+ if metrics.supply_chain < 0.50
440
+ OR metrics.vulnerability < 0.50
441
+ OR metrics.license < 0.50:
442
+ → 🔴 P0 BLOCK
443
+ → escalate to user: "Package X has critical socket.dev alert: <metric>=<value>. Installation blocked. Confirm explicitly to proceed."
444
+ → wait for confirmation
445
+
446
+ elif any metric in P1 range:
447
+ → 🟠 P1 WARN
448
+ → add to Findings with "requires justification" note
449
+
450
+ else:
451
+ → ✅ OK
452
+ → proceed
453
+
454
+ record all results in Output Template → Socket.dev Audit table
455
+ ```
456
+
457
+ ### When to call `depscore`
458
+
459
+ | Trigger | Caller |
460
+ |---------|--------|
461
+ | DEV: before `npm install <pkg>` | Senior Full Stack |
462
+ | DEV: before `npm update` or major version bump | Senior Full Stack |
463
+ | REV: when reviewing PR with `package.json` / `package-lock.json` changes | Reviewer |
464
+ | RG: pre-release full audit of all production deps | Reviewer (on Conductor request) |
465
+
466
+ ### Batch optimization
467
+
468
+ For large diffs (>10 packages) — batch calls into chunks of 10–20 packages per `depscore({ packages: [...] })`. Socket.dev accepts arrays; no need to call one-by-one.
469
+
470
+ ---
471
+
296
472
  ## See also
297
473
  - `$security-review` — application security review
298
474
  - `$security-baseline-dev` — secure coding patterns
299
475
  - `$cloud-infrastructure-security` — CI/CD pipeline security
300
- - `$tooling-bun-biome` — package manager setup
476
+ - `$tooling-bun-biome` — package manager setup
477
+ - [socket.dev MCP server](https://github.com/SocketDev/socket-mcp) — official repo
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dependency-supply-chain-review",
3
3
  "display_name": "Dependency & Supply Chain Review",
4
- "description": "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages.",
4
+ "description": "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation.",
5
5
  "default_prompt": "Use $dependency-supply-chain-review when the task matches the \"Dependency & Supply Chain Review\" skill.",
6
6
  "triggers": [
7
7
  "dependency-supply-chain-review",
8
8
  "dependency supply chain review",
9
9
  "Dependency & Supply Chain Review",
10
- "Dependency review — minimization, updates, vulnerability audit, licenses, prohibition of unsafe packages"
10
+ "Dependency review with mandatory socket.dev MCP check (depscore) supply chain, vulnerability, licenses. P0 alerts block installation"
11
11
  ],
12
12
  "capabilities": [
13
13
  "dependency",