@m2-ai/lattice-cli 0.0.0-stage → 0.8.7

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 (743) hide show
  1. package/DISCLOSURE +1 -0
  2. package/README.md +118 -2
  3. package/bundles/expo-mobile/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
  4. package/bundles/expo-mobile/.agents/skills/lattice-release-manager/SKILL.md +29 -0
  5. package/bundles/expo-mobile/.agents/skills/lattice-verify/SKILL.md +27 -0
  6. package/bundles/expo-mobile/.claude/agents/lattice-feature-agent.md +10 -0
  7. package/bundles/expo-mobile/.claude/agents/lattice-release-manager.md +9 -0
  8. package/bundles/expo-mobile/.claude/hooks/README.md +9 -0
  9. package/bundles/expo-mobile/.claude/hooks/pre-commit-verify.mjs +10 -0
  10. package/bundles/expo-mobile/.claude/hooks/pre-tool-use.mjs +51 -0
  11. package/bundles/expo-mobile/.claude/rules/lattice-core.md +20 -0
  12. package/bundles/expo-mobile/.claude/settings.json +38 -0
  13. package/bundles/expo-mobile/.claude/skills/lattice-verify/SKILL.md +27 -0
  14. package/bundles/expo-mobile/.codex/agents/lattice-feature-agent.toml +9 -0
  15. package/bundles/expo-mobile/.codex/agents/lattice-release-manager.toml +9 -0
  16. package/bundles/expo-mobile/.cursor/mcp.json +34 -0
  17. package/bundles/expo-mobile/.cursor/rules/lattice-core.mdc +35 -0
  18. package/bundles/expo-mobile/.cursor/rules.md +94 -0
  19. package/bundles/expo-mobile/.env.example +19 -0
  20. package/bundles/expo-mobile/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  21. package/bundles/expo-mobile/.github/agents/lattice-feature-agent.agent.md +7 -0
  22. package/bundles/expo-mobile/.github/agents/lattice-release-manager.agent.md +7 -0
  23. package/bundles/expo-mobile/.github/copilot-instructions.md +37 -0
  24. package/bundles/expo-mobile/.github/instructions/lattice-core.instructions.md +11 -0
  25. package/bundles/expo-mobile/.github/workflows/ci.yml +26 -0
  26. package/bundles/expo-mobile/.gitmessage +24 -0
  27. package/bundles/expo-mobile/.lattice/config.json +9 -0
  28. package/bundles/expo-mobile/.lattice/dependency-security.json +91 -0
  29. package/bundles/expo-mobile/.lattice/prompts/01-feature.md +36 -0
  30. package/bundles/expo-mobile/.lattice/prompts/02-bugfix.md +32 -0
  31. package/bundles/expo-mobile/.lattice/prompts/03-refactor.md +30 -0
  32. package/bundles/expo-mobile/.lattice/prompts/04-test.md +31 -0
  33. package/bundles/expo-mobile/.lattice/prompts/05-polish.md +38 -0
  34. package/bundles/expo-mobile/.lattice/prompts/06-security.md +32 -0
  35. package/bundles/expo-mobile/.lattice/release-workflow.json +55 -0
  36. package/bundles/expo-mobile/.lattice/schemas/feature-handoff.schema.json +264 -0
  37. package/bundles/expo-mobile/.lattice/templates/feature-handoff.json +52 -0
  38. package/bundles/expo-mobile/.mcp.json +35 -0
  39. package/bundles/expo-mobile/AGENTS.md +58 -0
  40. package/bundles/expo-mobile/CLAUDE.md +75 -0
  41. package/bundles/expo-mobile/PROJECT_GUIDE.md +299 -0
  42. package/bundles/expo-mobile/README.md +39 -0
  43. package/bundles/expo-mobile/__tests__/home.test.tsx +22 -0
  44. package/bundles/expo-mobile/app/_layout.tsx +20 -0
  45. package/bundles/expo-mobile/app/index.tsx +72 -0
  46. package/bundles/expo-mobile/app.json +33 -0
  47. package/bundles/expo-mobile/components/ui/Button.tsx +75 -0
  48. package/bundles/expo-mobile/components/ui/Input.tsx +50 -0
  49. package/bundles/expo-mobile/components/ui/index.ts +2 -0
  50. package/bundles/expo-mobile/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
  51. package/bundles/expo-mobile/docs/rules/codex.md +62 -0
  52. package/bundles/expo-mobile/eslint.config.js +7 -0
  53. package/bundles/expo-mobile/lib/supabase/client.ts +22 -0
  54. package/bundles/expo-mobile/lib/supabase/realtime.ts +10 -0
  55. package/bundles/expo-mobile/lib/supabase/storage.ts +6 -0
  56. package/bundles/expo-mobile/package.json +65 -0
  57. package/bundles/expo-mobile/plugins/with-lattice-commons-io.cjs +42 -0
  58. package/bundles/expo-mobile/prompts/01-feature-implementation.md +48 -0
  59. package/bundles/expo-mobile/prompts/02-bug-fix.md +43 -0
  60. package/bundles/expo-mobile/prompts/03-safe-refactor.md +38 -0
  61. package/bundles/expo-mobile/prompts/04-test-first.md +41 -0
  62. package/bundles/expo-mobile/prompts/05-ui-polish.md +44 -0
  63. package/bundles/expo-mobile/prompts/06-security-review.md +39 -0
  64. package/bundles/expo-mobile/prompts/quality.md +143 -0
  65. package/bundles/expo-mobile/supabase/migrations/001_initial_schema.sql +66 -0
  66. package/bundles/expo-mobile/tsconfig.json +21 -0
  67. package/bundles/expo-mobile/types/database.types.ts +76 -0
  68. package/bundles/expo-mobile/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
  69. package/bundles/expo-supabase/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
  70. package/bundles/expo-supabase/.agents/skills/lattice-release-manager/SKILL.md +29 -0
  71. package/bundles/expo-supabase/.agents/skills/lattice-verify/SKILL.md +27 -0
  72. package/bundles/expo-supabase/.claude/agents/lattice-feature-agent.md +10 -0
  73. package/bundles/expo-supabase/.claude/agents/lattice-release-manager.md +9 -0
  74. package/bundles/expo-supabase/.claude/hooks/README.md +9 -0
  75. package/bundles/expo-supabase/.claude/hooks/pre-commit-verify.mjs +10 -0
  76. package/bundles/expo-supabase/.claude/hooks/pre-tool-use.mjs +51 -0
  77. package/bundles/expo-supabase/.claude/rules/lattice-core.md +20 -0
  78. package/bundles/expo-supabase/.claude/settings.json +38 -0
  79. package/bundles/expo-supabase/.claude/skills/lattice-verify/SKILL.md +27 -0
  80. package/bundles/expo-supabase/.codex/agents/lattice-feature-agent.toml +9 -0
  81. package/bundles/expo-supabase/.codex/agents/lattice-release-manager.toml +9 -0
  82. package/bundles/expo-supabase/.cursor/mcp.json +34 -0
  83. package/bundles/expo-supabase/.cursor/rules/lattice-core.mdc +35 -0
  84. package/bundles/expo-supabase/.cursor/rules.md +94 -0
  85. package/bundles/expo-supabase/.env.example +12 -0
  86. package/bundles/expo-supabase/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  87. package/bundles/expo-supabase/.github/agents/lattice-feature-agent.agent.md +7 -0
  88. package/bundles/expo-supabase/.github/agents/lattice-release-manager.agent.md +7 -0
  89. package/bundles/expo-supabase/.github/copilot-instructions.md +37 -0
  90. package/bundles/expo-supabase/.github/instructions/lattice-core.instructions.md +11 -0
  91. package/bundles/expo-supabase/.github/workflows/ci.yml +26 -0
  92. package/bundles/expo-supabase/.gitmessage +24 -0
  93. package/bundles/expo-supabase/.lattice/config.json +9 -0
  94. package/bundles/expo-supabase/.lattice/dependency-security.json +91 -0
  95. package/bundles/expo-supabase/.lattice/prompts/01-feature.md +36 -0
  96. package/bundles/expo-supabase/.lattice/prompts/02-bugfix.md +32 -0
  97. package/bundles/expo-supabase/.lattice/prompts/03-refactor.md +30 -0
  98. package/bundles/expo-supabase/.lattice/prompts/04-test.md +31 -0
  99. package/bundles/expo-supabase/.lattice/prompts/05-polish.md +38 -0
  100. package/bundles/expo-supabase/.lattice/prompts/06-security.md +32 -0
  101. package/bundles/expo-supabase/.lattice/release-workflow.json +55 -0
  102. package/bundles/expo-supabase/.lattice/schemas/feature-handoff.schema.json +264 -0
  103. package/bundles/expo-supabase/.lattice/templates/feature-handoff.json +52 -0
  104. package/bundles/expo-supabase/.mcp.json +35 -0
  105. package/bundles/expo-supabase/AGENTS.md +58 -0
  106. package/bundles/expo-supabase/CLAUDE.md +75 -0
  107. package/bundles/expo-supabase/PROJECT_GUIDE.md +201 -0
  108. package/bundles/expo-supabase/README.md +38 -0
  109. package/bundles/expo-supabase/__tests__/home.test.tsx +22 -0
  110. package/bundles/expo-supabase/app/_layout.tsx +14 -0
  111. package/bundles/expo-supabase/app/index.tsx +72 -0
  112. package/bundles/expo-supabase/app.json +33 -0
  113. package/bundles/expo-supabase/components/ui/Button.tsx +75 -0
  114. package/bundles/expo-supabase/components/ui/Input.tsx +50 -0
  115. package/bundles/expo-supabase/components/ui/index.ts +2 -0
  116. package/bundles/expo-supabase/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
  117. package/bundles/expo-supabase/docs/rules/codex.md +62 -0
  118. package/bundles/expo-supabase/eslint.config.js +7 -0
  119. package/bundles/expo-supabase/lib/supabase/client.ts +22 -0
  120. package/bundles/expo-supabase/lib/supabase/realtime.ts +10 -0
  121. package/bundles/expo-supabase/lib/supabase/storage.ts +6 -0
  122. package/bundles/expo-supabase/package.json +60 -0
  123. package/bundles/expo-supabase/plugins/with-lattice-commons-io.cjs +42 -0
  124. package/bundles/expo-supabase/prompts/01-feature-implementation.md +8 -0
  125. package/bundles/expo-supabase/prompts/02-bug-fix.md +9 -0
  126. package/bundles/expo-supabase/prompts/03-safe-refactor.md +8 -0
  127. package/bundles/expo-supabase/prompts/04-test-first.md +7 -0
  128. package/bundles/expo-supabase/prompts/05-ui-polish.md +7 -0
  129. package/bundles/expo-supabase/prompts/06-security-review.md +7 -0
  130. package/bundles/expo-supabase/prompts/quality.md +143 -0
  131. package/bundles/expo-supabase/supabase/migrations/001_initial_schema.sql +66 -0
  132. package/bundles/expo-supabase/tsconfig.json +21 -0
  133. package/bundles/expo-supabase/types/database.types.ts +76 -0
  134. package/bundles/expo-supabase/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
  135. package/bundles/nextjs-landing/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
  136. package/bundles/nextjs-landing/.agents/skills/lattice-release-manager/SKILL.md +29 -0
  137. package/bundles/nextjs-landing/.agents/skills/lattice-verify/SKILL.md +27 -0
  138. package/bundles/nextjs-landing/.claude/agents/lattice-feature-agent.md +10 -0
  139. package/bundles/nextjs-landing/.claude/agents/lattice-release-manager.md +9 -0
  140. package/bundles/nextjs-landing/.claude/hooks/README.md +9 -0
  141. package/bundles/nextjs-landing/.claude/hooks/pre-commit-verify.mjs +10 -0
  142. package/bundles/nextjs-landing/.claude/hooks/pre-tool-use.mjs +51 -0
  143. package/bundles/nextjs-landing/.claude/rules/lattice-core.md +20 -0
  144. package/bundles/nextjs-landing/.claude/settings.json +38 -0
  145. package/bundles/nextjs-landing/.claude/skills/lattice-verify/SKILL.md +27 -0
  146. package/bundles/nextjs-landing/.codex/agents/lattice-feature-agent.toml +9 -0
  147. package/bundles/nextjs-landing/.codex/agents/lattice-release-manager.toml +9 -0
  148. package/bundles/nextjs-landing/.cursor/mcp.json +34 -0
  149. package/bundles/nextjs-landing/.cursor/rules/lattice-core.mdc +35 -0
  150. package/bundles/nextjs-landing/.cursor/rules.md +95 -0
  151. package/bundles/nextjs-landing/.env.example +24 -0
  152. package/bundles/nextjs-landing/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  153. package/bundles/nextjs-landing/.github/agents/lattice-feature-agent.agent.md +7 -0
  154. package/bundles/nextjs-landing/.github/agents/lattice-release-manager.agent.md +7 -0
  155. package/bundles/nextjs-landing/.github/copilot-instructions.md +37 -0
  156. package/bundles/nextjs-landing/.github/instructions/lattice-core.instructions.md +11 -0
  157. package/bundles/nextjs-landing/.github/workflows/ci.yml +26 -0
  158. package/bundles/nextjs-landing/.gitmessage +24 -0
  159. package/bundles/nextjs-landing/.lattice/config.json +9 -0
  160. package/bundles/nextjs-landing/.lattice/dependency-security.json +46 -0
  161. package/bundles/nextjs-landing/.lattice/prompts/01-feature.md +36 -0
  162. package/bundles/nextjs-landing/.lattice/prompts/02-bugfix.md +32 -0
  163. package/bundles/nextjs-landing/.lattice/prompts/03-refactor.md +30 -0
  164. package/bundles/nextjs-landing/.lattice/prompts/04-test.md +31 -0
  165. package/bundles/nextjs-landing/.lattice/prompts/05-polish.md +38 -0
  166. package/bundles/nextjs-landing/.lattice/prompts/06-security.md +32 -0
  167. package/bundles/nextjs-landing/.lattice/release-workflow.json +55 -0
  168. package/bundles/nextjs-landing/.lattice/schemas/feature-handoff.schema.json +264 -0
  169. package/bundles/nextjs-landing/.lattice/templates/feature-handoff.json +52 -0
  170. package/bundles/nextjs-landing/.mcp.json +35 -0
  171. package/bundles/nextjs-landing/AGENTS.md +58 -0
  172. package/bundles/nextjs-landing/CLAUDE.md +76 -0
  173. package/bundles/nextjs-landing/PROJECT_GUIDE.md +216 -0
  174. package/bundles/nextjs-landing/README.md +39 -0
  175. package/bundles/nextjs-landing/app/api/example/[id]/route.ts +34 -0
  176. package/bundles/nextjs-landing/app/api/example/route.ts +24 -0
  177. package/bundles/nextjs-landing/app/api/health/route.ts +8 -0
  178. package/bundles/nextjs-landing/app/global-error.tsx +17 -0
  179. package/bundles/nextjs-landing/app/globals.css +55 -0
  180. package/bundles/nextjs-landing/app/layout.tsx +22 -0
  181. package/bundles/nextjs-landing/app/page.tsx +42 -0
  182. package/bundles/nextjs-landing/components/ui/button.tsx +39 -0
  183. package/bundles/nextjs-landing/components/ui/card.tsx +53 -0
  184. package/bundles/nextjs-landing/components/ui/index.ts +4 -0
  185. package/bundles/nextjs-landing/components/ui/input.tsx +23 -0
  186. package/bundles/nextjs-landing/components/ui/spinner.tsx +22 -0
  187. package/bundles/nextjs-landing/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
  188. package/bundles/nextjs-landing/docs/rules/codex.md +62 -0
  189. package/bundles/nextjs-landing/eslint.config.mjs +16 -0
  190. package/bundles/nextjs-landing/instrumentation-client.ts +30 -0
  191. package/bundles/nextjs-landing/instrumentation.ts +12 -0
  192. package/bundles/nextjs-landing/jest.config.mjs +16 -0
  193. package/bundles/nextjs-landing/jest.setup.js +1 -0
  194. package/bundles/nextjs-landing/lib/utils.ts +6 -0
  195. package/bundles/nextjs-landing/next-env.d.ts +5 -0
  196. package/bundles/nextjs-landing/next.config.ts +15 -0
  197. package/bundles/nextjs-landing/package.json +48 -0
  198. package/bundles/nextjs-landing/postcss.config.mjs +7 -0
  199. package/bundles/nextjs-landing/prompts/01-feature-implementation.md +9 -0
  200. package/bundles/nextjs-landing/prompts/02-bug-fix.md +10 -0
  201. package/bundles/nextjs-landing/prompts/03-safe-refactor.md +8 -0
  202. package/bundles/nextjs-landing/prompts/04-test-first.md +8 -0
  203. package/bundles/nextjs-landing/prompts/05-ui-polish.md +8 -0
  204. package/bundles/nextjs-landing/prompts/06-security-review.md +7 -0
  205. package/bundles/nextjs-landing/prompts/quality.md +269 -0
  206. package/bundles/nextjs-landing/sentry.edge.config.ts +15 -0
  207. package/bundles/nextjs-landing/sentry.server.config.ts +15 -0
  208. package/bundles/nextjs-landing/tsconfig.json +42 -0
  209. package/bundles/nextjs-landing/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
  210. package/bundles/nextjs-saas/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
  211. package/bundles/nextjs-saas/.agents/skills/lattice-release-manager/SKILL.md +29 -0
  212. package/bundles/nextjs-saas/.agents/skills/lattice-verify/SKILL.md +27 -0
  213. package/bundles/nextjs-saas/.claude/agents/lattice-feature-agent.md +10 -0
  214. package/bundles/nextjs-saas/.claude/agents/lattice-release-manager.md +9 -0
  215. package/bundles/nextjs-saas/.claude/hooks/README.md +9 -0
  216. package/bundles/nextjs-saas/.claude/hooks/pre-commit-verify.mjs +10 -0
  217. package/bundles/nextjs-saas/.claude/hooks/pre-tool-use.mjs +51 -0
  218. package/bundles/nextjs-saas/.claude/rules/lattice-core.md +20 -0
  219. package/bundles/nextjs-saas/.claude/settings.json +38 -0
  220. package/bundles/nextjs-saas/.claude/skills/lattice-verify/SKILL.md +27 -0
  221. package/bundles/nextjs-saas/.codex/agents/lattice-feature-agent.toml +9 -0
  222. package/bundles/nextjs-saas/.codex/agents/lattice-release-manager.toml +9 -0
  223. package/bundles/nextjs-saas/.cursor/mcp.json +34 -0
  224. package/bundles/nextjs-saas/.cursor/rules/lattice-core.mdc +35 -0
  225. package/bundles/nextjs-saas/.cursor/rules.md +95 -0
  226. package/bundles/nextjs-saas/.env.example +48 -0
  227. package/bundles/nextjs-saas/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  228. package/bundles/nextjs-saas/.github/agents/lattice-feature-agent.agent.md +7 -0
  229. package/bundles/nextjs-saas/.github/agents/lattice-release-manager.agent.md +7 -0
  230. package/bundles/nextjs-saas/.github/copilot-instructions.md +37 -0
  231. package/bundles/nextjs-saas/.github/instructions/lattice-core.instructions.md +11 -0
  232. package/bundles/nextjs-saas/.github/workflows/ci.yml +26 -0
  233. package/bundles/nextjs-saas/.gitmessage +24 -0
  234. package/bundles/nextjs-saas/.lattice/config.json +9 -0
  235. package/bundles/nextjs-saas/.lattice/dependency-security.json +46 -0
  236. package/bundles/nextjs-saas/.lattice/prompts/01-feature.md +36 -0
  237. package/bundles/nextjs-saas/.lattice/prompts/02-bugfix.md +32 -0
  238. package/bundles/nextjs-saas/.lattice/prompts/03-refactor.md +30 -0
  239. package/bundles/nextjs-saas/.lattice/prompts/04-test.md +31 -0
  240. package/bundles/nextjs-saas/.lattice/prompts/05-polish.md +38 -0
  241. package/bundles/nextjs-saas/.lattice/prompts/06-security.md +32 -0
  242. package/bundles/nextjs-saas/.lattice/prompts/quality.md +269 -0
  243. package/bundles/nextjs-saas/.lattice/release-workflow.json +55 -0
  244. package/bundles/nextjs-saas/.lattice/schemas/feature-handoff.schema.json +264 -0
  245. package/bundles/nextjs-saas/.lattice/templates/feature-handoff.json +52 -0
  246. package/bundles/nextjs-saas/.mcp.json +35 -0
  247. package/bundles/nextjs-saas/AGENTS.md +58 -0
  248. package/bundles/nextjs-saas/CLAUDE.md +76 -0
  249. package/bundles/nextjs-saas/PROJECT_GUIDE.md +279 -0
  250. package/bundles/nextjs-saas/README.md +42 -0
  251. package/bundles/nextjs-saas/app/(auth)/forgot-password/page.tsx +101 -0
  252. package/bundles/nextjs-saas/app/(auth)/layout.tsx +7 -0
  253. package/bundles/nextjs-saas/app/(auth)/login/page.tsx +108 -0
  254. package/bundles/nextjs-saas/app/(auth)/reset-password/page.tsx +135 -0
  255. package/bundles/nextjs-saas/app/(auth)/signup/page.tsx +144 -0
  256. package/bundles/nextjs-saas/app/(dashboard)/dashboard/page.tsx +80 -0
  257. package/bundles/nextjs-saas/app/(dashboard)/layout.tsx +49 -0
  258. package/bundles/nextjs-saas/app/api/billing/checkout/route.ts +47 -0
  259. package/bundles/nextjs-saas/app/api/billing/portal/route.ts +29 -0
  260. package/bundles/nextjs-saas/app/api/example/[id]/route.ts +93 -0
  261. package/bundles/nextjs-saas/app/api/example/route.ts +61 -0
  262. package/bundles/nextjs-saas/app/api/health/route.ts +8 -0
  263. package/bundles/nextjs-saas/app/api/stripe/webhook/route.ts +57 -0
  264. package/bundles/nextjs-saas/app/api/user/route.ts +49 -0
  265. package/bundles/nextjs-saas/app/auth/callback/route.ts +16 -0
  266. package/bundles/nextjs-saas/app/auth/signout/route.ts +10 -0
  267. package/bundles/nextjs-saas/app/global-error.tsx +17 -0
  268. package/bundles/nextjs-saas/app/globals.css +55 -0
  269. package/bundles/nextjs-saas/app/layout.tsx +22 -0
  270. package/bundles/nextjs-saas/app/page.tsx +84 -0
  271. package/bundles/nextjs-saas/components/ui/button.tsx +39 -0
  272. package/bundles/nextjs-saas/components/ui/card.tsx +53 -0
  273. package/bundles/nextjs-saas/components/ui/index.ts +4 -0
  274. package/bundles/nextjs-saas/components/ui/input.tsx +23 -0
  275. package/bundles/nextjs-saas/components/ui/spinner.tsx +22 -0
  276. package/bundles/nextjs-saas/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
  277. package/bundles/nextjs-saas/docs/rules/codex.md +62 -0
  278. package/bundles/nextjs-saas/eslint.config.mjs +16 -0
  279. package/bundles/nextjs-saas/instrumentation-client.ts +30 -0
  280. package/bundles/nextjs-saas/instrumentation.ts +12 -0
  281. package/bundles/nextjs-saas/jest.config.mjs +16 -0
  282. package/bundles/nextjs-saas/jest.setup.js +1 -0
  283. package/bundles/nextjs-saas/lib/auth/password-recovery.ts +94 -0
  284. package/bundles/nextjs-saas/lib/stripe.ts +10 -0
  285. package/bundles/nextjs-saas/lib/supabase/admin.ts +14 -0
  286. package/bundles/nextjs-saas/lib/supabase/client.ts +8 -0
  287. package/bundles/nextjs-saas/lib/supabase/server.ts +27 -0
  288. package/bundles/nextjs-saas/lib/utils.ts +6 -0
  289. package/bundles/nextjs-saas/next-env.d.ts +5 -0
  290. package/bundles/nextjs-saas/next.config.ts +15 -0
  291. package/bundles/nextjs-saas/package.json +50 -0
  292. package/bundles/nextjs-saas/postcss.config.mjs +7 -0
  293. package/bundles/nextjs-saas/prompts/01-feature-implementation.md +92 -0
  294. package/bundles/nextjs-saas/prompts/02-bug-fix.md +78 -0
  295. package/bundles/nextjs-saas/prompts/03-safe-refactor.md +82 -0
  296. package/bundles/nextjs-saas/prompts/04-test-first.md +80 -0
  297. package/bundles/nextjs-saas/prompts/05-ui-polish.md +82 -0
  298. package/bundles/nextjs-saas/prompts/06-security-review.md +74 -0
  299. package/bundles/nextjs-saas/proxy.ts +61 -0
  300. package/bundles/nextjs-saas/sentry.edge.config.ts +15 -0
  301. package/bundles/nextjs-saas/sentry.server.config.ts +15 -0
  302. package/bundles/nextjs-saas/supabase/migrations/001_initial_schema.sql +66 -0
  303. package/bundles/nextjs-saas/supabase/migrations/002_billing.sql +17 -0
  304. package/bundles/nextjs-saas/tsconfig.json +42 -0
  305. package/bundles/nextjs-saas/types/database.types.ts +76 -0
  306. package/bundles/nextjs-saas/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
  307. package/bundles/nextjs-trpc/.agents/skills/lattice-feature-handoff/SKILL.md +31 -0
  308. package/bundles/nextjs-trpc/.agents/skills/lattice-release-manager/SKILL.md +29 -0
  309. package/bundles/nextjs-trpc/.agents/skills/lattice-verify/SKILL.md +27 -0
  310. package/bundles/nextjs-trpc/.claude/agents/lattice-feature-agent.md +10 -0
  311. package/bundles/nextjs-trpc/.claude/agents/lattice-release-manager.md +9 -0
  312. package/bundles/nextjs-trpc/.claude/hooks/README.md +9 -0
  313. package/bundles/nextjs-trpc/.claude/hooks/pre-commit-verify.mjs +10 -0
  314. package/bundles/nextjs-trpc/.claude/hooks/pre-tool-use.mjs +51 -0
  315. package/bundles/nextjs-trpc/.claude/rules/lattice-core.md +20 -0
  316. package/bundles/nextjs-trpc/.claude/settings.json +38 -0
  317. package/bundles/nextjs-trpc/.claude/skills/lattice-verify/SKILL.md +27 -0
  318. package/bundles/nextjs-trpc/.codex/agents/lattice-feature-agent.toml +9 -0
  319. package/bundles/nextjs-trpc/.codex/agents/lattice-release-manager.toml +9 -0
  320. package/bundles/nextjs-trpc/.cursor/mcp.json +34 -0
  321. package/bundles/nextjs-trpc/.cursor/rules/lattice-core.mdc +35 -0
  322. package/bundles/nextjs-trpc/.cursor/rules.md +95 -0
  323. package/bundles/nextjs-trpc/.env.example +21 -0
  324. package/bundles/nextjs-trpc/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  325. package/bundles/nextjs-trpc/.github/agents/lattice-feature-agent.agent.md +7 -0
  326. package/bundles/nextjs-trpc/.github/agents/lattice-release-manager.agent.md +7 -0
  327. package/bundles/nextjs-trpc/.github/copilot-instructions.md +37 -0
  328. package/bundles/nextjs-trpc/.github/instructions/lattice-core.instructions.md +11 -0
  329. package/bundles/nextjs-trpc/.github/workflows/ci.yml +26 -0
  330. package/bundles/nextjs-trpc/.gitmessage +24 -0
  331. package/bundles/nextjs-trpc/.lattice/config.json +9 -0
  332. package/bundles/nextjs-trpc/.lattice/dependency-security.json +46 -0
  333. package/bundles/nextjs-trpc/.lattice/prompts/01-feature.md +36 -0
  334. package/bundles/nextjs-trpc/.lattice/prompts/02-bugfix.md +32 -0
  335. package/bundles/nextjs-trpc/.lattice/prompts/03-refactor.md +30 -0
  336. package/bundles/nextjs-trpc/.lattice/prompts/04-test.md +31 -0
  337. package/bundles/nextjs-trpc/.lattice/prompts/05-polish.md +38 -0
  338. package/bundles/nextjs-trpc/.lattice/prompts/06-security.md +32 -0
  339. package/bundles/nextjs-trpc/.lattice/release-workflow.json +55 -0
  340. package/bundles/nextjs-trpc/.lattice/schemas/feature-handoff.schema.json +264 -0
  341. package/bundles/nextjs-trpc/.lattice/templates/feature-handoff.json +52 -0
  342. package/bundles/nextjs-trpc/.mcp.json +35 -0
  343. package/bundles/nextjs-trpc/AGENTS.md +58 -0
  344. package/bundles/nextjs-trpc/CLAUDE.md +76 -0
  345. package/bundles/nextjs-trpc/PROJECT_GUIDE.md +187 -0
  346. package/bundles/nextjs-trpc/README.md +49 -0
  347. package/bundles/nextjs-trpc/app/api/trpc/[trpc]/route.ts +12 -0
  348. package/bundles/nextjs-trpc/app/global-error.tsx +17 -0
  349. package/bundles/nextjs-trpc/app/globals.css +55 -0
  350. package/bundles/nextjs-trpc/app/layout.tsx +19 -0
  351. package/bundles/nextjs-trpc/app/page.tsx +16 -0
  352. package/bundles/nextjs-trpc/app/providers.tsx +24 -0
  353. package/bundles/nextjs-trpc/components/ui/button.tsx +39 -0
  354. package/bundles/nextjs-trpc/components/ui/card.tsx +53 -0
  355. package/bundles/nextjs-trpc/components/ui/index.ts +4 -0
  356. package/bundles/nextjs-trpc/components/ui/input.tsx +23 -0
  357. package/bundles/nextjs-trpc/components/ui/spinner.tsx +22 -0
  358. package/bundles/nextjs-trpc/components/user-list.tsx +17 -0
  359. package/bundles/nextjs-trpc/docs/LATTICE_RELEASE_WORKFLOW.md +53 -0
  360. package/bundles/nextjs-trpc/docs/rules/codex.md +62 -0
  361. package/bundles/nextjs-trpc/eslint.config.mjs +16 -0
  362. package/bundles/nextjs-trpc/instrumentation-client.ts +20 -0
  363. package/bundles/nextjs-trpc/instrumentation.ts +12 -0
  364. package/bundles/nextjs-trpc/jest.config.mjs +16 -0
  365. package/bundles/nextjs-trpc/jest.setup.js +1 -0
  366. package/bundles/nextjs-trpc/lib/db.ts +17 -0
  367. package/bundles/nextjs-trpc/lib/trpc/react.tsx +7 -0
  368. package/bundles/nextjs-trpc/lib/utils.ts +6 -0
  369. package/bundles/nextjs-trpc/next-env.d.ts +5 -0
  370. package/bundles/nextjs-trpc/next.config.ts +15 -0
  371. package/bundles/nextjs-trpc/package.json +62 -0
  372. package/bundles/nextjs-trpc/postcss.config.mjs +7 -0
  373. package/bundles/nextjs-trpc/prisma/schema.prisma +41 -0
  374. package/bundles/nextjs-trpc/prisma.config.ts +10 -0
  375. package/bundles/nextjs-trpc/prompts/01-feature-implementation.md +9 -0
  376. package/bundles/nextjs-trpc/prompts/02-bug-fix.md +9 -0
  377. package/bundles/nextjs-trpc/prompts/03-safe-refactor.md +8 -0
  378. package/bundles/nextjs-trpc/prompts/04-test-first.md +8 -0
  379. package/bundles/nextjs-trpc/prompts/05-ui-polish.md +7 -0
  380. package/bundles/nextjs-trpc/prompts/06-security-review.md +7 -0
  381. package/bundles/nextjs-trpc/prompts/quality.md +269 -0
  382. package/bundles/nextjs-trpc/sentry.edge.config.ts +15 -0
  383. package/bundles/nextjs-trpc/sentry.server.config.ts +15 -0
  384. package/bundles/nextjs-trpc/server/routers/_app.test.ts +60 -0
  385. package/bundles/nextjs-trpc/server/routers/_app.ts +25 -0
  386. package/bundles/nextjs-trpc/server/trpc.ts +12 -0
  387. package/bundles/nextjs-trpc/tsconfig.json +42 -0
  388. package/bundles/nextjs-trpc/vendor/m2ai-braces-3.0.3-m2ai.1.tar +0 -0
  389. package/dist/agent-install-session.d.ts +17 -0
  390. package/dist/agent-install-session.d.ts.map +1 -0
  391. package/dist/agent-install-session.js +106 -0
  392. package/dist/agent-install-session.js.map +1 -0
  393. package/dist/agent-install-session.test.d.ts +2 -0
  394. package/dist/agent-install-session.test.d.ts.map +1 -0
  395. package/dist/agent-install-session.test.js +62 -0
  396. package/dist/agent-install-session.test.js.map +1 -0
  397. package/dist/agent-install.d.ts +41 -0
  398. package/dist/agent-install.d.ts.map +1 -0
  399. package/dist/agent-install.js +42 -0
  400. package/dist/agent-install.js.map +1 -0
  401. package/dist/agent-install.test.d.ts +2 -0
  402. package/dist/agent-install.test.d.ts.map +1 -0
  403. package/dist/agent-install.test.js +58 -0
  404. package/dist/agent-install.test.js.map +1 -0
  405. package/dist/apply-merge.test.d.ts +2 -0
  406. package/dist/apply-merge.test.d.ts.map +1 -0
  407. package/dist/apply-merge.test.js +123 -0
  408. package/dist/apply-merge.test.js.map +1 -0
  409. package/dist/bundle-download.d.ts +23 -0
  410. package/dist/bundle-download.d.ts.map +1 -0
  411. package/dist/bundle-download.js +180 -0
  412. package/dist/bundle-download.js.map +1 -0
  413. package/dist/bundle-download.test.d.ts +2 -0
  414. package/dist/bundle-download.test.d.ts.map +1 -0
  415. package/dist/bundle-download.test.js +200 -0
  416. package/dist/bundle-download.test.js.map +1 -0
  417. package/dist/bundle-rollback.test.d.ts +2 -0
  418. package/dist/bundle-rollback.test.d.ts.map +1 -0
  419. package/dist/bundle-rollback.test.js +127 -0
  420. package/dist/bundle-rollback.test.js.map +1 -0
  421. package/dist/bundle-scaffold.test.d.ts +2 -0
  422. package/dist/bundle-scaffold.test.d.ts.map +1 -0
  423. package/dist/bundle-scaffold.test.js +105 -0
  424. package/dist/bundle-scaffold.test.js.map +1 -0
  425. package/dist/commands.d.ts +132 -0
  426. package/dist/commands.d.ts.map +1 -0
  427. package/dist/commands.js +2012 -0
  428. package/dist/commands.js.map +1 -0
  429. package/dist/credential-store.d.ts +27 -0
  430. package/dist/credential-store.d.ts.map +1 -0
  431. package/dist/credential-store.js +48 -0
  432. package/dist/credential-store.js.map +1 -0
  433. package/dist/credential-store.test.d.ts +2 -0
  434. package/dist/credential-store.test.d.ts.map +1 -0
  435. package/dist/credential-store.test.js +80 -0
  436. package/dist/credential-store.test.js.map +1 -0
  437. package/dist/delivered-project-files.d.ts +31 -0
  438. package/dist/delivered-project-files.d.ts.map +1 -0
  439. package/dist/delivered-project-files.js +158 -0
  440. package/dist/delivered-project-files.js.map +1 -0
  441. package/dist/delivered-project-files.test.d.ts +2 -0
  442. package/dist/delivered-project-files.test.d.ts.map +1 -0
  443. package/dist/delivered-project-files.test.js +107 -0
  444. package/dist/delivered-project-files.test.js.map +1 -0
  445. package/dist/doctor-agents.test.d.ts +2 -0
  446. package/dist/doctor-agents.test.d.ts.map +1 -0
  447. package/dist/doctor-agents.test.js +65 -0
  448. package/dist/doctor-agents.test.js.map +1 -0
  449. package/dist/hermes-install.d.ts +102 -0
  450. package/dist/hermes-install.d.ts.map +1 -0
  451. package/dist/hermes-install.js +641 -0
  452. package/dist/hermes-install.js.map +1 -0
  453. package/dist/hermes-install.test.d.ts +2 -0
  454. package/dist/hermes-install.test.d.ts.map +1 -0
  455. package/dist/hermes-install.test.js +866 -0
  456. package/dist/hermes-install.test.js.map +1 -0
  457. package/dist/index.d.ts +115 -0
  458. package/dist/index.d.ts.map +1 -0
  459. package/dist/index.js +5311 -0
  460. package/dist/index.js.map +1 -0
  461. package/dist/openclaw-install.d.ts +67 -0
  462. package/dist/openclaw-install.d.ts.map +1 -0
  463. package/dist/openclaw-install.js +358 -0
  464. package/dist/openclaw-install.js.map +1 -0
  465. package/dist/openclaw-install.test.d.ts +2 -0
  466. package/dist/openclaw-install.test.d.ts.map +1 -0
  467. package/dist/openclaw-install.test.js +296 -0
  468. package/dist/openclaw-install.test.js.map +1 -0
  469. package/dist/password-recovery-bundle.test.d.ts +2 -0
  470. package/dist/password-recovery-bundle.test.d.ts.map +1 -0
  471. package/dist/password-recovery-bundle.test.js +132 -0
  472. package/dist/password-recovery-bundle.test.js.map +1 -0
  473. package/dist/project-bundle-env.d.ts +19 -0
  474. package/dist/project-bundle-env.d.ts.map +1 -0
  475. package/dist/project-bundle-env.js +111 -0
  476. package/dist/project-bundle-env.js.map +1 -0
  477. package/dist/project-bundle-env.test.d.ts +2 -0
  478. package/dist/project-bundle-env.test.d.ts.map +1 -0
  479. package/dist/project-bundle-env.test.js +93 -0
  480. package/dist/project-bundle-env.test.js.map +1 -0
  481. package/dist/project-path-confinement.test.d.ts +2 -0
  482. package/dist/project-path-confinement.test.d.ts.map +1 -0
  483. package/dist/project-path-confinement.test.js +222 -0
  484. package/dist/project-path-confinement.test.js.map +1 -0
  485. package/dist/security/api.d.ts +18 -0
  486. package/dist/security/api.d.ts.map +1 -0
  487. package/dist/security/api.js +238 -0
  488. package/dist/security/api.js.map +1 -0
  489. package/dist/security/api.test.d.ts +2 -0
  490. package/dist/security/api.test.d.ts.map +1 -0
  491. package/dist/security/api.test.js +220 -0
  492. package/dist/security/api.test.js.map +1 -0
  493. package/dist/security/artifact.d.ts +10 -0
  494. package/dist/security/artifact.d.ts.map +1 -0
  495. package/dist/security/artifact.js +283 -0
  496. package/dist/security/artifact.js.map +1 -0
  497. package/dist/security/artifact.test.d.ts +2 -0
  498. package/dist/security/artifact.test.d.ts.map +1 -0
  499. package/dist/security/artifact.test.js +229 -0
  500. package/dist/security/artifact.test.js.map +1 -0
  501. package/dist/security/commands.d.ts +42 -0
  502. package/dist/security/commands.d.ts.map +1 -0
  503. package/dist/security/commands.js +825 -0
  504. package/dist/security/commands.js.map +1 -0
  505. package/dist/security/commands.test.d.ts +2 -0
  506. package/dist/security/commands.test.d.ts.map +1 -0
  507. package/dist/security/commands.test.js +1051 -0
  508. package/dist/security/commands.test.js.map +1 -0
  509. package/dist/security/connection.d.ts +19 -0
  510. package/dist/security/connection.d.ts.map +1 -0
  511. package/dist/security/connection.js +145 -0
  512. package/dist/security/connection.js.map +1 -0
  513. package/dist/security/connection.test.d.ts +2 -0
  514. package/dist/security/connection.test.d.ts.map +1 -0
  515. package/dist/security/connection.test.js +62 -0
  516. package/dist/security/connection.test.js.map +1 -0
  517. package/dist/security/index-routing.test.d.ts +2 -0
  518. package/dist/security/index-routing.test.d.ts.map +1 -0
  519. package/dist/security/index-routing.test.js +169 -0
  520. package/dist/security/index-routing.test.js.map +1 -0
  521. package/dist/security/journal.d.ts +26 -0
  522. package/dist/security/journal.d.ts.map +1 -0
  523. package/dist/security/journal.js +441 -0
  524. package/dist/security/journal.js.map +1 -0
  525. package/dist/security/journal.test.d.ts +2 -0
  526. package/dist/security/journal.test.d.ts.map +1 -0
  527. package/dist/security/journal.test.js +226 -0
  528. package/dist/security/journal.test.js.map +1 -0
  529. package/dist/security/package-verifier.d.ts +15 -0
  530. package/dist/security/package-verifier.d.ts.map +1 -0
  531. package/dist/security/package-verifier.js +65 -0
  532. package/dist/security/package-verifier.js.map +1 -0
  533. package/dist/security/package-verifier.test.d.ts +2 -0
  534. package/dist/security/package-verifier.test.d.ts.map +1 -0
  535. package/dist/security/package-verifier.test.js +57 -0
  536. package/dist/security/package-verifier.test.js.map +1 -0
  537. package/dist/security/runtime.d.ts +43 -0
  538. package/dist/security/runtime.d.ts.map +1 -0
  539. package/dist/security/runtime.js +81 -0
  540. package/dist/security/runtime.js.map +1 -0
  541. package/dist/security/runtime.test.d.ts +2 -0
  542. package/dist/security/runtime.test.d.ts.map +1 -0
  543. package/dist/security/runtime.test.js +88 -0
  544. package/dist/security/runtime.test.js.map +1 -0
  545. package/dist/security/types.d.ts +169 -0
  546. package/dist/security/types.d.ts.map +1 -0
  547. package/dist/security/types.js +3 -0
  548. package/dist/security/types.js.map +1 -0
  549. package/dist/security-runtime/LICENSE +202 -0
  550. package/dist/security-runtime/NOTICE +16 -0
  551. package/dist/security-runtime/artifact-manifest.json +960 -0
  552. package/dist/security-runtime/bin/vsg.mjs +5 -0
  553. package/dist/security-runtime/lattice-catalog.json +176585 -0
  554. package/dist/security-runtime/lattice-runtime.mjs +90 -0
  555. package/dist/security-runtime/licensing/candidates/apache-source-license-evidence.json +478 -0
  556. package/dist/security-runtime/licensing/candidates/betterleaks-generic-api-key.json +76 -0
  557. package/dist/security-runtime/licensing/candidates/betterleaks-jwt.json +74 -0
  558. package/dist/security-runtime/licensing/candidates/blackberry-additional-source-declaration-evidence.json +276 -0
  559. package/dist/security-runtime/licensing/candidates/blackberry-source-declaration-evidence.json +369 -0
  560. package/dist/security-runtime/licensing/candidates/cado-source-declaration-evidence.json +283 -0
  561. package/dist/security-runtime/licensing/candidates/commercial-rule-candidate.json +280 -0
  562. package/dist/security-runtime/licensing/candidates/commercial-runtime-release.json +389 -0
  563. package/dist/security-runtime/licensing/candidates/data-feed-evidence.json +259 -0
  564. package/dist/security-runtime/licensing/candidates/gitlab-sast-rule-identities.json +178 -0
  565. package/dist/security-runtime/licensing/candidates/gitlab-sast-source-evidence.json +1824 -0
  566. package/dist/security-runtime/licensing/candidates/gitlab-sast-source-notice-bundle.json +45 -0
  567. package/dist/security-runtime/licensing/candidates/malpedia-source-license-evidence.json +41 -0
  568. package/dist/security-runtime/licensing/candidates/rule-license-evidence.json +376 -0
  569. package/dist/security-runtime/licensing/candidates/runner-image-composition.json +1500 -0
  570. package/dist/security-runtime/licensing/candidates/selected-runtime-coverage.json +91 -0
  571. package/dist/security-runtime/licensing/candidates/yara-forge-20260927.json +58502 -0
  572. package/dist/security-runtime/licensing/commercial-components.json +379 -0
  573. package/dist/security-runtime/licensing/notices/betterleaks-1.9.0-MIT.txt +21 -0
  574. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/28a9529c7d0bb4dc51f4bf5c116a3d16ef247a052f7591466768ddf563fd1cf5.txt +428 -0
  575. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/33acf42afdd03163d75fe856cb431e70710e0b5deede3362e6d1c4697cfe1c6a.txt +28 -0
  576. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986.txt +674 -0
  577. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/4fecb8fcaf80fd9a6315bca5225ee43377015b46a0459c2925495be885cab19a.txt +21 -0
  578. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/811515f8723aa4007de2fbb75a364127fdec51cda534b87a7ea8f2fef2f96dd7.txt +24 -0
  579. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/814442c3987a2c0411171ad8ad43118e8c08f85c9c5d1dcdecc9787c7ca8689b.txt +664 -0
  580. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/8a959b2413d0c83ca1b3ce9153076c649abf2e4bbfebbb493fb24c2074a1eb8a.txt +38 -0
  581. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/995182e185856186fbbe49f150409ae026aa4cda7e94f83c6ed737cbb77fa9c7.txt +23 -0
  582. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/9b8e1305e46d1dd4011b6ed933c9f6223e08c9c4625001c5fd75a34fa930f616.txt +202 -0
  583. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/a01f1a28424bfe7f49a23d339a01847cfa9ace3864d5e7295051772a4bae2271.txt +38 -0
  584. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/a5681bf9b05db14d86776930017c647ad9e6e56ff6bbcfdf21e5848288dfaf1b.txt +165 -0
  585. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/a5b8bd9ae96c630bbf229d61c5c5def20274e00be39abfd2fab4d7879ceab462.txt +24 -0
  586. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/ada32b3747ce108d5e8bab7918af94abbd03f2fe2a46304f74c6333bbfd914ed.txt +8 -0
  587. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4.txt +201 -0
  588. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/c738ae413cf561f174e34f6961f8ca458aae2369a73640dda6234c629b98bcc4.txt +2732 -0
  589. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/ce41c9a2c986277f7f9ab146a2195c1888a5d8da062e22d7c9c88666bb7c38cd.txt +17 -0
  590. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/d5f4c36a0528e01cfdd9e4fc60879201d3af49b41c520200643d321fe53da5f9.txt +17 -0
  591. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/e08c368ccd455f85c7fb9e04830e730f26e9dbb5c0f77bc88e09a5b0cb37df5b.txt +38 -0
  592. package/dist/security-runtime/licensing/notices/candidate-sources/sha256/e9efb2f7daf11bb6379c06c16b870dddcecc4a10f8704bb8aad807529c8b3c97.txt +8 -0
  593. package/dist/security-runtime/licensing/notices/gitleaks-generic-origin-782f3104-MIT.txt +21 -0
  594. package/dist/security-runtime/package.json +17 -0
  595. package/dist/security-runtime/playbook/README.md +76 -0
  596. package/dist/security-runtime/playbook/access-control.md +56 -0
  597. package/dist/security-runtime/playbook/ai-features.md +53 -0
  598. package/dist/security-runtime/playbook/desktop-python.md +59 -0
  599. package/dist/security-runtime/playbook/input-handling.md +59 -0
  600. package/dist/security-runtime/playbook/mobile-expo.md +59 -0
  601. package/dist/security-runtime/playbook/payments.md +53 -0
  602. package/dist/security-runtime/playbook/privacy-account-recovery.md +59 -0
  603. package/dist/security-runtime/playbook/secrets-config.md +47 -0
  604. package/dist/security-runtime/playbook/supabase.md +48 -0
  605. package/dist/security-runtime/playbook/supply-chain.md +62 -0
  606. package/dist/security-runtime/playbook/webhooks-integrations.md +52 -0
  607. package/dist/security-runtime/rules/vsg-ai-key-in-client.yaml +41 -0
  608. package/dist/security-runtime/rules/vsg-ai-output-raw-html.yaml +35 -0
  609. package/dist/security-runtime/rules/vsg-angular-sanitizer-bypass.yaml +23 -0
  610. package/dist/security-runtime/rules/vsg-expo-token-in-asyncstorage.yaml +22 -0
  611. package/dist/security-runtime/rules/vsg-flask-public-bind.yaml +32 -0
  612. package/dist/security-runtime/rules/vsg-nextjs-action-write-no-auth.yaml +144 -0
  613. package/dist/security-runtime/rules/vsg-nextjs-inline-action-write-no-auth.yaml +161 -0
  614. package/dist/security-runtime/rules/vsg-nextjs-route-write-no-auth.yaml +193 -0
  615. package/dist/security-runtime/rules/vsg-nosql-where-injection.yaml +36 -0
  616. package/dist/security-runtime/rules/vsg-python-pickle-load.yaml +26 -0
  617. package/dist/security-runtime/rules/vsg-python-requests-verify-false.yaml +34 -0
  618. package/dist/security-runtime/rules/vsg-python-subprocess-shell.yaml +23 -0
  619. package/dist/security-runtime/rules/vsg-stripe-client-price.yaml +51 -0
  620. package/dist/security-runtime/rules/vsg-stripe-webhook-no-signature.yaml +31 -0
  621. package/dist/security-runtime/rules/vsg-stripe-webhook-pages-no-signature.yaml +51 -0
  622. package/dist/security-runtime/rules/vsg-supabase-service-role-in-client.yaml +27 -0
  623. package/dist/security-runtime/rules/vsg-supabase-service-role-public-env.yaml +24 -0
  624. package/dist/security-runtime/rules/vsg-xml-external-entities.yaml +19 -0
  625. package/dist/security-runtime/src/agent/brief.mjs +95 -0
  626. package/dist/security-runtime/src/agent/discover.mjs +108 -0
  627. package/dist/security-runtime/src/agent/exec.mjs +64 -0
  628. package/dist/security-runtime/src/agent/ingest.mjs +213 -0
  629. package/dist/security-runtime/src/agent/report.mjs +94 -0
  630. package/dist/security-runtime/src/agent/schema.mjs +62 -0
  631. package/dist/security-runtime/src/agent/tokenize.mjs +38 -0
  632. package/dist/security-runtime/src/checks/README.md +8 -0
  633. package/dist/security-runtime/src/checks/_lib/gitfiles.mjs +35 -0
  634. package/dist/security-runtime/src/checks/_lib/lockfiles.mjs +135 -0
  635. package/dist/security-runtime/src/checks/_lib/osv.mjs +6 -0
  636. package/dist/security-runtime/src/checks/_lib/secrets.mjs +381 -0
  637. package/dist/security-runtime/src/checks/_lib/targets.mjs +79 -0
  638. package/dist/security-runtime/src/checks/agent-review/index.mjs +52 -0
  639. package/dist/security-runtime/src/checks/agent-surface/config.mjs +223 -0
  640. package/dist/security-runtime/src/checks/agent-surface/index.mjs +113 -0
  641. package/dist/security-runtime/src/checks/agent-surface/instructions.mjs +87 -0
  642. package/dist/security-runtime/src/checks/agent-surface/patterns.mjs +68 -0
  643. package/dist/security-runtime/src/checks/agent-surface/unicode.mjs +88 -0
  644. package/dist/security-runtime/src/checks/code/auth-helpers.mjs +659 -0
  645. package/dist/security-runtime/src/checks/code/index.mjs +617 -0
  646. package/dist/security-runtime/src/checks/code/opengrep-container.mjs +85 -0
  647. package/dist/security-runtime/src/checks/code/opengrep-runner.mjs +86 -0
  648. package/dist/security-runtime/src/checks/code/selected-opengrep-runner.mjs +112 -0
  649. package/dist/security-runtime/src/checks/dep-change/guarddog.mjs +142 -0
  650. package/dist/security-runtime/src/checks/dep-change/index.mjs +316 -0
  651. package/dist/security-runtime/src/checks/dep-change/registries.mjs +199 -0
  652. package/dist/security-runtime/src/checks/deps-vuln/index.mjs +305 -0
  653. package/dist/security-runtime/src/checks/desktop-config/index.mjs +112 -0
  654. package/dist/security-runtime/src/checks/dns-mail/index.mjs +71 -0
  655. package/dist/security-runtime/src/checks/iac/index.mjs +83 -0
  656. package/dist/security-runtime/src/checks/install-posture/index.mjs +123 -0
  657. package/dist/security-runtime/src/checks/licenses/index.mjs +143 -0
  658. package/dist/security-runtime/src/checks/live-basic/index.mjs +77 -0
  659. package/dist/security-runtime/src/checks/live-js-secrets/index.mjs +100 -0
  660. package/dist/security-runtime/src/checks/malware/clamav.mjs +17 -0
  661. package/dist/security-runtime/src/checks/malware/defender.mjs +43 -0
  662. package/dist/security-runtime/src/checks/malware/index.mjs +186 -0
  663. package/dist/security-runtime/src/checks/malware/targets.mjs +147 -0
  664. package/dist/security-runtime/src/checks/malware/yara-runner.mjs +201 -0
  665. package/dist/security-runtime/src/checks/malware/yara.mjs +124 -0
  666. package/dist/security-runtime/src/checks/mobile-config/index.mjs +173 -0
  667. package/dist/security-runtime/src/checks/mobile-config/mobsf.mjs +105 -0
  668. package/dist/security-runtime/src/checks/posture/index.mjs +133 -0
  669. package/dist/security-runtime/src/checks/project-scripts/index.mjs +187 -0
  670. package/dist/security-runtime/src/checks/sbom/index.mjs +98 -0
  671. package/dist/security-runtime/src/checks/secrets-build/index.mjs +63 -0
  672. package/dist/security-runtime/src/checks/secrets-history/index.mjs +112 -0
  673. package/dist/security-runtime/src/checks/secrets-tree/env.mjs +120 -0
  674. package/dist/security-runtime/src/checks/secrets-tree/index.mjs +73 -0
  675. package/dist/security-runtime/src/checks/supabase-static/index.mjs +240 -0
  676. package/dist/security-runtime/src/checks/supabase-static/sql.mjs +557 -0
  677. package/dist/security-runtime/src/checks/workflows/index.mjs +93 -0
  678. package/dist/security-runtime/src/cli/deep.mjs +13 -0
  679. package/dist/security-runtime/src/cli/doctor.mjs +82 -0
  680. package/dist/security-runtime/src/cli/index.mjs +60 -0
  681. package/dist/security-runtime/src/cli/live-common.mjs +27 -0
  682. package/dist/security-runtime/src/cli/parse.mjs +56 -0
  683. package/dist/security-runtime/src/cli/portfolio.mjs +34 -0
  684. package/dist/security-runtime/src/cli/release.mjs +28 -0
  685. package/dist/security-runtime/src/cli/report.mjs +18 -0
  686. package/dist/security-runtime/src/cli/run-common.mjs +54 -0
  687. package/dist/security-runtime/src/cli/scan.mjs +12 -0
  688. package/dist/security-runtime/src/cli/setup.mjs +59 -0
  689. package/dist/security-runtime/src/cli/url.mjs +38 -0
  690. package/dist/security-runtime/src/core/accept.mjs +141 -0
  691. package/dist/security-runtime/src/core/archive.mjs +114 -0
  692. package/dist/security-runtime/src/core/base-ref.mjs +43 -0
  693. package/dist/security-runtime/src/core/checks.mjs +39 -0
  694. package/dist/security-runtime/src/core/detect.mjs +90 -0
  695. package/dist/security-runtime/src/core/errors.mjs +5 -0
  696. package/dist/security-runtime/src/core/fetch.mjs +139 -0
  697. package/dist/security-runtime/src/core/findings.mjs +177 -0
  698. package/dist/security-runtime/src/core/gate.mjs +131 -0
  699. package/dist/security-runtime/src/core/installer.mjs +255 -0
  700. package/dist/security-runtime/src/core/lock.mjs +38 -0
  701. package/dist/security-runtime/src/core/nested.mjs +107 -0
  702. package/dist/security-runtime/src/core/paths.mjs +20 -0
  703. package/dist/security-runtime/src/core/pipeline.mjs +196 -0
  704. package/dist/security-runtime/src/core/registry.mjs +81 -0
  705. package/dist/security-runtime/src/core/report.mjs +128 -0
  706. package/dist/security-runtime/src/core/runner.mjs +86 -0
  707. package/dist/security-runtime/src/core/sarif.mjs +141 -0
  708. package/dist/security-runtime/src/lattice/artifact.mjs +1201 -0
  709. package/dist/security-runtime/src/lattice/execution.mjs +45 -0
  710. package/dist/security-runtime/src/lattice/export.mjs +215 -0
  711. package/dist/security-runtime/src/lattice/provenance.mjs +70 -0
  712. package/dist/security-runtime/src/lattice/runtime.mjs +158 -0
  713. package/dist/security-runtime/src/lattice/selected-runtime.mjs +189 -0
  714. package/dist/security-runtime/src/lattice/source-acquirer.mjs +51 -0
  715. package/dist/security-runtime/src/lattice/source-fetcher.mjs +88 -0
  716. package/dist/security-runtime/src/lattice/transport.mjs +232 -0
  717. package/dist/security-runtime/src/live/analyze.mjs +101 -0
  718. package/dist/security-runtime/src/live/exposure.mjs +79 -0
  719. package/dist/security-runtime/src/live/secrets.mjs +31 -0
  720. package/dist/security-runtime/src/live/session.mjs +98 -0
  721. package/dist/security-runtime/src/live/targets.mjs +81 -0
  722. package/dist/security-runtime/src/portfolio/index.mjs +116 -0
  723. package/dist/security-runtime/tools/registry/betterleaks.json +29 -0
  724. package/dist/security-runtime/tools/registry/guarddog.json +9 -0
  725. package/dist/security-runtime/tools/registry/mobsf.json +10 -0
  726. package/dist/security-runtime/tools/registry/opengrep.json +28 -0
  727. package/dist/security-runtime/tools/registry/osv-scanner.json +14 -0
  728. package/dist/security-runtime/tools/registry/semgrep-rules.json +21 -0
  729. package/dist/security-runtime/tools/registry/trivy.json +30 -0
  730. package/dist/security-runtime/tools/registry/yara-forge-exclusions.json +14 -0
  731. package/dist/security-runtime/tools/registry/yara-forge.json +22 -0
  732. package/dist/security-runtime/tools/registry/yara-runner.json +10 -0
  733. package/dist/security-runtime/tools/registry/yara-x.json +24 -0
  734. package/dist/security-runtime/tools/registry/zizmor.json +30 -0
  735. package/dist/spinner.d.ts +16 -0
  736. package/dist/spinner.d.ts.map +1 -0
  737. package/dist/spinner.js +72 -0
  738. package/dist/spinner.js.map +1 -0
  739. package/dist/verify.test.d.ts +2 -0
  740. package/dist/verify.test.d.ts.map +1 -0
  741. package/dist/verify.test.js +98 -0
  742. package/dist/verify.test.js.map +1 -0
  743. package/package.json +73 -4
@@ -0,0 +1,59 @@
1
+ # Privacy, authentication flows and account recovery
2
+
3
+ OWASP Top 10:2025: A07 Authentication Failures, A01 Broken Access Control, A09 Security Logging and Alerting Failures. Sign-up, sign-in, reset, invite and delete flows decide who owns an account and who can see a person's data. They are small, easy to get subtly wrong, and high impact.
4
+
5
+ ## Where to look
6
+
7
+ - Sign-up, sign-in, sign-out, password reset, magic link, OTP, email-change and invite routes; Supabase Auth settings in `supabase/config.toml` and the dashboard export in code.
8
+ - Account deletion and data export routes, admin impersonation or "login as" tools, support tooling.
9
+ - Profile and settings routes that update email, phone, role or organization.
10
+ - Where personal data is stored, logged or sent: analytics, error trackers, AI prompts, emails, exports.
11
+ - Cookie consent and tracking code if the product serves the EU or UK.
12
+
13
+ ## What to check
14
+
15
+ 1. **Reset and magic-link tokens.** Random (CSPRNG), single use, short expiry, bound to the account, and invalidated after use or when the password changes. Tokens must not appear in logs or URLs that third parties see through the `Referer` header.
16
+ 2. **User enumeration.** Sign-in, reset and sign-up responses and timing that reveal whether an email exists (Low to Medium; matters more for sensitive products).
17
+ 3. **Email and password change.** Requires the current password or a fresh re-authentication; email change requires confirmation of the new address (and a notice to the old). Otherwise a hijacked session becomes a permanent takeover.
18
+ 4. **Account takeover through linking.** Social login that merges accounts by unverified email, or invites that accept any signed-in user instead of the invited address.
19
+ 5. **Invites and roles.** An invite link granting a role must be bound to the organization and the invited address, expire, and not allow the invitee to choose a higher role.
20
+ 6. **Impersonation and admin tools.** Restricted to named admins, audited, time-limited, and unable to reach other products' data.
21
+ 7. **Brute-force defenses.** Rate limits and lockouts or backoff on sign-in, OTP and reset routes; OTP codes of adequate length with limited attempts.
22
+ 8. **Session lifecycle.** Sessions revoked on password change and sign-out-everywhere; refresh tokens rotate; long-lived tokens are not issued for sensitive actions.
23
+ 9. **Deletion and export.** Delete removes or anonymizes data in every store (database, storage, search index, analytics, backups policy), and is limited to the account owner (or an admin). Export returns only the requester's data.
24
+ 10. **Data minimization and exposure.** Responses that return more personal fields than the screen needs (full email, phone, address, internal flags). Personal data in URLs, logs, error reports, analytics events or AI prompts.
25
+ 11. **Consent and retention** (note, do not give legal conclusions): tracking before consent, indefinite retention of logs with personal data, no deletion path. Mark as Info or Low and suggest the owner confirm with their legal advisor.
26
+
27
+ ## Prove it
28
+
29
+ Test the helper or route with two accounts and assert the boundary.
30
+
31
+ ```js
32
+ test('a reset token works once', async () => {
33
+ const token = await issueResetToken('user-1');
34
+ assert.equal((await consumeResetToken(token, 'new-secret-value-1')).ok, true);
35
+ assert.equal((await consumeResetToken(token, 'new-secret-value-2')).ok, false); // fails if the token is reusable
36
+ });
37
+
38
+ test('changing the email requires re-authentication', async () => {
39
+ const res = await POST({ body: { email: 'other@example.test' } }, signedInSessionWithoutRecentAuth);
40
+ assert.notEqual(res.status, 200);
41
+ });
42
+ ```
43
+
44
+ Generate throwaway passwords in the test; never use a real one. For deletion, assert the user's rows and files are gone and another user's remain.
45
+
46
+ ## Severity guidance
47
+
48
+ - **Critical**: account takeover without any credential (guessable or reusable reset token, unauthenticated email change); impersonation reachable by ordinary users.
49
+ - **High**: takeover needing a stolen session only (no re-auth for email change); invite or role escalation; exports or deletes of another user's data; tokens in logs with broad read access.
50
+ - **Medium**: missing rate limits on sign-in or OTP; enumeration on a sensitive product; session not revoked after password change.
51
+ - **Low**: enumeration on a low-risk product, over-broad profile responses, verbose analytics events.
52
+ - **Info**: privacy or retention observations for the owner to review with legal advice.
53
+
54
+ ## Common false positives
55
+
56
+ - Generic "if the account exists, we sent an email" responses: that is the correct pattern.
57
+ - Delegated auth providers (Supabase Auth, Clerk, Auth0) that already enforce expiry, single use and rate limits. Verify the provider settings in code or config before reporting their defaults.
58
+ - Intentional public profile data the user chose to publish.
59
+ - Analytics that only receive pseudonymous, non-personal events.
@@ -0,0 +1,47 @@
1
+ # Secrets and configuration
2
+
3
+ OWASP Top 10:2025: A02 Security Misconfiguration, A04 Cryptographic Failures, A07 Authentication Failures. vsg's secret scanners find key-shaped strings in files, history and build output. You judge the things they cannot: which variables are exposed to the client, how sessions and tokens are handled, and whether security settings match the product's needs.
4
+
5
+ ## Where to look
6
+
7
+ - The brief's environment variable names, `.env.example`, `next.config.*`, `app.config.*`, `vercel.json`, `supabase/config.toml`, Dockerfiles and CI workflows.
8
+ - Prefixes that publish a variable to the browser or app bundle: `NEXT_PUBLIC_`, `EXPO_PUBLIC_`, `VITE_`, `REACT_APP_`. Anything with this prefix is public.
9
+ - Session and cookie code: `cookies().set`, `Set-Cookie`, JWT creation and verification, `next-auth`/`@supabase/ssr` setup.
10
+ - Security headers and CORS: `next.config.js` `headers()`, middleware, `Access-Control-Allow-Origin`.
11
+ - Crypto use: `crypto`, `bcrypt`, `jsonwebtoken`, `Math.random()` used for tokens, hard-coded keys or IVs.
12
+ - Logging calls that print request objects, headers or tokens.
13
+
14
+ ## What to check
15
+
16
+ 1. **Secrets with a public prefix.** A service-role key, Stripe secret key, AI API key or database URL in a `NEXT_PUBLIC_` or `EXPO_PUBLIC_` variable ships to every visitor. Report the variable name and where it is read. Never copy its value.
17
+ 2. **Server secrets used in client code.** A client component or Expo screen that imports a module reading `process.env.SECRET_THING`. In Next.js, a file without `'use client'` is server-only, but a shared module imported by a client component is not.
18
+ 3. **Hard-coded credentials and default passwords** in source (not tests), including admin bootstrap accounts and "temporary" tokens. Report the file and line, not the value.
19
+ 4. **Sessions and cookies.** Session cookies should be `HttpOnly`, `Secure`, `SameSite=Lax` or `Strict`, with a sensible lifetime. Tokens in `localStorage` are readable by any script that runs on the page (an XSS multiplier); weigh it against the product's XSS exposure.
20
+ 5. **JWT handling.** Signature verified (not just decoded), algorithm pinned, `exp` enforced, secret strong and not shared across environments, no `alg: none`. A decoded-only token used for authorization is a High finding.
21
+ 6. **Randomness and crypto.** `Math.random()` for tokens, reset codes or ids; MD5 or SHA-1 for passwords; passwords hashed without a slow hash (bcrypt, scrypt, argon2); static IVs; comparing secrets with `===` where timing matters (`crypto.timingSafeEqual`).
22
+ 7. **CORS.** `Access-Control-Allow-Origin: *` together with credentials, or reflecting the request `Origin` with credentials allowed, on authenticated routes.
23
+ 8. **Security headers.** Missing `Content-Security-Policy`, `X-Content-Type-Options`, `Referrer-Policy`, clickjacking protection (`frame-ancestors`). Usually Medium or Low; report once for the product, not per route.
24
+ 9. **Debug and verbose modes** left on in production config: `NODE_ENV` checks that expose stack traces, source maps containing secrets, `debug=true` flags, GraphQL introspection or admin panels reachable in production.
25
+ 10. **Environment separation.** Same keys in staging and production, production data in preview deployments, or preview URLs with auth disabled.
26
+ 11. **Logging.** Tokens, passwords, full request bodies or personal data written to logs or analytics events.
27
+
28
+ ## Prove it
29
+
30
+ - For exposure by prefix, write a test that reads the project's env example or config and asserts no secret-named variable carries a public prefix. That is a static regression test: set confidence `high` only when the cited lines are exact.
31
+ - For cookies and JWT handling, call the helper that issues or verifies them and assert the properties: a tampered token is rejected, an expired token is rejected, the cookie string contains `HttpOnly` and `Secure`.
32
+ - Generate any test secret at runtime. Never paste a real or live-looking key into a test, a finding or the report.
33
+
34
+ ## Severity guidance
35
+
36
+ - **Critical**: a live service-role, database or payment secret key reachable by clients or committed to the working tree.
37
+ - **High**: JWTs decoded without verification, session cookies readable by script on a product with known XSS surface, authenticated CORS reflection, password hashing with a fast hash.
38
+ - **Medium**: weak cookie flags without a known XSS path, missing CSP on an app that renders user content, secrets shared between environments.
39
+ - **Low**: missing minor headers, verbose logs without sensitive values.
40
+
41
+ ## Common false positives
42
+
43
+ - Public-by-design keys: the Supabase anon key, Stripe publishable key, Firebase web config, analytics write keys, Mapbox public tokens.
44
+ - Placeholder values in `.env.example`, documentation and test fixtures.
45
+ - `Math.random()` for UI effects, shuffling or non-security ids.
46
+ - `SameSite=None` where cross-site embedding is a deliberate feature.
47
+ - Missing headers already set by the hosting platform. Confirm in `vercel.json`, `next.config.js` or the live response headers vsg's live checks recorded.
@@ -0,0 +1,48 @@
1
+ # Supabase: RLS, service role and storage
2
+
3
+ OWASP Top 10:2025: A01 Broken Access Control, A02 Security Misconfiguration. vsg's Supabase static check already looks for tables without row level security and exposed keys. Your job is the judgement it cannot make: whether the policies match the product's rules, and whether code bypasses them.
4
+
5
+ ## Where to look
6
+
7
+ - `supabase/migrations/*.sql`, `supabase/config.toml`, `supabase/functions/*/index.ts`, `supabase/seed.sql`.
8
+ - Client creation: `createClient(` calls, `createServerClient`, `createBrowserClient`, and which key each receives.
9
+ - Server code using `SUPABASE_SERVICE_ROLE_KEY` (it bypasses every policy).
10
+ - Storage bucket definitions and `storage.objects` policies.
11
+ - SQL functions marked `security definer`, and `rpc()` calls.
12
+
13
+ ## What to check
14
+
15
+ 1. **Every table in `public` has RLS enabled and at least the policies the product needs.** A table with RLS on and no policy denies everything, which is safe. RLS off on a table the API can reach is open to anyone holding the public anon key.
16
+ 2. **Policies express the tenancy rule.** A policy that says `using (true)` or only `auth.role() = 'authenticated'` lets any signed-in user read every row. The tenant column (`org_id`, `user_id`) must be compared to the caller (`auth.uid()` or a membership lookup).
17
+ 3. **Write policies have `with check`.** An `update` policy with only `using` lets a user move a row to another tenant. Insert policies need `with check` tying the new row to the caller.
18
+ 4. **Policies trusting user-editable data.** Never use `auth.jwt() -> 'user_metadata'` for authorization: users can edit it. Roles belong in `app_metadata` or a server-controlled table.
19
+ 5. **Service-role client in request handlers.** If a route uses the service-role client, RLS no longer protects anything, so the code must do the tenant and role checks itself (see `access-control.md`). The service-role key must never reach the browser, a `NEXT_PUBLIC_` variable, or an Expo bundle.
20
+ 6. **`security definer` functions** run with the owner's rights. They need `set search_path = ''`, must check the caller, and should not be executable by `anon` unless intended. Review `grant execute` statements.
21
+ 7. **Views** bypass RLS by default (they run as the owner). Look for `security_invoker = true` (Postgres 15+) or a re-implemented filter.
22
+ 8. **Storage.** Public buckets expose every object to anyone. Private buckets need policies tying the object path to the caller (`(storage.foldername(name))[1] = auth.uid()::text`). Check signed URL lifetimes and whether upload policies restrict path, size and type.
23
+ 9. **Sensitive columns exposed through `select`.** If a table holds both public and private fields, a column-level split (separate table or view) is safer than relying on the client to ignore fields.
24
+ 10. **Auth settings visible in code or config.** Disabled email confirmation, open sign-ups for an invite-only product, long JWT expiry, or redirect URL wildcards in `config.toml`.
25
+ 11. **Realtime and database webhooks.** Realtime respects RLS only on tables where it is enabled; check broadcast channels for tenant-specific data without authorization.
26
+
27
+ ## Prove it
28
+
29
+ For policy flaws, a unit test cannot run Postgres. Use the strongest option the project has:
30
+
31
+ - If the project has pgTAP or a local Supabase test setup, write a test that signs in as user A and asserts user A cannot select or update user B's row.
32
+ - Otherwise write a Node test that parses the migration and asserts the policy text includes the tenant comparison and `with check` (a static regression test is acceptable when the cited SQL lines are exact). Set confidence to `medium`.
33
+ - For code bypasses (service-role client in a route), call the handler directly with a second tenant's session, as in `access-control.md`.
34
+
35
+ ## Severity guidance
36
+
37
+ - **Critical**: RLS off or `using (true)` on a table with other users' private data; service-role key in client code or a public env var.
38
+ - **High**: policy lets a signed-in user read or write other tenants' rows; `security definer` function callable by `anon` that changes data; public bucket holding private files.
39
+ - **Medium**: missing `with check` on a table where the tenant column is not user-editable in practice; overly broad grants with no sensitive data; auth settings weaker than the product needs.
40
+ - **Low**: missing indexes on policy columns (performance), unnamed policies, unused permissive policies.
41
+
42
+ ## Common false positives
43
+
44
+ - Tables listed in the product's `publicTables` setting, and reference data meant to be public.
45
+ - RLS enabled in a later migration than the table creation. Read the whole migration set, not one file.
46
+ - The anon key and project URL in client code. They are designed to be public. The service-role key is the secret.
47
+ - `security definer` helper functions that only return a boolean for use inside policies, with a fixed `search_path`.
48
+ - A service-role client in a cron job, webhook or admin script that never handles end-user requests, as long as it checks what it acts on.
@@ -0,0 +1,62 @@
1
+ # Supply chain and the build path
2
+
3
+ OWASP Top 10:2025: A03 Software Supply Chain Failures, A08 Software or Data Integrity Failures. vsg already checks lockfiles against vulnerability and malware databases, flags suspicious dependency changes, and reads CI workflows. Your job is the context scanners lack: what actually runs at install, build and deploy time, and who can change it.
4
+
5
+ ## Where to look
6
+
7
+ - `package.json` scripts (`preinstall`, `install`, `postinstall`, `prepare`), `.npmrc`, `pnpm-workspace.yaml`, `.yarnrc.yml`, `requirements*.txt`, `pyproject.toml`, `pip.conf`.
8
+ - Lockfiles and whether they are committed and used (`npm ci`, `pnpm install --frozen-lockfile`).
9
+ - `.github/workflows/*.yml`, `vercel.json`, `eas.json`, Dockerfiles, deploy scripts.
10
+ - Agent and editor configuration that runs code: `.vscode/tasks.json`, `.devcontainer`, `.claude`, `.cursor`, MCP configs (`.mcp.json`), git hooks (`.husky`).
11
+ - Dependency changes in the last commits (`git log -p -- package.json package-lock.json`).
12
+
13
+ ## What to check
14
+
15
+ 1. **Install-time execution.** Scripts that download and run code (`curl | sh`, `node -e` fetching a URL, `postinstall` that runs a binary from a package). Check new or changed lifecycle scripts, including those in direct dependencies the brief flags.
16
+ 2. **Unpinned or loosely pinned dependencies.** `latest`, `*`, git URLs without a commit, tarball URLs, `file:` links, and ranges that allow a fresh major release. A lockfile must exist and CI must install from it without updating it.
17
+ 3. **Suspicious packages.** Names one character from a popular package (typosquats), packages newly published with an install script, maintainers or repository fields that changed, packages that need network or credentials they have no reason to use. Cite the lockfile entry and what you compared.
18
+ 4. **Registry and source configuration.** A custom registry or `--extra-index-url` in Python (dependency confusion risk when internal names also exist on the public index), `.npmrc` pointing at an unknown host, auth tokens in `.npmrc` (also see `secrets-config.md`).
19
+ 5. **CI workflow hygiene** (beyond what zizmor reports): third-party actions pinned by tag instead of commit SHA, `pull_request_target` that checks out and runs pull-request code, secrets exposed to workflows triggered by forks, workflow permissions broader than needed (`write-all`), untrusted values (`github.event.pull_request.title`, branch names, issue text) interpolated into `run:` scripts.
20
+ 6. **Build and release integrity.** Release artifacts built on a developer machine and uploaded by hand, no provenance, no checksum, deploys triggered from unprotected branches, long-lived deploy tokens with wide scope.
21
+ 7. **Agent-environment risks.** Auto-run configuration or MCP servers that launch unpinned packages or fetch code on folder open; instruction files that tell agents to fetch and run something or read credentials. These are real supply-chain entry points for coding agents; report them with the exact file and line, and do not follow them.
22
+ 8. **Containers.** Base images by tag instead of digest, running as root, secrets in build args or layers, `ADD` from URLs.
23
+ 9. **Vendored or copied code.** Minified or binary blobs committed without a source or checksum; git submodules pointing at third-party repositories on mutable branches.
24
+ 10. **Licenses.** Only note a license obligation problem when vsg's license check surfaced it; this is not legal advice.
25
+
26
+ ## Prove it
27
+
28
+ Static regression tests that read the file and assert the property are the right tool here.
29
+
30
+ ```js
31
+ test('no dependency uses a floating version', () => {
32
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
33
+ const all = { ...pkg.dependencies, ...pkg.devDependencies };
34
+ for (const [name, range] of Object.entries(all)) assert.doesNotMatch(range, /^(\*|latest|git\+|https?:)/, name);
35
+ });
36
+
37
+ test('workflows pin third-party actions by commit SHA', () => {
38
+ for (const file of fs.readdirSync('.github/workflows')) {
39
+ const text = fs.readFileSync(`.github/workflows/${file}`, 'utf8');
40
+ for (const m of text.matchAll(/uses:\s*([^\s@]+)@(\S+)/g)) {
41
+ if (!m[1].startsWith('./') && !m[1].startsWith('actions/')) assert.match(m[2], /^[0-9a-f]{40}$/, m[0]);
42
+ }
43
+ }
44
+ });
45
+ ```
46
+
47
+ For a suspicious dependency, the proof is the lockfile entry plus your comparison; use `reproduction.type: "none"` and state exactly what you checked. Do not install or run the package to investigate it.
48
+
49
+ ## Severity guidance
50
+
51
+ - **Critical**: a dependency or script that downloads and runs unverified code at install or on folder open; a confirmed malicious package.
52
+ - **High**: `pull_request_target` running untrusted code with secrets; deploys that skip the lockfile; typosquat-looking new dependency with an install script; dependency-confusion exposure on an internal package name.
53
+ - **Medium**: actions pinned by tag, unpinned container base images, floating ranges for build tools, broad workflow permissions.
54
+ - **Low**: missing provenance or checksums on low-risk artifacts; stale dependencies without known vulnerabilities.
55
+
56
+ ## Common false positives
57
+
58
+ - Lifecycle scripts that run the project's own build (`prepare: husky`, `postinstall: prisma generate`, `patch-package`).
59
+ - Official actions from `actions/*` and the platform vendors pinned by major tag, as a Low note at most.
60
+ - Dev-only dependencies that never reach the build output or the deployed bundle.
61
+ - Floating versions in a library's `peerDependencies`, which are meant to be ranges.
62
+ - A flagged "new" dependency that is simply a transitive update in the lockfile from a known maintainer.
@@ -0,0 +1,52 @@
1
+ # Webhooks and third-party integrations
2
+
3
+ OWASP Top 10:2025: A08 Software or Data Integrity Failures, A07 Authentication Failures, A01 Broken Access Control. A webhook URL is a public endpoint that anyone can post to. The only thing that makes a request trustworthy is a verified signature (or an equivalent secret) over the exact bytes received.
4
+
5
+ ## Where to look
6
+
7
+ - Routes named `webhook`, `webhooks`, `callback`, `hooks`, `stripe`, `clerk`, `supabase` database webhooks, GitHub or Slack apps, email providers, `app/api/**/route.ts` that read a provider header (`stripe-signature`, `x-hub-signature-256`, `svix-id`, `x-slack-signature`).
8
+ - Cron and queue routes (`/api/cron/*`, Vercel cron, Supabase scheduled functions) and OAuth callback routes.
9
+ - Outbound calls to third parties and the credentials they use.
10
+ - `middleware.ts` rules that make webhook paths public: that is correct, so the handler itself must authenticate.
11
+
12
+ ## What to check
13
+
14
+ 1. **Signature verification exists and runs first.** The handler must verify the provider's signature against the raw request body (`await request.text()`, not a parsed-then-reserialized JSON) using the signing secret, and reject on failure, before reading or acting on the event. For Stripe that is `stripe.webhooks.constructEvent` with the `stripe-signature` header. A handler that reads `request.json()` and acts on it is forgeable.
15
+ 2. **Verification is not decorative.** Look for code that reads the header but never uses it, catches the verification error and continues, or compares signatures with `==` on a value the caller controls.
16
+ 3. **Replay protection.** Is there a timestamp tolerance (the provider libraries default to five minutes for Stripe), and idempotent handling by event id so a replay cannot repeat a side effect?
17
+ 4. **Secrets per endpoint and per mode.** The signing secret comes from the environment, differs between test and live, and is not logged.
18
+ 5. **Cron and internal routes.** Are they protected by a shared secret (`Authorization: Bearer $CRON_SECRET`) or the platform's cron header check, with a constant-time comparison? A public `/api/cron/cleanup` that deletes data is a finding.
19
+ 6. **What the handler does with the payload.** Even a verified event should be treated as input: look up records by id and check ownership, do not trust fields like `customer_email` to pick which account to upgrade without matching the stored Stripe customer id.
20
+ 7. **OAuth callbacks.** `state` is generated per session, stored server-side and compared; redirect targets are allow-listed (see `input-handling.md`); tokens are stored server-side and scoped minimally.
21
+ 8. **Outbound requests to user-supplied URLs** (webhook delivery to customers): block private and metadata addresses, set timeouts, and never forward internal credentials (SSRF; see `input-handling.md`).
22
+ 9. **Error responses.** Returning detailed errors or stack traces to the caller helps an attacker; return 400 with a short message.
23
+
24
+ ## Prove it
25
+
26
+ Post an unsigned or wrongly signed event to the handler and assert that nothing changed.
27
+
28
+ ```js
29
+ test('an unsigned provider event does not change account state', async () => {
30
+ store.accounts.push({ id: 'acct-9', plan: 'free' });
31
+ const forged = { type: 'subscription.activated', data: { object: { account: 'acct-9' } } };
32
+ const res = await POST({ body: forged, headers: {} }); // no signature header
33
+ assert.equal(store.accounts.find((a) => a.id === 'acct-9').plan, 'free'); // fails while the handler trusts the body
34
+ assert.ok(res.status >= 400);
35
+ });
36
+ ```
37
+
38
+ Add the positive case when the project has a helper that signs test payloads (Stripe's `generateTestHeaderString`), and assert a correctly signed event still works. Never use a real webhook secret in a test; generate one at test time.
39
+
40
+ ## Severity guidance
41
+
42
+ - **Critical**: an unauthenticated request can forge payment, account-upgrade or deletion events, or trigger destructive cron work.
43
+ - **High**: signature present but bypassable (for example verified only for some event types), or replays repeat a financial side effect.
44
+ - **Medium**: no replay tolerance where the handler is idempotent anyway; webhook secret shared across test and live.
45
+ - **Low**: verbose errors, missing rate limiting.
46
+
47
+ ## Common false positives
48
+
49
+ - A webhook that only logs or enqueues a harmless notification and changes no state.
50
+ - Signature verification done in a shared middleware or wrapper (`withStripeVerification`). Read it and confirm it covers the route.
51
+ - Provider IP allow-listing as an extra layer: fine, but it does not replace a signature.
52
+ - Public routes that are meant to be public (health, status, unsubscribe links with a signed token).
@@ -0,0 +1,41 @@
1
+ rules:
2
+ - id: vsg-ai-key-public-env
3
+ languages: [typescript, javascript]
4
+ severity: ERROR
5
+ message: >-
6
+ An AI provider key (OpenAI, Anthropic and similar) is read from a public environment variable (NEXT_PUBLIC_, EXPO_PUBLIC_, VITE_ and similar prefixes). Frameworks inline these variables into the browser or app bundle, so anyone can copy the key from your site and spend your credits or abuse your account.
7
+ Keep the key in a server-only variable and call the AI provider from a route handler or server action that checks the user first.
8
+ metadata:
9
+ vsg-blocking: true
10
+ vsg-title: AI provider key behind a public environment variable
11
+ vsg-fix: Rename the variable so it has no public prefix, call the AI provider only from server-side code that authenticates and rate limits the user, and rotate the key because it may already be public.
12
+ cwe: "CWE-200: Exposure of Sensitive Information to an Unauthorized Actor"
13
+ owasp: "A01:2025 - Broken Access Control"
14
+ category: security
15
+ confidence: HIGH
16
+ technology: [openai, anthropic, nextjs, expo]
17
+ patterns:
18
+ - pattern-either:
19
+ - pattern: process.env.$NAME
20
+ - pattern: process.env[$NAME]
21
+ - pattern: import.meta.env.$NAME
22
+ - metavariable-regex:
23
+ metavariable: $NAME
24
+ regex: (?i)^["'`]?(NEXT_PUBLIC|EXPO_PUBLIC|VITE|REACT_APP|GATSBY|NUXT_PUBLIC|PUBLIC)_[A-Z0-9_]*(OPENAI|ANTHROPIC|CLAUDE|GEMINI|GROQ|MISTRAL|COHERE|DEEPSEEK|OPENROUTER|XAI)[A-Z0-9_]*(KEY|TOKEN|SECRET)
25
+ - id: vsg-ai-dangerously-allow-browser
26
+ languages: [typescript, javascript]
27
+ severity: ERROR
28
+ message: >-
29
+ dangerouslyAllowBrowser: true makes an AI SDK client run in the browser, which means its API key has to ship to every visitor. Anyone can copy the key from your site and spend your credits or abuse your account.
30
+ Call the AI provider from server-side code (a route handler or server action) that checks the user, and keep the key in a server-only variable.
31
+ metadata:
32
+ vsg-blocking: true
33
+ vsg-title: AI SDK client allowed to run in the browser (dangerouslyAllowBrowser)
34
+ vsg-fix: Remove dangerouslyAllowBrowser, move the AI call to a server-side route handler or server action that authenticates and rate limits the user, and rotate the key because it may already be public.
35
+ cwe: "CWE-798: Use of Hard-coded Credentials"
36
+ owasp: "A07:2025 - Authentication Failures"
37
+ category: security
38
+ confidence: HIGH
39
+ technology: [openai, anthropic]
40
+ pattern: |
41
+ {..., dangerouslyAllowBrowser: true, ...}
@@ -0,0 +1,35 @@
1
+ rules:
2
+ - id: vsg-ai-output-raw-html
3
+ languages: [typescript, javascript]
4
+ mode: taint
5
+ severity: WARNING
6
+ message: >-
7
+ Text generated by an AI model is rendered as raw HTML with dangerouslySetInnerHTML. Model output can contain attacker-controlled markup (for example through prompt injection from a web page or document the model read), which turns into cross-site scripting in your users' browsers.
8
+ Render the text as plain text or through a Markdown renderer that does not allow raw HTML, or sanitize it with DOMPurify first.
9
+ metadata:
10
+ vsg-title: AI model output rendered as raw HTML
11
+ vsg-fix: Render the model output as text or with a Markdown renderer that escapes HTML, or pass it through DOMPurify.sanitize() before using dangerouslySetInnerHTML.
12
+ cwe: "CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"
13
+ owasp: "A05:2025 - Injection"
14
+ category: security
15
+ confidence: MEDIUM
16
+ technology: [react, openai, anthropic]
17
+ pattern-sources:
18
+ - pattern: await $C.chat.completions.create(...)
19
+ - pattern: await $C.messages.create(...)
20
+ - pattern: await $C.responses.create(...)
21
+ - pattern: await $M.generateContent(...)
22
+ - pattern: await generateText(...)
23
+ - pattern: await generateObject(...)
24
+ - pattern: useChat(...)
25
+ - pattern: useCompletion(...)
26
+ pattern-sanitizers:
27
+ - pattern: DOMPurify.sanitize(...)
28
+ - pattern: $P.sanitize(...)
29
+ - pattern: sanitizeHtml(...)
30
+ - pattern: xss(...)
31
+ pattern-sinks:
32
+ - patterns:
33
+ - pattern: |
34
+ <$C ... dangerouslySetInnerHTML={{ __html: $SINK }} ... />
35
+ - focus-metavariable: $SINK
@@ -0,0 +1,23 @@
1
+ rules:
2
+ - id: vsg-angular-sanitizer-bypass
3
+ languages: [typescript]
4
+ severity: WARNING
5
+ message: >-
6
+ DomSanitizer.bypassSecurityTrustHtml, bypassSecurityTrustScript, bypassSecurityTrustUrl and bypassSecurityTrustResourceUrl switch off Angular's built-in cross-site scripting protection for the value you pass in. Here the value is not a string literal, so if any part of it comes from a URL parameter, an API response or user input, an attacker can run script in your users' browsers.
7
+ Bind the value normally and let Angular sanitize it, or run it through a sanitizer such as DOMPurify before marking it trusted.
8
+ metadata:
9
+ vsg-title: Angular sanitizer bypass on a non-constant value
10
+ vsg-fix: Remove the bypassSecurityTrust call and bind the value normally so Angular sanitizes it. If real HTML is needed, pass it through DOMPurify.sanitize() first and only then call bypassSecurityTrustHtml.
11
+ cwe: "CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"
12
+ owasp: "A05:2025 - Injection"
13
+ category: security
14
+ confidence: MEDIUM
15
+ technology: [angular]
16
+ patterns:
17
+ - pattern-either:
18
+ - pattern: $S.bypassSecurityTrustHtml($ARG)
19
+ - pattern: $S.bypassSecurityTrustScript($ARG)
20
+ - pattern: $S.bypassSecurityTrustUrl($ARG)
21
+ - pattern: $S.bypassSecurityTrustResourceUrl($ARG)
22
+ - pattern-not: $S.$F("...")
23
+ - pattern-not: $S.$F(DOMPurify.sanitize(...))
@@ -0,0 +1,22 @@
1
+ rules:
2
+ - id: vsg-expo-token-in-asyncstorage
3
+ languages: [typescript, javascript]
4
+ severity: WARNING
5
+ message: >-
6
+ A token, session or credential is saved with AsyncStorage, which stores plain unencrypted text that other apps on a rooted or jailbroken device, device backups and anyone with the device files can read.
7
+ Store tokens with expo-secure-store (SecureStore.setItemAsync) or react-native-keychain instead.
8
+ metadata:
9
+ vsg-title: Token stored in AsyncStorage
10
+ vsg-fix: Replace AsyncStorage.setItem for this value with SecureStore.setItemAsync (expo-secure-store) or react-native-keychain, and clear the old AsyncStorage entry on upgrade.
11
+ cwe: "CWE-312: Cleartext Storage of Sensitive Information"
12
+ owasp: "A04:2025 - Cryptographic Failures"
13
+ category: security
14
+ confidence: MEDIUM
15
+ technology: [expo, react-native]
16
+ patterns:
17
+ - pattern-either:
18
+ - pattern: AsyncStorage.setItem($KEY, ...)
19
+ - pattern: $NS.AsyncStorage.setItem($KEY, ...)
20
+ - metavariable-regex:
21
+ metavariable: $KEY
22
+ regex: (?i)^["'`].*(token|session|jwt|refresh|credential|secret|password|auth(?!or)).*["'`]$
@@ -0,0 +1,32 @@
1
+ rules:
2
+ - id: vsg-flask-public-bind
3
+ languages: [python]
4
+ severity: WARNING
5
+ message: >-
6
+ This Flask app listens on every network interface (host 0.0.0.0 or ::), so any device on the same network, and the internet if the port is forwarded, can call its routes.
7
+ A service that is reachable from the LAN needs authentication on its routes. A license check or a CORS setting is not authentication.
8
+ Bind to 127.0.0.1 unless remote access is intended, and when it is, require a session or a per-run token on every route that reads or changes data (see the desktop playbook, local servers and IPC).
9
+ metadata:
10
+ vsg-blocking: false
11
+ vsg-severity: high
12
+ vsg-title: Flask server listens on all network interfaces
13
+ vsg-fix: Bind to 127.0.0.1 by default. If other devices must connect, require authentication (a login session or a per-run token compared in constant time) in a before_request hook or on each route, and add a firewall rule for the port. See playbook/desktop-python.md (local servers and IPC).
14
+ cwe: "CWE-1327: Binding to an Unrestricted IP Address"
15
+ owasp: "A02:2025 - Security Misconfiguration"
16
+ category: security
17
+ confidence: MEDIUM
18
+ technology: [flask, python]
19
+ patterns:
20
+ - pattern-either:
21
+ - pattern: $APP.run(..., host="0.0.0.0", ...)
22
+ - pattern: $APP.run(..., host="::", ...)
23
+ - pattern: $APP.run("0.0.0.0", ...)
24
+ - pattern: $APP.run("::", ...)
25
+ - pattern-inside:
26
+ pattern-either:
27
+ - pattern: |
28
+ $APP = Flask(...)
29
+ ...
30
+ - pattern: |
31
+ $APP = flask.Flask(...)
32
+ ...
@@ -0,0 +1,144 @@
1
+ rules:
2
+ - id: vsg-nextjs-action-write-no-auth
3
+ languages: [typescript, javascript]
4
+ severity: ERROR
5
+ message: >-
6
+ This "use server" action writes data (Supabase or Prisma) but never checks who is calling it. Server actions are public POST endpoints, so anyone can call them with any arguments.
7
+ Check the session inside the action before the write (for example supabase.auth.getUser(), auth(), getServerSession() or currentUser()), reject the call when there is no user, and scope the write to that user.
8
+ metadata:
9
+ vsg-blocking: true
10
+ vsg-title: Server action writes data without checking the caller
11
+ vsg-fix: Call your auth check (supabase.auth.getUser(), auth(), getServerSession() or currentUser()) at the top of the action, throw or return an error when there is no user, and scope the write to that user.
12
+ cwe: "CWE-862: Missing Authorization"
13
+ owasp: "A01:2025 - Broken Access Control"
14
+ category: security
15
+ confidence: HIGH
16
+ technology: [nextjs, supabase, prisma]
17
+ patterns:
18
+ - pattern-either:
19
+ - pattern: $SB.from(...).insert(...)
20
+ - pattern: $SB.from(...).update(...)
21
+ - pattern: $SB.from(...).upsert(...)
22
+ - pattern: $SB.from(...).delete(...)
23
+ - pattern: prisma.$M.create(...)
24
+ - pattern: prisma.$M.createMany(...)
25
+ - pattern: prisma.$M.update(...)
26
+ - pattern: prisma.$M.updateMany(...)
27
+ - pattern: prisma.$M.upsert(...)
28
+ - pattern: prisma.$M.delete(...)
29
+ - pattern: prisma.$M.deleteMany(...)
30
+ - pattern-inside: |
31
+ "use server"
32
+ ...
33
+ - pattern-inside:
34
+ pattern-either:
35
+ - pattern: |
36
+ export async function $F(...) { ... }
37
+ - pattern: |
38
+ export const $F = async (...) => { ... }
39
+ - pattern-not-inside:
40
+ patterns:
41
+ - pattern-either:
42
+ - pattern: |
43
+ export async function $F(...) {
44
+ ...
45
+ <... $FN(...) ...>
46
+ ...
47
+ }
48
+ - pattern: |
49
+ export const $F = async (...) => {
50
+ ...
51
+ <... $FN(...) ...>
52
+ ...
53
+ }
54
+ - metavariable-regex:
55
+ metavariable: $FN
56
+ regex: ^(.*\.)?(auth|getAuth|getUser|getSession|getClaims|getServerSession|currentUser|get(?!\w*By(Id|Email))\w*User\w*|getCurrentUser\w*|(require|assert|ensure)\w*(User|Auth|Session|Context|Admin|Member|Role|Permission|Owner|Access)\w*|verify\w*(Signature|Webhook|Token|Jwt)\w*|constructEvent|constructEventAsync|validateRequest|jwtVerify|timingSafeEqual\w*|__vsg_discovered__)$
57
+ # Shared-secret checks (cron and webhook routes): the Authorization header compared with a secret, usually "Bearer <secret>".
58
+ - pattern-not-inside:
59
+ pattern-either:
60
+ - pattern: |
61
+ export async function $F(...) {
62
+ ...
63
+ <... $A === `Bearer ${...}` ...>
64
+ ...
65
+ }
66
+ - pattern: |
67
+ export async function $F(...) {
68
+ ...
69
+ <... $A !== `Bearer ${...}` ...>
70
+ ...
71
+ }
72
+ - pattern: |
73
+ export const $F = async (...) => {
74
+ ...
75
+ <... $A === `Bearer ${...}` ...>
76
+ ...
77
+ }
78
+ - pattern: |
79
+ export const $F = async (...) => {
80
+ ...
81
+ <... $A !== `Bearer ${...}` ...>
82
+ ...
83
+ }
84
+ - patterns:
85
+ - pattern-either:
86
+ - pattern: |
87
+ export async function $F(...) {
88
+ ...
89
+ <... $R.headers.get($HN) === $X ...>
90
+ ...
91
+ }
92
+ - pattern: |
93
+ export async function $F(...) {
94
+ ...
95
+ <... $R.headers.get($HN) !== $X ...>
96
+ ...
97
+ }
98
+ - pattern: |
99
+ export async function $F(...) {
100
+ ...
101
+ $H = $R.headers.get($HN)
102
+ ...
103
+ <... $H === $X ...>
104
+ ...
105
+ }
106
+ - pattern: |
107
+ export async function $F(...) {
108
+ ...
109
+ $H = $R.headers.get($HN)
110
+ ...
111
+ <... $H !== $X ...>
112
+ ...
113
+ }
114
+ - pattern: |
115
+ export const $F = async (...) => {
116
+ ...
117
+ <... $R.headers.get($HN) === $X ...>
118
+ ...
119
+ }
120
+ - pattern: |
121
+ export const $F = async (...) => {
122
+ ...
123
+ <... $R.headers.get($HN) !== $X ...>
124
+ ...
125
+ }
126
+ - pattern: |
127
+ export const $F = async (...) => {
128
+ ...
129
+ $H = $R.headers.get($HN)
130
+ ...
131
+ <... $H === $X ...>
132
+ ...
133
+ }
134
+ - pattern: |
135
+ export const $F = async (...) => {
136
+ ...
137
+ $H = $R.headers.get($HN)
138
+ ...
139
+ <... $H !== $X ...>
140
+ ...
141
+ }
142
+ - metavariable-regex:
143
+ metavariable: $HN
144
+ regex: (?i)^["']authorization["']$