@opensip-cli/checks-universal 0.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 (620) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +31 -0
  4. package/dist/__tests__/all-checks-execute.test.d.ts +17 -0
  5. package/dist/__tests__/all-checks-execute.test.d.ts.map +1 -0
  6. package/dist/__tests__/all-checks-execute.test.js +452 -0
  7. package/dist/__tests__/all-checks-execute.test.js.map +1 -0
  8. package/dist/__tests__/behavior-fixtures-10.test.d.ts +8 -0
  9. package/dist/__tests__/behavior-fixtures-10.test.d.ts.map +1 -0
  10. package/dist/__tests__/behavior-fixtures-10.test.js +200 -0
  11. package/dist/__tests__/behavior-fixtures-10.test.js.map +1 -0
  12. package/dist/__tests__/behavior-fixtures-11.test.d.ts +8 -0
  13. package/dist/__tests__/behavior-fixtures-11.test.d.ts.map +1 -0
  14. package/dist/__tests__/behavior-fixtures-11.test.js +120 -0
  15. package/dist/__tests__/behavior-fixtures-11.test.js.map +1 -0
  16. package/dist/__tests__/behavior-fixtures-12.test.d.ts +8 -0
  17. package/dist/__tests__/behavior-fixtures-12.test.d.ts.map +1 -0
  18. package/dist/__tests__/behavior-fixtures-12.test.js +157 -0
  19. package/dist/__tests__/behavior-fixtures-12.test.js.map +1 -0
  20. package/dist/__tests__/behavior-fixtures-2.test.d.ts +8 -0
  21. package/dist/__tests__/behavior-fixtures-2.test.d.ts.map +1 -0
  22. package/dist/__tests__/behavior-fixtures-2.test.js +785 -0
  23. package/dist/__tests__/behavior-fixtures-2.test.js.map +1 -0
  24. package/dist/__tests__/behavior-fixtures-3.test.d.ts +6 -0
  25. package/dist/__tests__/behavior-fixtures-3.test.d.ts.map +1 -0
  26. package/dist/__tests__/behavior-fixtures-3.test.js +663 -0
  27. package/dist/__tests__/behavior-fixtures-3.test.js.map +1 -0
  28. package/dist/__tests__/behavior-fixtures-4.test.d.ts +5 -0
  29. package/dist/__tests__/behavior-fixtures-4.test.d.ts.map +1 -0
  30. package/dist/__tests__/behavior-fixtures-4.test.js +612 -0
  31. package/dist/__tests__/behavior-fixtures-4.test.js.map +1 -0
  32. package/dist/__tests__/behavior-fixtures-5.test.d.ts +5 -0
  33. package/dist/__tests__/behavior-fixtures-5.test.d.ts.map +1 -0
  34. package/dist/__tests__/behavior-fixtures-5.test.js +469 -0
  35. package/dist/__tests__/behavior-fixtures-5.test.js.map +1 -0
  36. package/dist/__tests__/behavior-fixtures-6.test.d.ts +8 -0
  37. package/dist/__tests__/behavior-fixtures-6.test.d.ts.map +1 -0
  38. package/dist/__tests__/behavior-fixtures-6.test.js +591 -0
  39. package/dist/__tests__/behavior-fixtures-6.test.js.map +1 -0
  40. package/dist/__tests__/behavior-fixtures-7.test.d.ts +5 -0
  41. package/dist/__tests__/behavior-fixtures-7.test.d.ts.map +1 -0
  42. package/dist/__tests__/behavior-fixtures-7.test.js +662 -0
  43. package/dist/__tests__/behavior-fixtures-7.test.js.map +1 -0
  44. package/dist/__tests__/behavior-fixtures-8.test.d.ts +11 -0
  45. package/dist/__tests__/behavior-fixtures-8.test.d.ts.map +1 -0
  46. package/dist/__tests__/behavior-fixtures-8.test.js +634 -0
  47. package/dist/__tests__/behavior-fixtures-8.test.js.map +1 -0
  48. package/dist/__tests__/behavior-fixtures-9.test.d.ts +11 -0
  49. package/dist/__tests__/behavior-fixtures-9.test.d.ts.map +1 -0
  50. package/dist/__tests__/behavior-fixtures-9.test.js +271 -0
  51. package/dist/__tests__/behavior-fixtures-9.test.js.map +1 -0
  52. package/dist/__tests__/behavior-fixtures.test.d.ts +14 -0
  53. package/dist/__tests__/behavior-fixtures.test.d.ts.map +1 -0
  54. package/dist/__tests__/behavior-fixtures.test.js +1423 -0
  55. package/dist/__tests__/behavior-fixtures.test.js.map +1 -0
  56. package/dist/__tests__/checks.test.d.ts +2 -0
  57. package/dist/__tests__/checks.test.d.ts.map +1 -0
  58. package/dist/__tests__/checks.test.js +61 -0
  59. package/dist/__tests__/checks.test.js.map +1 -0
  60. package/dist/__tests__/env-var-validation.test.d.ts +14 -0
  61. package/dist/__tests__/env-var-validation.test.d.ts.map +1 -0
  62. package/dist/__tests__/env-var-validation.test.js +53 -0
  63. package/dist/__tests__/env-var-validation.test.js.map +1 -0
  64. package/dist/__tests__/file-length-limit.test.d.ts +2 -0
  65. package/dist/__tests__/file-length-limit.test.d.ts.map +1 -0
  66. package/dist/__tests__/file-length-limit.test.js +29 -0
  67. package/dist/__tests__/file-length-limit.test.js.map +1 -0
  68. package/dist/__tests__/fixture-coverage.allowlist.d.ts +18 -0
  69. package/dist/__tests__/fixture-coverage.allowlist.d.ts.map +1 -0
  70. package/dist/__tests__/fixture-coverage.allowlist.js +35 -0
  71. package/dist/__tests__/fixture-coverage.allowlist.js.map +1 -0
  72. package/dist/__tests__/fixture-coverage.test.d.ts +13 -0
  73. package/dist/__tests__/fixture-coverage.test.d.ts.map +1 -0
  74. package/dist/__tests__/fixture-coverage.test.js +57 -0
  75. package/dist/__tests__/fixture-coverage.test.js.map +1 -0
  76. package/dist/__tests__/iic.test.d.ts +15 -0
  77. package/dist/__tests__/iic.test.d.ts.map +1 -0
  78. package/dist/__tests__/iic.test.js +316 -0
  79. package/dist/__tests__/iic.test.js.map +1 -0
  80. package/dist/__tests__/no-skipped-tests.test.d.ts +14 -0
  81. package/dist/__tests__/no-skipped-tests.test.d.ts.map +1 -0
  82. package/dist/__tests__/no-skipped-tests.test.js +144 -0
  83. package/dist/__tests__/no-skipped-tests.test.js.map +1 -0
  84. package/dist/__tests__/no-todo-comments.test.d.ts +2 -0
  85. package/dist/__tests__/no-todo-comments.test.d.ts.map +1 -0
  86. package/dist/__tests__/no-todo-comments.test.js +31 -0
  87. package/dist/__tests__/no-todo-comments.test.js.map +1 -0
  88. package/dist/__tests__/no-unimplemented-markers.test.d.ts +2 -0
  89. package/dist/__tests__/no-unimplemented-markers.test.d.ts.map +1 -0
  90. package/dist/__tests__/no-unimplemented-markers.test.js +140 -0
  91. package/dist/__tests__/no-unimplemented-markers.test.js.map +1 -0
  92. package/dist/__tests__/public-api-jsdoc-scope.test.d.ts +10 -0
  93. package/dist/__tests__/public-api-jsdoc-scope.test.d.ts.map +1 -0
  94. package/dist/__tests__/public-api-jsdoc-scope.test.js +176 -0
  95. package/dist/__tests__/public-api-jsdoc-scope.test.js.map +1 -0
  96. package/dist/__tests__/resilience-fp.test.d.ts +14 -0
  97. package/dist/__tests__/resilience-fp.test.d.ts.map +1 -0
  98. package/dist/__tests__/resilience-fp.test.js +110 -0
  99. package/dist/__tests__/resilience-fp.test.js.map +1 -0
  100. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.d.ts +2 -0
  101. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.d.ts.map +1 -0
  102. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.js +32 -0
  103. package/dist/checks/architecture/__tests__/no-kebab-option-indexing.test.js.map +1 -0
  104. package/dist/checks/architecture/__tests__/tool-has-manifest.test.d.ts +2 -0
  105. package/dist/checks/architecture/__tests__/tool-has-manifest.test.d.ts.map +1 -0
  106. package/dist/checks/architecture/__tests__/tool-has-manifest.test.js +152 -0
  107. package/dist/checks/architecture/__tests__/tool-has-manifest.test.js.map +1 -0
  108. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.d.ts +2 -0
  109. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.d.ts.map +1 -0
  110. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.js +129 -0
  111. package/dist/checks/architecture/__tests__/vitest-config-required-with-tests.test.js.map +1 -0
  112. package/dist/checks/architecture/_yaml-doc-bindings.d.ts +23 -0
  113. package/dist/checks/architecture/_yaml-doc-bindings.d.ts.map +1 -0
  114. package/dist/checks/architecture/_yaml-doc-bindings.js +29 -0
  115. package/dist/checks/architecture/_yaml-doc-bindings.js.map +1 -0
  116. package/dist/checks/architecture/dependencies/index.d.ts +2 -0
  117. package/dist/checks/architecture/dependencies/index.d.ts.map +1 -0
  118. package/dist/checks/architecture/dependencies/index.js +2 -0
  119. package/dist/checks/architecture/dependencies/index.js.map +1 -0
  120. package/dist/checks/architecture/dependencies/no-duplicate-packages.d.ts +11 -0
  121. package/dist/checks/architecture/dependencies/no-duplicate-packages.d.ts.map +1 -0
  122. package/dist/checks/architecture/dependencies/no-duplicate-packages.js +171 -0
  123. package/dist/checks/architecture/dependencies/no-duplicate-packages.js.map +1 -0
  124. package/dist/checks/architecture/docker-best-practices.d.ts +23 -0
  125. package/dist/checks/architecture/docker-best-practices.d.ts.map +1 -0
  126. package/dist/checks/architecture/docker-best-practices.js +427 -0
  127. package/dist/checks/architecture/docker-best-practices.js.map +1 -0
  128. package/dist/checks/architecture/docker-ignore-validation.d.ts +18 -0
  129. package/dist/checks/architecture/docker-ignore-validation.d.ts.map +1 -0
  130. package/dist/checks/architecture/docker-ignore-validation.js +117 -0
  131. package/dist/checks/architecture/docker-ignore-validation.js.map +1 -0
  132. package/dist/checks/architecture/docker-version-sync.d.ts +16 -0
  133. package/dist/checks/architecture/docker-version-sync.d.ts.map +1 -0
  134. package/dist/checks/architecture/docker-version-sync.js +193 -0
  135. package/dist/checks/architecture/docker-version-sync.js.map +1 -0
  136. package/dist/checks/architecture/env-var-validation.d.ts +14 -0
  137. package/dist/checks/architecture/env-var-validation.d.ts.map +1 -0
  138. package/dist/checks/architecture/env-var-validation.js +289 -0
  139. package/dist/checks/architecture/env-var-validation.js.map +1 -0
  140. package/dist/checks/architecture/heavy-import-detection.d.ts +11 -0
  141. package/dist/checks/architecture/heavy-import-detection.d.ts.map +1 -0
  142. package/dist/checks/architecture/heavy-import-detection.js +91 -0
  143. package/dist/checks/architecture/heavy-import-detection.js.map +1 -0
  144. package/dist/checks/architecture/index.d.ts +16 -0
  145. package/dist/checks/architecture/index.d.ts.map +1 -0
  146. package/dist/checks/architecture/index.js +16 -0
  147. package/dist/checks/architecture/index.js.map +1 -0
  148. package/dist/checks/architecture/modules/empty-package-detection.d.ts +11 -0
  149. package/dist/checks/architecture/modules/empty-package-detection.d.ts.map +1 -0
  150. package/dist/checks/architecture/modules/empty-package-detection.js +277 -0
  151. package/dist/checks/architecture/modules/empty-package-detection.js.map +1 -0
  152. package/dist/checks/architecture/modules/index.d.ts +3 -0
  153. package/dist/checks/architecture/modules/index.d.ts.map +1 -0
  154. package/dist/checks/architecture/modules/index.js +3 -0
  155. package/dist/checks/architecture/modules/index.js.map +1 -0
  156. package/dist/checks/architecture/modules/interface-implementation-consistency.d.ts +12 -0
  157. package/dist/checks/architecture/modules/interface-implementation-consistency.d.ts.map +1 -0
  158. package/dist/checks/architecture/modules/interface-implementation-consistency.js +555 -0
  159. package/dist/checks/architecture/modules/interface-implementation-consistency.js.map +1 -0
  160. package/dist/checks/architecture/no-custom-event-emitter.d.ts +11 -0
  161. package/dist/checks/architecture/no-custom-event-emitter.d.ts.map +1 -0
  162. package/dist/checks/architecture/no-custom-event-emitter.js +123 -0
  163. package/dist/checks/architecture/no-custom-event-emitter.js.map +1 -0
  164. package/dist/checks/architecture/no-kebab-option-indexing.d.ts +33 -0
  165. package/dist/checks/architecture/no-kebab-option-indexing.d.ts.map +1 -0
  166. package/dist/checks/architecture/no-kebab-option-indexing.js +81 -0
  167. package/dist/checks/architecture/no-kebab-option-indexing.js.map +1 -0
  168. package/dist/checks/architecture/node-version-consistency.d.ts +22 -0
  169. package/dist/checks/architecture/node-version-consistency.d.ts.map +1 -0
  170. package/dist/checks/architecture/node-version-consistency.js +225 -0
  171. package/dist/checks/architecture/node-version-consistency.js.map +1 -0
  172. package/dist/checks/architecture/project-readme-existence.d.ts +13 -0
  173. package/dist/checks/architecture/project-readme-existence.d.ts.map +1 -0
  174. package/dist/checks/architecture/project-readme-existence.js +55 -0
  175. package/dist/checks/architecture/project-readme-existence.js.map +1 -0
  176. package/dist/checks/architecture/stale-build-artifacts.d.ts +10 -0
  177. package/dist/checks/architecture/stale-build-artifacts.d.ts.map +1 -0
  178. package/dist/checks/architecture/stale-build-artifacts.js +55 -0
  179. package/dist/checks/architecture/stale-build-artifacts.js.map +1 -0
  180. package/dist/checks/architecture/tool-has-manifest.d.ts +27 -0
  181. package/dist/checks/architecture/tool-has-manifest.d.ts.map +1 -0
  182. package/dist/checks/architecture/tool-has-manifest.js +135 -0
  183. package/dist/checks/architecture/tool-has-manifest.js.map +1 -0
  184. package/dist/checks/architecture/vitest-config-extends-base.d.ts +15 -0
  185. package/dist/checks/architecture/vitest-config-extends-base.d.ts.map +1 -0
  186. package/dist/checks/architecture/vitest-config-extends-base.js +104 -0
  187. package/dist/checks/architecture/vitest-config-extends-base.js.map +1 -0
  188. package/dist/checks/architecture/vitest-config-required-with-tests.d.ts +49 -0
  189. package/dist/checks/architecture/vitest-config-required-with-tests.d.ts.map +1 -0
  190. package/dist/checks/architecture/vitest-config-required-with-tests.js +199 -0
  191. package/dist/checks/architecture/vitest-config-required-with-tests.js.map +1 -0
  192. package/dist/checks/documentation/_directives/eslint.d.ts +9 -0
  193. package/dist/checks/documentation/_directives/eslint.d.ts.map +1 -0
  194. package/dist/checks/documentation/_directives/eslint.js +168 -0
  195. package/dist/checks/documentation/_directives/eslint.js.map +1 -0
  196. package/dist/checks/documentation/_directives/fitness.d.ts +9 -0
  197. package/dist/checks/documentation/_directives/fitness.d.ts.map +1 -0
  198. package/dist/checks/documentation/_directives/fitness.js +64 -0
  199. package/dist/checks/documentation/_directives/fitness.js.map +1 -0
  200. package/dist/checks/documentation/_directives/graph.d.ts +10 -0
  201. package/dist/checks/documentation/_directives/graph.d.ts.map +1 -0
  202. package/dist/checks/documentation/_directives/graph.js +65 -0
  203. package/dist/checks/documentation/_directives/graph.js.map +1 -0
  204. package/dist/checks/documentation/_directives/graph.test.d.ts +2 -0
  205. package/dist/checks/documentation/_directives/graph.test.d.ts.map +1 -0
  206. package/dist/checks/documentation/_directives/graph.test.js +54 -0
  207. package/dist/checks/documentation/_directives/graph.test.js.map +1 -0
  208. package/dist/checks/documentation/_directives/semgrep.d.ts +8 -0
  209. package/dist/checks/documentation/_directives/semgrep.d.ts.map +1 -0
  210. package/dist/checks/documentation/_directives/semgrep.js +72 -0
  211. package/dist/checks/documentation/_directives/semgrep.js.map +1 -0
  212. package/dist/checks/documentation/_directives/types.d.ts +21 -0
  213. package/dist/checks/documentation/_directives/types.d.ts.map +1 -0
  214. package/dist/checks/documentation/_directives/types.js +9 -0
  215. package/dist/checks/documentation/_directives/types.js.map +1 -0
  216. package/dist/checks/documentation/_directives/typescript.d.ts +10 -0
  217. package/dist/checks/documentation/_directives/typescript.d.ts.map +1 -0
  218. package/dist/checks/documentation/_directives/typescript.js +54 -0
  219. package/dist/checks/documentation/_directives/typescript.js.map +1 -0
  220. package/dist/checks/documentation/_public-api-graph.d.ts +30 -0
  221. package/dist/checks/documentation/_public-api-graph.d.ts.map +1 -0
  222. package/dist/checks/documentation/_public-api-graph.js +304 -0
  223. package/dist/checks/documentation/_public-api-graph.js.map +1 -0
  224. package/dist/checks/documentation/directive-audit.d.ts +26 -0
  225. package/dist/checks/documentation/directive-audit.d.ts.map +1 -0
  226. package/dist/checks/documentation/directive-audit.js +144 -0
  227. package/dist/checks/documentation/directive-audit.js.map +1 -0
  228. package/dist/checks/documentation/index.d.ts +3 -0
  229. package/dist/checks/documentation/index.d.ts.map +1 -0
  230. package/dist/checks/documentation/index.js +3 -0
  231. package/dist/checks/documentation/index.js.map +1 -0
  232. package/dist/checks/documentation/public-api-jsdoc.d.ts +10 -0
  233. package/dist/checks/documentation/public-api-jsdoc.d.ts.map +1 -0
  234. package/dist/checks/documentation/public-api-jsdoc.js +131 -0
  235. package/dist/checks/documentation/public-api-jsdoc.js.map +1 -0
  236. package/dist/checks/file-length-limit.d.ts +16 -0
  237. package/dist/checks/file-length-limit.d.ts.map +1 -0
  238. package/dist/checks/file-length-limit.js +47 -0
  239. package/dist/checks/file-length-limit.js.map +1 -0
  240. package/dist/checks/index.d.ts +16 -0
  241. package/dist/checks/index.d.ts.map +1 -0
  242. package/dist/checks/index.js +16 -0
  243. package/dist/checks/index.js.map +1 -0
  244. package/dist/checks/no-todo-comments.d.ts +18 -0
  245. package/dist/checks/no-todo-comments.d.ts.map +1 -0
  246. package/dist/checks/no-todo-comments.js +79 -0
  247. package/dist/checks/no-todo-comments.js.map +1 -0
  248. package/dist/checks/no-unimplemented-markers.d.ts +24 -0
  249. package/dist/checks/no-unimplemented-markers.d.ts.map +1 -0
  250. package/dist/checks/no-unimplemented-markers.js +198 -0
  251. package/dist/checks/no-unimplemented-markers.js.map +1 -0
  252. package/dist/checks/quality/api/graphql-offset-pagination.d.ts +9 -0
  253. package/dist/checks/quality/api/graphql-offset-pagination.d.ts.map +1 -0
  254. package/dist/checks/quality/api/graphql-offset-pagination.js +63 -0
  255. package/dist/checks/quality/api/graphql-offset-pagination.js.map +1 -0
  256. package/dist/checks/quality/api/index.d.ts +3 -0
  257. package/dist/checks/quality/api/index.d.ts.map +1 -0
  258. package/dist/checks/quality/api/index.js +3 -0
  259. package/dist/checks/quality/api/index.js.map +1 -0
  260. package/dist/checks/quality/api/zod-openapi-sync.d.ts +13 -0
  261. package/dist/checks/quality/api/zod-openapi-sync.d.ts.map +1 -0
  262. package/dist/checks/quality/api/zod-openapi-sync.js +88 -0
  263. package/dist/checks/quality/api/zod-openapi-sync.js.map +1 -0
  264. package/dist/checks/quality/code-structure/dead-code.d.ts +12 -0
  265. package/dist/checks/quality/code-structure/dead-code.d.ts.map +1 -0
  266. package/dist/checks/quality/code-structure/dead-code.js +238 -0
  267. package/dist/checks/quality/code-structure/dead-code.js.map +1 -0
  268. package/dist/checks/quality/code-structure/index.d.ts +5 -0
  269. package/dist/checks/quality/code-structure/index.d.ts.map +1 -0
  270. package/dist/checks/quality/code-structure/index.js +5 -0
  271. package/dist/checks/quality/code-structure/index.js.map +1 -0
  272. package/dist/checks/quality/code-structure/no-ai-attribution.d.ts +25 -0
  273. package/dist/checks/quality/code-structure/no-ai-attribution.d.ts.map +1 -0
  274. package/dist/checks/quality/code-structure/no-ai-attribution.js +76 -0
  275. package/dist/checks/quality/code-structure/no-ai-attribution.js.map +1 -0
  276. package/dist/checks/quality/code-structure/no-console-log.d.ts +17 -0
  277. package/dist/checks/quality/code-structure/no-console-log.d.ts.map +1 -0
  278. package/dist/checks/quality/code-structure/no-console-log.js +106 -0
  279. package/dist/checks/quality/code-structure/no-console-log.js.map +1 -0
  280. package/dist/checks/quality/code-structure/no-process-artifacts.d.ts +25 -0
  281. package/dist/checks/quality/code-structure/no-process-artifacts.d.ts.map +1 -0
  282. package/dist/checks/quality/code-structure/no-process-artifacts.js +104 -0
  283. package/dist/checks/quality/code-structure/no-process-artifacts.js.map +1 -0
  284. package/dist/checks/quality/dependency-version-consistency.d.ts +20 -0
  285. package/dist/checks/quality/dependency-version-consistency.d.ts.map +1 -0
  286. package/dist/checks/quality/dependency-version-consistency.js +266 -0
  287. package/dist/checks/quality/dependency-version-consistency.js.map +1 -0
  288. package/dist/checks/quality/fitness-ignore-hygiene.d.ts +10 -0
  289. package/dist/checks/quality/fitness-ignore-hygiene.d.ts.map +1 -0
  290. package/dist/checks/quality/fitness-ignore-hygiene.js +93 -0
  291. package/dist/checks/quality/fitness-ignore-hygiene.js.map +1 -0
  292. package/dist/checks/quality/frontend/expo-vector-icons.d.ts +13 -0
  293. package/dist/checks/quality/frontend/expo-vector-icons.d.ts.map +1 -0
  294. package/dist/checks/quality/frontend/expo-vector-icons.js +80 -0
  295. package/dist/checks/quality/frontend/expo-vector-icons.js.map +1 -0
  296. package/dist/checks/quality/frontend/image-optimization.d.ts +13 -0
  297. package/dist/checks/quality/frontend/image-optimization.d.ts.map +1 -0
  298. package/dist/checks/quality/frontend/image-optimization.js +166 -0
  299. package/dist/checks/quality/frontend/image-optimization.js.map +1 -0
  300. package/dist/checks/quality/frontend/index.d.ts +4 -0
  301. package/dist/checks/quality/frontend/index.d.ts.map +1 -0
  302. package/dist/checks/quality/frontend/index.js +4 -0
  303. package/dist/checks/quality/frontend/index.js.map +1 -0
  304. package/dist/checks/quality/frontend/navigation-typing.d.ts +12 -0
  305. package/dist/checks/quality/frontend/navigation-typing.d.ts.map +1 -0
  306. package/dist/checks/quality/frontend/navigation-typing.js +77 -0
  307. package/dist/checks/quality/frontend/navigation-typing.js.map +1 -0
  308. package/dist/checks/quality/graph-ignore-hygiene.d.ts +10 -0
  309. package/dist/checks/quality/graph-ignore-hygiene.d.ts.map +1 -0
  310. package/dist/checks/quality/graph-ignore-hygiene.js +95 -0
  311. package/dist/checks/quality/graph-ignore-hygiene.js.map +1 -0
  312. package/dist/checks/quality/graph-ignore-hygiene.test.d.ts +14 -0
  313. package/dist/checks/quality/graph-ignore-hygiene.test.d.ts.map +1 -0
  314. package/dist/checks/quality/graph-ignore-hygiene.test.js +58 -0
  315. package/dist/checks/quality/graph-ignore-hygiene.test.js.map +1 -0
  316. package/dist/checks/quality/index.d.ts +16 -0
  317. package/dist/checks/quality/index.d.ts.map +1 -0
  318. package/dist/checks/quality/index.js +16 -0
  319. package/dist/checks/quality/index.js.map +1 -0
  320. package/dist/checks/quality/linting/eslint-justifications.d.ts +12 -0
  321. package/dist/checks/quality/linting/eslint-justifications.d.ts.map +1 -0
  322. package/dist/checks/quality/linting/eslint-justifications.js +328 -0
  323. package/dist/checks/quality/linting/eslint-justifications.js.map +1 -0
  324. package/dist/checks/quality/linting/index.d.ts +4 -0
  325. package/dist/checks/quality/linting/index.d.ts.map +1 -0
  326. package/dist/checks/quality/linting/index.js +4 -0
  327. package/dist/checks/quality/linting/index.js.map +1 -0
  328. package/dist/checks/quality/linting/semgrep-justifications.d.ts +16 -0
  329. package/dist/checks/quality/linting/semgrep-justifications.d.ts.map +1 -0
  330. package/dist/checks/quality/linting/semgrep-justifications.js +229 -0
  331. package/dist/checks/quality/linting/semgrep-justifications.js.map +1 -0
  332. package/dist/checks/quality/linting/typescript-directive-hygiene.d.ts +12 -0
  333. package/dist/checks/quality/linting/typescript-directive-hygiene.d.ts.map +1 -0
  334. package/dist/checks/quality/linting/typescript-directive-hygiene.js +142 -0
  335. package/dist/checks/quality/linting/typescript-directive-hygiene.js.map +1 -0
  336. package/dist/checks/quality/no-compatibility-layer-names.d.ts +13 -0
  337. package/dist/checks/quality/no-compatibility-layer-names.d.ts.map +1 -0
  338. package/dist/checks/quality/no-compatibility-layer-names.js +100 -0
  339. package/dist/checks/quality/no-compatibility-layer-names.js.map +1 -0
  340. package/dist/checks/quality/no-deprecated-tags.d.ts +11 -0
  341. package/dist/checks/quality/no-deprecated-tags.d.ts.map +1 -0
  342. package/dist/checks/quality/no-deprecated-tags.js +76 -0
  343. package/dist/checks/quality/no-deprecated-tags.js.map +1 -0
  344. package/dist/checks/quality/no-markdown-references.d.ts +16 -0
  345. package/dist/checks/quality/no-markdown-references.d.ts.map +1 -0
  346. package/dist/checks/quality/no-markdown-references.js +145 -0
  347. package/dist/checks/quality/no-markdown-references.js.map +1 -0
  348. package/dist/checks/quality/no-raw-regex-on-code.d.ts +9 -0
  349. package/dist/checks/quality/no-raw-regex-on-code.d.ts.map +1 -0
  350. package/dist/checks/quality/no-raw-regex-on-code.js +61 -0
  351. package/dist/checks/quality/no-raw-regex-on-code.js.map +1 -0
  352. package/dist/checks/quality/no-temporary-workarounds.d.ts +11 -0
  353. package/dist/checks/quality/no-temporary-workarounds.d.ts.map +1 -0
  354. package/dist/checks/quality/no-temporary-workarounds.js +69 -0
  355. package/dist/checks/quality/no-temporary-workarounds.js.map +1 -0
  356. package/dist/checks/quality/no-window-alert.d.ts +19 -0
  357. package/dist/checks/quality/no-window-alert.d.ts.map +1 -0
  358. package/dist/checks/quality/no-window-alert.js +74 -0
  359. package/dist/checks/quality/no-window-alert.js.map +1 -0
  360. package/dist/checks/quality/observability/index.d.ts +2 -0
  361. package/dist/checks/quality/observability/index.d.ts.map +1 -0
  362. package/dist/checks/quality/observability/index.js +2 -0
  363. package/dist/checks/quality/observability/index.js.map +1 -0
  364. package/dist/checks/quality/observability/pino-serializer-coverage.d.ts +15 -0
  365. package/dist/checks/quality/observability/pino-serializer-coverage.d.ts.map +1 -0
  366. package/dist/checks/quality/observability/pino-serializer-coverage.js +209 -0
  367. package/dist/checks/quality/observability/pino-serializer-coverage.js.map +1 -0
  368. package/dist/checks/quality/patterns/async-state-pattern.d.ts +14 -0
  369. package/dist/checks/quality/patterns/async-state-pattern.d.ts.map +1 -0
  370. package/dist/checks/quality/patterns/async-state-pattern.js +80 -0
  371. package/dist/checks/quality/patterns/async-state-pattern.js.map +1 -0
  372. package/dist/checks/quality/patterns/index.d.ts +4 -0
  373. package/dist/checks/quality/patterns/index.d.ts.map +1 -0
  374. package/dist/checks/quality/patterns/index.js +4 -0
  375. package/dist/checks/quality/patterns/index.js.map +1 -0
  376. package/dist/checks/quality/patterns/no-non-null-assertions.d.ts +10 -0
  377. package/dist/checks/quality/patterns/no-non-null-assertions.d.ts.map +1 -0
  378. package/dist/checks/quality/patterns/no-non-null-assertions.js +97 -0
  379. package/dist/checks/quality/patterns/no-non-null-assertions.js.map +1 -0
  380. package/dist/checks/quality/patterns/performance-anti-patterns.d.ts +16 -0
  381. package/dist/checks/quality/patterns/performance-anti-patterns.d.ts.map +1 -0
  382. package/dist/checks/quality/patterns/performance-anti-patterns.js +239 -0
  383. package/dist/checks/quality/patterns/performance-anti-patterns.js.map +1 -0
  384. package/dist/checks/resilience/_helpers/config-validation.d.ts +27 -0
  385. package/dist/checks/resilience/_helpers/config-validation.d.ts.map +1 -0
  386. package/dist/checks/resilience/_helpers/config-validation.js +61 -0
  387. package/dist/checks/resilience/_helpers/config-validation.js.map +1 -0
  388. package/dist/checks/resilience/batch-operations.d.ts +22 -0
  389. package/dist/checks/resilience/batch-operations.d.ts.map +1 -0
  390. package/dist/checks/resilience/batch-operations.js +422 -0
  391. package/dist/checks/resilience/batch-operations.js.map +1 -0
  392. package/dist/checks/resilience/cache-ttl-validation.d.ts +13 -0
  393. package/dist/checks/resilience/cache-ttl-validation.d.ts.map +1 -0
  394. package/dist/checks/resilience/cache-ttl-validation.js +222 -0
  395. package/dist/checks/resilience/cache-ttl-validation.js.map +1 -0
  396. package/dist/checks/resilience/catch-clause-safety.d.ts +12 -0
  397. package/dist/checks/resilience/catch-clause-safety.d.ts.map +1 -0
  398. package/dist/checks/resilience/catch-clause-safety.js +110 -0
  399. package/dist/checks/resilience/catch-clause-safety.js.map +1 -0
  400. package/dist/checks/resilience/dangerous-config-defaults.d.ts +11 -0
  401. package/dist/checks/resilience/dangerous-config-defaults.d.ts.map +1 -0
  402. package/dist/checks/resilience/dangerous-config-defaults.js +304 -0
  403. package/dist/checks/resilience/dangerous-config-defaults.js.map +1 -0
  404. package/dist/checks/resilience/error-code-registration.d.ts +11 -0
  405. package/dist/checks/resilience/error-code-registration.d.ts.map +1 -0
  406. package/dist/checks/resilience/error-code-registration.js +88 -0
  407. package/dist/checks/resilience/error-code-registration.js.map +1 -0
  408. package/dist/checks/resilience/event-patterns.d.ts +21 -0
  409. package/dist/checks/resilience/event-patterns.d.ts.map +1 -0
  410. package/dist/checks/resilience/event-patterns.js +232 -0
  411. package/dist/checks/resilience/event-patterns.js.map +1 -0
  412. package/dist/checks/resilience/exit-code-correctness.d.ts +12 -0
  413. package/dist/checks/resilience/exit-code-correctness.d.ts.map +1 -0
  414. package/dist/checks/resilience/exit-code-correctness.js +107 -0
  415. package/dist/checks/resilience/exit-code-correctness.js.map +1 -0
  416. package/dist/checks/resilience/index.d.ts +18 -0
  417. package/dist/checks/resilience/index.d.ts.map +1 -0
  418. package/dist/checks/resilience/index.js +18 -0
  419. package/dist/checks/resilience/index.js.map +1 -0
  420. package/dist/checks/resilience/no-hardcoded-timeouts.d.ts +10 -0
  421. package/dist/checks/resilience/no-hardcoded-timeouts.d.ts.map +1 -0
  422. package/dist/checks/resilience/no-hardcoded-timeouts.js +291 -0
  423. package/dist/checks/resilience/no-hardcoded-timeouts.js.map +1 -0
  424. package/dist/checks/resilience/no-process-exit-in-finally.d.ts +11 -0
  425. package/dist/checks/resilience/no-process-exit-in-finally.d.ts.map +1 -0
  426. package/dist/checks/resilience/no-process-exit-in-finally.js +89 -0
  427. package/dist/checks/resilience/no-process-exit-in-finally.js.map +1 -0
  428. package/dist/checks/resilience/readline-cleanup.d.ts +11 -0
  429. package/dist/checks/resilience/readline-cleanup.d.ts.map +1 -0
  430. package/dist/checks/resilience/readline-cleanup.js +107 -0
  431. package/dist/checks/resilience/readline-cleanup.js.map +1 -0
  432. package/dist/checks/resilience/recovery-patterns.d.ts +25 -0
  433. package/dist/checks/resilience/recovery-patterns.d.ts.map +1 -0
  434. package/dist/checks/resilience/recovery-patterns.js +273 -0
  435. package/dist/checks/resilience/recovery-patterns.js.map +1 -0
  436. package/dist/checks/resilience/reentrancy-guard.d.ts +12 -0
  437. package/dist/checks/resilience/reentrancy-guard.d.ts.map +1 -0
  438. package/dist/checks/resilience/reentrancy-guard.js +86 -0
  439. package/dist/checks/resilience/reentrancy-guard.js.map +1 -0
  440. package/dist/checks/resilience/retry-config-validation.d.ts +13 -0
  441. package/dist/checks/resilience/retry-config-validation.d.ts.map +1 -0
  442. package/dist/checks/resilience/retry-config-validation.js +159 -0
  443. package/dist/checks/resilience/retry-config-validation.js.map +1 -0
  444. package/dist/checks/resilience/sentry/_helpers/sentry.d.ts +25 -0
  445. package/dist/checks/resilience/sentry/_helpers/sentry.d.ts.map +1 -0
  446. package/dist/checks/resilience/sentry/_helpers/sentry.js +68 -0
  447. package/dist/checks/resilience/sentry/_helpers/sentry.js.map +1 -0
  448. package/dist/checks/resilience/sentry/index.d.ts +8 -0
  449. package/dist/checks/resilience/sentry/index.d.ts.map +1 -0
  450. package/dist/checks/resilience/sentry/index.js +8 -0
  451. package/dist/checks/resilience/sentry/index.js.map +1 -0
  452. package/dist/checks/resilience/sentry/sentry-dsn-configured.d.ts +12 -0
  453. package/dist/checks/resilience/sentry/sentry-dsn-configured.d.ts.map +1 -0
  454. package/dist/checks/resilience/sentry/sentry-dsn-configured.js +55 -0
  455. package/dist/checks/resilience/sentry/sentry-dsn-configured.js.map +1 -0
  456. package/dist/checks/resilience/sentry/sentry-environment-set.d.ts +12 -0
  457. package/dist/checks/resilience/sentry/sentry-environment-set.d.ts.map +1 -0
  458. package/dist/checks/resilience/sentry/sentry-environment-set.js +51 -0
  459. package/dist/checks/resilience/sentry/sentry-environment-set.js.map +1 -0
  460. package/dist/checks/resilience/sentry/sentry-error-boundary.d.ts +12 -0
  461. package/dist/checks/resilience/sentry/sentry-error-boundary.d.ts.map +1 -0
  462. package/dist/checks/resilience/sentry/sentry-error-boundary.js +75 -0
  463. package/dist/checks/resilience/sentry/sentry-error-boundary.js.map +1 -0
  464. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.d.ts +13 -0
  465. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.d.ts.map +1 -0
  466. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.js +125 -0
  467. package/dist/checks/resilience/sentry/sentry-pii-scrubbing.js.map +1 -0
  468. package/dist/checks/resilience/sentry/sentry-release-set.d.ts +12 -0
  469. package/dist/checks/resilience/sentry/sentry-release-set.d.ts.map +1 -0
  470. package/dist/checks/resilience/sentry/sentry-release-set.js +51 -0
  471. package/dist/checks/resilience/sentry/sentry-release-set.js.map +1 -0
  472. package/dist/checks/resilience/sentry/sentry-sample-rate.d.ts +12 -0
  473. package/dist/checks/resilience/sentry/sentry-sample-rate.d.ts.map +1 -0
  474. package/dist/checks/resilience/sentry/sentry-sample-rate.js +78 -0
  475. package/dist/checks/resilience/sentry/sentry-sample-rate.js.map +1 -0
  476. package/dist/checks/resilience/sentry/sentry-source-maps.d.ts +12 -0
  477. package/dist/checks/resilience/sentry/sentry-source-maps.d.ts.map +1 -0
  478. package/dist/checks/resilience/sentry/sentry-source-maps.js +83 -0
  479. package/dist/checks/resilience/sentry/sentry-source-maps.js.map +1 -0
  480. package/dist/checks/resilience/service-patterns.d.ts +18 -0
  481. package/dist/checks/resilience/service-patterns.d.ts.map +1 -0
  482. package/dist/checks/resilience/service-patterns.js +230 -0
  483. package/dist/checks/resilience/service-patterns.js.map +1 -0
  484. package/dist/checks/resilience/timer-lifecycle.d.ts +10 -0
  485. package/dist/checks/resilience/timer-lifecycle.d.ts.map +1 -0
  486. package/dist/checks/resilience/timer-lifecycle.js +78 -0
  487. package/dist/checks/resilience/timer-lifecycle.js.map +1 -0
  488. package/dist/checks/resilience/transaction-patterns.d.ts +21 -0
  489. package/dist/checks/resilience/transaction-patterns.d.ts.map +1 -0
  490. package/dist/checks/resilience/transaction-patterns.js +258 -0
  491. package/dist/checks/resilience/transaction-patterns.js.map +1 -0
  492. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.d.ts +9 -0
  493. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.d.ts.map +1 -0
  494. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.js +37 -0
  495. package/dist/checks/security/__tests__/no-hardcoded-secrets.test.js.map +1 -0
  496. package/dist/checks/security/__tests__/package-supply-chain-policy.test.d.ts +2 -0
  497. package/dist/checks/security/__tests__/package-supply-chain-policy.test.d.ts.map +1 -0
  498. package/dist/checks/security/__tests__/package-supply-chain-policy.test.js +128 -0
  499. package/dist/checks/security/__tests__/package-supply-chain-policy.test.js.map +1 -0
  500. package/dist/checks/security/api-key-rotation.d.ts +10 -0
  501. package/dist/checks/security/api-key-rotation.d.ts.map +1 -0
  502. package/dist/checks/security/api-key-rotation.js +186 -0
  503. package/dist/checks/security/api-key-rotation.js.map +1 -0
  504. package/dist/checks/security/auth-middleware-coverage.d.ts +11 -0
  505. package/dist/checks/security/auth-middleware-coverage.d.ts.map +1 -0
  506. package/dist/checks/security/auth-middleware-coverage.js +210 -0
  507. package/dist/checks/security/auth-middleware-coverage.js.map +1 -0
  508. package/dist/checks/security/auth-route-guard.d.ts +12 -0
  509. package/dist/checks/security/auth-route-guard.d.ts.map +1 -0
  510. package/dist/checks/security/auth-route-guard.js +70 -0
  511. package/dist/checks/security/auth-route-guard.js.map +1 -0
  512. package/dist/checks/security/cors-configuration.d.ts +11 -0
  513. package/dist/checks/security/cors-configuration.d.ts.map +1 -0
  514. package/dist/checks/security/cors-configuration.js +126 -0
  515. package/dist/checks/security/cors-configuration.js.map +1 -0
  516. package/dist/checks/security/csp-headers.d.ts +11 -0
  517. package/dist/checks/security/csp-headers.d.ts.map +1 -0
  518. package/dist/checks/security/csp-headers.js +192 -0
  519. package/dist/checks/security/csp-headers.js.map +1 -0
  520. package/dist/checks/security/dependency-vulnerability-audit.d.ts +15 -0
  521. package/dist/checks/security/dependency-vulnerability-audit.d.ts.map +1 -0
  522. package/dist/checks/security/dependency-vulnerability-audit.js +184 -0
  523. package/dist/checks/security/dependency-vulnerability-audit.js.map +1 -0
  524. package/dist/checks/security/env-secret-exposure.d.ts +11 -0
  525. package/dist/checks/security/env-secret-exposure.d.ts.map +1 -0
  526. package/dist/checks/security/env-secret-exposure.js +127 -0
  527. package/dist/checks/security/env-secret-exposure.js.map +1 -0
  528. package/dist/checks/security/hasura-production-config.d.ts +11 -0
  529. package/dist/checks/security/hasura-production-config.d.ts.map +1 -0
  530. package/dist/checks/security/hasura-production-config.js +122 -0
  531. package/dist/checks/security/hasura-production-config.js.map +1 -0
  532. package/dist/checks/security/index.d.ts +17 -0
  533. package/dist/checks/security/index.d.ts.map +1 -0
  534. package/dist/checks/security/index.js +17 -0
  535. package/dist/checks/security/index.js.map +1 -0
  536. package/dist/checks/security/jwt-validation.d.ts +11 -0
  537. package/dist/checks/security/jwt-validation.d.ts.map +1 -0
  538. package/dist/checks/security/jwt-validation.js +294 -0
  539. package/dist/checks/security/jwt-validation.js.map +1 -0
  540. package/dist/checks/security/no-eval.d.ts +16 -0
  541. package/dist/checks/security/no-eval.d.ts.map +1 -0
  542. package/dist/checks/security/no-eval.js +83 -0
  543. package/dist/checks/security/no-eval.js.map +1 -0
  544. package/dist/checks/security/no-hardcoded-secrets.d.ts +28 -0
  545. package/dist/checks/security/no-hardcoded-secrets.d.ts.map +1 -0
  546. package/dist/checks/security/no-hardcoded-secrets.js +209 -0
  547. package/dist/checks/security/no-hardcoded-secrets.js.map +1 -0
  548. package/dist/checks/security/package-supply-chain-policy.d.ts +12 -0
  549. package/dist/checks/security/package-supply-chain-policy.d.ts.map +1 -0
  550. package/dist/checks/security/package-supply-chain-policy.js +534 -0
  551. package/dist/checks/security/package-supply-chain-policy.js.map +1 -0
  552. package/dist/checks/security/rate-limit-coverage.d.ts +10 -0
  553. package/dist/checks/security/rate-limit-coverage.d.ts.map +1 -0
  554. package/dist/checks/security/rate-limit-coverage.js +143 -0
  555. package/dist/checks/security/rate-limit-coverage.js.map +1 -0
  556. package/dist/checks/security/semgrep-scan.d.ts +13 -0
  557. package/dist/checks/security/semgrep-scan.d.ts.map +1 -0
  558. package/dist/checks/security/semgrep-scan.js +86 -0
  559. package/dist/checks/security/semgrep-scan.js.map +1 -0
  560. package/dist/checks/security/use-centralized-crypto.d.ts +11 -0
  561. package/dist/checks/security/use-centralized-crypto.d.ts.map +1 -0
  562. package/dist/checks/security/use-centralized-crypto.js +129 -0
  563. package/dist/checks/security/use-centralized-crypto.js.map +1 -0
  564. package/dist/checks/security/webhook-signature-verification.d.ts +10 -0
  565. package/dist/checks/security/webhook-signature-verification.d.ts.map +1 -0
  566. package/dist/checks/security/webhook-signature-verification.js +183 -0
  567. package/dist/checks/security/webhook-signature-verification.js.map +1 -0
  568. package/dist/checks/testing/index.d.ts +6 -0
  569. package/dist/checks/testing/index.d.ts.map +1 -0
  570. package/dist/checks/testing/index.js +6 -0
  571. package/dist/checks/testing/index.js.map +1 -0
  572. package/dist/checks/testing/no-skipped-tests.d.ts +40 -0
  573. package/dist/checks/testing/no-skipped-tests.d.ts.map +1 -0
  574. package/dist/checks/testing/no-skipped-tests.js +174 -0
  575. package/dist/checks/testing/no-skipped-tests.js.map +1 -0
  576. package/dist/checks/testing/no-stub-tests.d.ts +11 -0
  577. package/dist/checks/testing/no-stub-tests.d.ts.map +1 -0
  578. package/dist/checks/testing/no-stub-tests.js +103 -0
  579. package/dist/checks/testing/no-stub-tests.js.map +1 -0
  580. package/dist/checks/testing/test-convention-consistency.d.ts +14 -0
  581. package/dist/checks/testing/test-convention-consistency.d.ts.map +1 -0
  582. package/dist/checks/testing/test-convention-consistency.js +93 -0
  583. package/dist/checks/testing/test-convention-consistency.js.map +1 -0
  584. package/dist/checks/testing/test-file-naming.d.ts +13 -0
  585. package/dist/checks/testing/test-file-naming.d.ts.map +1 -0
  586. package/dist/checks/testing/test-file-naming.js +218 -0
  587. package/dist/checks/testing/test-file-naming.js.map +1 -0
  588. package/dist/checks/testing/test-file-pairing.d.ts +13 -0
  589. package/dist/checks/testing/test-file-pairing.d.ts.map +1 -0
  590. package/dist/checks/testing/test-file-pairing.js +274 -0
  591. package/dist/checks/testing/test-file-pairing.js.map +1 -0
  592. package/dist/display/architecture.d.ts +9 -0
  593. package/dist/display/architecture.d.ts.map +1 -0
  594. package/dist/display/architecture.js +29 -0
  595. package/dist/display/architecture.js.map +1 -0
  596. package/dist/display/index.d.ts +20 -0
  597. package/dist/display/index.d.ts.map +1 -0
  598. package/dist/display/index.js +30 -0
  599. package/dist/display/index.js.map +1 -0
  600. package/dist/display/quality.d.ts +7 -0
  601. package/dist/display/quality.d.ts.map +1 -0
  602. package/dist/display/quality.js +34 -0
  603. package/dist/display/quality.js.map +1 -0
  604. package/dist/display/resilience.d.ts +7 -0
  605. package/dist/display/resilience.d.ts.map +1 -0
  606. package/dist/display/resilience.js +36 -0
  607. package/dist/display/resilience.js.map +1 -0
  608. package/dist/display/security-testing.d.ts +9 -0
  609. package/dist/display/security-testing.d.ts.map +1 -0
  610. package/dist/display/security-testing.js +31 -0
  611. package/dist/display/security-testing.js.map +1 -0
  612. package/dist/display/types.d.ts +6 -0
  613. package/dist/display/types.d.ts.map +1 -0
  614. package/dist/display/types.js +6 -0
  615. package/dist/display/types.js.map +1 -0
  616. package/dist/index.d.ts +19 -0
  617. package/dist/index.d.ts.map +1 -0
  618. package/dist/index.js +21 -0
  619. package/dist/index.js.map +1 -0
  620. package/package.json +52 -0
@@ -0,0 +1,534 @@
1
+ // @fitness-ignore-file unbounded-memory -- reads small repository config files (package.json, lockfiles, workflows); bounded by standard project metadata size
2
+ /**
3
+ * @fileoverview Package supply-chain policy check
4
+ *
5
+ * Validates consumer-side package-manager guardrails for npm, pnpm, and Bun:
6
+ * pinned package manager, committed lockfile, frozen CI installs, install
7
+ * script policy, dependency maturity gates, lockfile integrity coverage,
8
+ * exotic dependency review, and trusted publishing posture.
9
+ */
10
+ import * as fs from 'node:fs';
11
+ import * as path from 'node:path';
12
+ import { defineCheck } from '@opensip-cli/fitness';
13
+ const SUPPORTED_LOCKFILES = [
14
+ 'pnpm-lock.yaml',
15
+ 'package-lock.json',
16
+ 'npm-shrinkwrap.json',
17
+ 'bun.lock',
18
+ 'bun.lockb',
19
+ ];
20
+ const PNPM_WORKSPACE_FILE = 'pnpm-workspace.yaml';
21
+ const INSTALL_LIFECYCLE_SCRIPTS = new Set(['preinstall', 'install', 'postinstall']);
22
+ const DEPENDENCY_FIELDS = [
23
+ 'dependencies',
24
+ 'devDependencies',
25
+ 'optionalDependencies',
26
+ 'peerDependencies',
27
+ ];
28
+ function readIfExists(filePath) {
29
+ try {
30
+ if (!fs.existsSync(filePath))
31
+ return null;
32
+ return fs.readFileSync(filePath, 'utf8');
33
+ }
34
+ catch {
35
+ // @swallow-ok unreadable file (permission/IO) -> treat as absent
36
+ return null;
37
+ }
38
+ }
39
+ function parseJson(content) {
40
+ try {
41
+ return JSON.parse(content);
42
+ }
43
+ catch {
44
+ // @swallow-ok malformed JSON -> treat as unparseable
45
+ return null;
46
+ }
47
+ }
48
+ function lineOf(content, needle) {
49
+ const lines = content.split('\n');
50
+ for (const [i, line] of lines.entries()) {
51
+ if (typeof needle === 'string' ? line.includes(needle) : needle.test(line)) {
52
+ return i + 1;
53
+ }
54
+ }
55
+ return 1;
56
+ }
57
+ function normalizeRel(filePath, rootDir) {
58
+ return path.relative(rootDir, filePath).split(path.sep).join('/');
59
+ }
60
+ function getConfigValue(content, key) {
61
+ if (!content)
62
+ return null;
63
+ const escaped = key.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw `\$&`);
64
+ const match = new RegExp(String.raw `^\s*${escaped}\s*[:=]\s*([^#\n]+)`, 'm').exec(content);
65
+ return match?.[1]?.trim().replaceAll(/^['"]|['"]$/g, '') ?? null;
66
+ }
67
+ function getNpmrcBoolean(content, key) {
68
+ return getConfigValue(content, key)?.toLowerCase() === 'true';
69
+ }
70
+ function getPositiveNumber(content, key) {
71
+ const value = getConfigValue(content, key);
72
+ if (!value)
73
+ return null;
74
+ const parsed = Number.parseInt(value, 10);
75
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : null;
76
+ }
77
+ function hasTopLevelKey(content, key) {
78
+ if (!content)
79
+ return false;
80
+ const escaped = key.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw `\$&`);
81
+ return new RegExp(`^${escaped}:`, 'm').test(content);
82
+ }
83
+ function hasScalarValue(content, key, expected) {
84
+ return getConfigValue(content, key)?.toLowerCase() === expected.toLowerCase();
85
+ }
86
+ async function readPackageJsons(files, rootDir) {
87
+ const packagePaths = files.paths
88
+ .filter((filePath) => path.basename(filePath) === 'package.json')
89
+ .sort((a, b) => a.length - b.length);
90
+ // Read all package.json files in parallel, then assemble in path order.
91
+ const contents = await Promise.all(packagePaths.map((filePath) => files.read(filePath)));
92
+ const packages = [];
93
+ for (const [i, filePath] of packagePaths.entries()) {
94
+ const json = parseJson(contents[i]);
95
+ if (!json)
96
+ continue;
97
+ packages.push({
98
+ filePath,
99
+ relPath: normalizeRel(filePath, rootDir),
100
+ packageDir: path.dirname(filePath),
101
+ json,
102
+ });
103
+ }
104
+ return packages;
105
+ }
106
+ function findRootPackagePath(paths) {
107
+ const candidates = paths
108
+ .filter((filePath) => path.basename(filePath) === 'package.json')
109
+ .sort((a, b) => a.split(path.sep).length - b.split(path.sep).length);
110
+ return candidates[0] ?? null;
111
+ }
112
+ function readWorkflows(rootDir) {
113
+ const workflowsDir = path.join(rootDir, '.github', 'workflows');
114
+ if (!fs.existsSync(workflowsDir))
115
+ return [];
116
+ const workflows = [];
117
+ for (const entry of fs.readdirSync(workflowsDir, { withFileTypes: true })) {
118
+ if (!entry.isFile() || !/\.(ya?ml)$/i.test(entry.name))
119
+ continue;
120
+ const filePath = path.join(workflowsDir, entry.name);
121
+ const content = readIfExists(filePath);
122
+ if (content === null)
123
+ continue;
124
+ workflows.push({ filePath, relPath: normalizeRel(filePath, rootDir), content });
125
+ }
126
+ return workflows;
127
+ }
128
+ async function buildSnapshot(files) {
129
+ const rootPackagePath = findRootPackagePath(files.paths);
130
+ if (!rootPackagePath)
131
+ return null;
132
+ const rootDir = path.dirname(rootPackagePath);
133
+ const rootContent = await files.read(rootPackagePath);
134
+ const rootPackage = parseJson(rootContent);
135
+ if (!rootPackage)
136
+ return null;
137
+ return {
138
+ rootDir,
139
+ rootPackagePath,
140
+ rootPackage,
141
+ packages: await readPackageJsons(files, rootDir),
142
+ lockfiles: new Set(SUPPORTED_LOCKFILES.filter((name) => fs.existsSync(path.join(rootDir, name)))),
143
+ pnpmWorkspace: readIfExists(path.join(rootDir, PNPM_WORKSPACE_FILE)),
144
+ npmrc: readIfExists(path.join(rootDir, '.npmrc')),
145
+ bunfig: readIfExists(path.join(rootDir, 'bunfig.toml')),
146
+ workflows: readWorkflows(rootDir),
147
+ };
148
+ }
149
+ function pushViolation(violations, violation) {
150
+ violations.push({ severity: 'warning', line: 1, ...violation });
151
+ }
152
+ function checkPackageManagerPin(snapshot, violations) {
153
+ const value = snapshot.rootPackage.packageManager;
154
+ if (!value) {
155
+ pushViolation(violations, {
156
+ filePath: snapshot.rootPackagePath,
157
+ type: 'package-manager-missing',
158
+ message: 'Root package.json does not declare a packageManager pin',
159
+ suggestion: 'Add an exact packageManager value such as "pnpm@11.5.1+sha512.<hash>" so Corepack installs the expected package manager.',
160
+ severity: 'error',
161
+ });
162
+ return;
163
+ }
164
+ if (!/^(npm|pnpm|bun)@\d+\.\d+\.\d+(?:[-+][A-Za-z0-9._~+-]+)?$/.test(value)) {
165
+ pushViolation(violations, {
166
+ filePath: snapshot.rootPackagePath,
167
+ type: 'package-manager-not-exact',
168
+ message: `packageManager "${value}" is not an exact package-manager version`,
169
+ suggestion: 'Pin packageManager to an exact version; do not use ranges, tags, or unversioned package-manager names.',
170
+ severity: 'error',
171
+ line: lineOf(readIfExists(snapshot.rootPackagePath) ?? '', 'packageManager'),
172
+ });
173
+ }
174
+ if (value.startsWith('pnpm@') && !value.includes('+sha512.')) {
175
+ pushViolation(violations, {
176
+ filePath: snapshot.rootPackagePath,
177
+ type: 'package-manager-missing-integrity',
178
+ message: 'pnpm packageManager pin is missing a Corepack sha512 integrity suffix',
179
+ suggestion: 'Use `corepack use pnpm@<version>` with a modern Corepack so package.json records the sha512-qualified pnpm pin.',
180
+ line: lineOf(readIfExists(snapshot.rootPackagePath) ?? '', 'packageManager'),
181
+ });
182
+ }
183
+ }
184
+ function checkLockfilePosture(snapshot, violations) {
185
+ if (snapshot.lockfiles.size === 0) {
186
+ pushViolation(violations, {
187
+ filePath: snapshot.rootPackagePath,
188
+ type: 'lockfile-missing',
189
+ message: 'No supported package-manager lockfile found at the project root',
190
+ suggestion: 'Commit one root lockfile: pnpm-lock.yaml, package-lock.json, npm-shrinkwrap.json, or bun.lock.',
191
+ severity: 'error',
192
+ });
193
+ return;
194
+ }
195
+ if (snapshot.lockfiles.size > 1) {
196
+ pushViolation(violations, {
197
+ filePath: snapshot.rootPackagePath,
198
+ type: 'multiple-lockfiles',
199
+ message: `Multiple package-manager lockfiles found: ${[...snapshot.lockfiles].join(', ')}`,
200
+ suggestion: 'Keep one authoritative lockfile for the package manager used by package.json#packageManager.',
201
+ });
202
+ }
203
+ }
204
+ function checkPackageLockIntegrity(snapshot, violations) {
205
+ const lockPath = path.join(snapshot.rootDir, 'package-lock.json');
206
+ const content = readIfExists(lockPath);
207
+ if (!content)
208
+ return;
209
+ const lock = parseJson(content);
210
+ if (!lock)
211
+ return;
212
+ const entries = [
213
+ ...Object.entries(lock.packages ?? {}),
214
+ ...Object.entries(lock.dependencies ?? {}),
215
+ ];
216
+ for (const [name, entry] of entries) {
217
+ if (!entry.resolved?.startsWith('http'))
218
+ continue;
219
+ if (entry.integrity)
220
+ continue;
221
+ pushViolation(violations, {
222
+ filePath: lockPath,
223
+ type: 'lockfile-entry-missing-integrity',
224
+ message: `Remote package-lock entry "${name || '<root>'}" has a resolved URL but no integrity hash`,
225
+ suggestion: 'Regenerate the lockfile with a modern npm CLI and review any direct URL dependencies.',
226
+ severity: 'error',
227
+ line: lineOf(content, entry.resolved),
228
+ });
229
+ }
230
+ }
231
+ function checkPnpmLockIntegrity(snapshot, violations) {
232
+ const lockPath = path.join(snapshot.rootDir, 'pnpm-lock.yaml');
233
+ const content = readIfExists(lockPath);
234
+ if (!content)
235
+ return;
236
+ const lines = content.split('\n');
237
+ for (const [index, rawLine] of lines.entries()) {
238
+ const line = rawLine.trim();
239
+ if (!line.includes('http') || !/(tarball|resolution):/.test(line))
240
+ continue;
241
+ const lookahead = lines.slice(index, index + 8).join('\n');
242
+ if (/integrity:\s*sha\d+-/i.test(lookahead) || /integrity:\s*['"]?sha\d+-/i.test(line))
243
+ continue;
244
+ pushViolation(violations, {
245
+ filePath: lockPath,
246
+ type: 'lockfile-entry-missing-integrity',
247
+ message: 'pnpm lockfile contains a remote tarball resolution without a nearby integrity hash',
248
+ suggestion: 'Upgrade pnpm and regenerate the lockfile; modern pnpm rejects mutable remote tarball entries without integrity.',
249
+ severity: 'error',
250
+ line: index + 1,
251
+ });
252
+ }
253
+ }
254
+ function checkLockfileIntegrity(snapshot, violations) {
255
+ checkPackageLockIntegrity(snapshot, violations);
256
+ checkPnpmLockIntegrity(snapshot, violations);
257
+ }
258
+ function dependencyEntries(pkg) {
259
+ const entries = [];
260
+ for (const field of DEPENDENCY_FIELDS) {
261
+ for (const [name, spec] of Object.entries(pkg[field] ?? {})) {
262
+ entries.push([name, spec]);
263
+ }
264
+ }
265
+ return entries;
266
+ }
267
+ function hasCommitPin(spec) {
268
+ return /#[a-f0-9]{40}(?:$|[^\da-f])/i.test(spec);
269
+ }
270
+ function isExoticSpec(spec) {
271
+ return /^(git\+|git:\/\/|github:|gitlab:|bitbucket:|https?:\/\/|ssh:\/\/|git@|file:)/.test(spec);
272
+ }
273
+ function checkExoticDependencies(snapshot, violations) {
274
+ for (const pkg of snapshot.packages) {
275
+ const content = readIfExists(pkg.filePath) ?? '';
276
+ for (const [name, spec] of dependencyEntries(pkg.json)) {
277
+ if (!isExoticSpec(spec))
278
+ continue;
279
+ const isGit = /^(git\+|git:\/\/|github:|gitlab:|bitbucket:|ssh:\/\/|git@)/.test(spec);
280
+ if (isGit && hasCommitPin(spec))
281
+ continue;
282
+ const kind = spec.startsWith('file:')
283
+ ? 'local path dependency'
284
+ : 'mutable non-registry dependency';
285
+ pushViolation(violations, {
286
+ filePath: pkg.filePath,
287
+ type: 'exotic-dependency-source',
288
+ message: `${pkg.relPath} declares ${kind} ${name}@${spec}`,
289
+ suggestion: 'Prefer registry/workspace dependencies. If a git dependency is unavoidable, pin it to a full 40-character commit SHA and review it explicitly.',
290
+ line: lineOf(content, `"${name}"`),
291
+ });
292
+ }
293
+ }
294
+ }
295
+ function checkInstallLifecycleScripts(snapshot, violations) {
296
+ for (const pkg of snapshot.packages) {
297
+ for (const scriptName of Object.keys(pkg.json.scripts ?? {})) {
298
+ if (!INSTALL_LIFECYCLE_SCRIPTS.has(scriptName))
299
+ continue;
300
+ pushViolation(violations, {
301
+ filePath: pkg.filePath,
302
+ type: 'install-lifecycle-script',
303
+ message: `${pkg.relPath} declares an install-time lifecycle script "${scriptName}"`,
304
+ suggestion: 'Avoid install-time lifecycle scripts in publishable packages. If this is an app-only script, document why it is safe and keep dependency install scripts disabled or allowlisted.',
305
+ severity: pkg.json.private === true ? 'warning' : 'error',
306
+ line: lineOf(readIfExists(pkg.filePath) ?? '', `"${scriptName}"`),
307
+ });
308
+ }
309
+ }
310
+ }
311
+ function checkInstallScriptPolicy(snapshot, violations) {
312
+ if (snapshot.lockfiles.has('pnpm-lock.yaml')) {
313
+ if (!hasTopLevelKey(snapshot.pnpmWorkspace, 'allowBuilds')) {
314
+ pushViolation(violations, {
315
+ filePath: path.join(snapshot.rootDir, PNPM_WORKSPACE_FILE),
316
+ type: 'install-script-policy-missing',
317
+ message: 'pnpm project does not declare an allowBuilds install-script policy',
318
+ suggestion: 'Add an explicit allowBuilds map to pnpm-workspace.yaml and approve only dependencies that truly need install/build scripts.',
319
+ severity: 'error',
320
+ });
321
+ }
322
+ if (hasScalarValue(snapshot.pnpmWorkspace, 'dangerouslyAllowAllBuilds', 'true')) {
323
+ pushViolation(violations, {
324
+ filePath: path.join(snapshot.rootDir, PNPM_WORKSPACE_FILE),
325
+ type: 'install-script-policy-allows-all',
326
+ message: 'pnpm dangerouslyAllowAllBuilds is enabled',
327
+ suggestion: 'Remove dangerouslyAllowAllBuilds and use a narrow allowBuilds map instead.',
328
+ severity: 'error',
329
+ line: lineOf(snapshot.pnpmWorkspace ?? '', 'dangerouslyAllowAllBuilds'),
330
+ });
331
+ }
332
+ }
333
+ if (snapshot.lockfiles.has('package-lock.json') ||
334
+ snapshot.lockfiles.has('npm-shrinkwrap.json')) {
335
+ const npmHasPolicy = getNpmrcBoolean(snapshot.npmrc, 'ignore-scripts') ||
336
+ (getNpmrcBoolean(snapshot.npmrc, 'strict-allow-scripts') &&
337
+ snapshot.npmrc?.includes('allow-scripts'));
338
+ if (!npmHasPolicy) {
339
+ pushViolation(violations, {
340
+ filePath: path.join(snapshot.rootDir, '.npmrc'),
341
+ type: 'install-script-policy-missing',
342
+ message: 'npm project does not disable or strictly allowlist dependency install scripts',
343
+ suggestion: 'Set ignore-scripts=true, or use strict-allow-scripts=true with a narrow allow-scripts policy for dependencies that genuinely need lifecycle hooks.',
344
+ });
345
+ }
346
+ }
347
+ if (snapshot.lockfiles.has('bun.lock') || snapshot.lockfiles.has('bun.lockb')) {
348
+ const trusted = snapshot.rootPackage.trustedDependencies;
349
+ if (!Array.isArray(trusted)) {
350
+ pushViolation(violations, {
351
+ filePath: snapshot.rootPackagePath,
352
+ type: 'install-script-policy-missing',
353
+ message: 'Bun project does not declare trustedDependencies',
354
+ suggestion: 'Add trustedDependencies to package.json. Use [] to disable all dependency lifecycle scripts, or list only reviewed packages.',
355
+ });
356
+ }
357
+ }
358
+ }
359
+ function checkMinimumReleaseAge(snapshot, violations) {
360
+ if (snapshot.lockfiles.has('pnpm-lock.yaml')) {
361
+ if ((getPositiveNumber(snapshot.pnpmWorkspace, 'minimumReleaseAge') ?? 0) <= 0) {
362
+ pushViolation(violations, {
363
+ filePath: path.join(snapshot.rootDir, PNPM_WORKSPACE_FILE),
364
+ type: 'minimum-release-age-missing',
365
+ message: 'pnpm minimumReleaseAge is not explicitly enabled',
366
+ suggestion: 'Set minimumReleaseAge: 1440 or higher in pnpm-workspace.yaml, and pair it with minimumReleaseAgeStrict: true.',
367
+ severity: 'error',
368
+ });
369
+ }
370
+ if (!hasScalarValue(snapshot.pnpmWorkspace, 'minimumReleaseAgeStrict', 'true')) {
371
+ pushViolation(violations, {
372
+ filePath: path.join(snapshot.rootDir, PNPM_WORKSPACE_FILE),
373
+ type: 'minimum-release-age-not-strict',
374
+ message: 'pnpm minimumReleaseAgeStrict is not enabled',
375
+ suggestion: 'Set minimumReleaseAgeStrict: true so newly published versions fail closed instead of being silently exempted.',
376
+ });
377
+ }
378
+ }
379
+ if ((snapshot.lockfiles.has('package-lock.json') ||
380
+ snapshot.lockfiles.has('npm-shrinkwrap.json')) &&
381
+ (getPositiveNumber(snapshot.npmrc, 'min-release-age') ?? 0) <= 0) {
382
+ pushViolation(violations, {
383
+ filePath: path.join(snapshot.rootDir, '.npmrc'),
384
+ type: 'minimum-release-age-missing',
385
+ message: 'npm min-release-age is not enabled',
386
+ suggestion: 'Set min-release-age to a positive number of days in project .npmrc.',
387
+ });
388
+ }
389
+ if ((snapshot.lockfiles.has('bun.lock') || snapshot.lockfiles.has('bun.lockb')) &&
390
+ (getPositiveNumber(snapshot.bunfig, 'minimumReleaseAge') ?? 0) <= 0) {
391
+ pushViolation(violations, {
392
+ filePath: path.join(snapshot.rootDir, 'bunfig.toml'),
393
+ type: 'minimum-release-age-missing',
394
+ message: 'Bun minimumReleaseAge is not enabled',
395
+ suggestion: 'Set [install].minimumReleaseAge to a positive number of seconds in bunfig.toml.',
396
+ });
397
+ }
398
+ }
399
+ function workflowLines(workflow) {
400
+ return workflow.content.split('\n');
401
+ }
402
+ function isFrozenInstallLine(line) {
403
+ return (/\bnpm\s+ci\b/.test(line) ||
404
+ /\bpnpm\s+(?:install|i)\b.*--frozen-lockfile/.test(line) ||
405
+ /\bpnpm\s+ci\b/.test(line) ||
406
+ /\bbun\s+install\b.*--frozen-lockfile/.test(line) ||
407
+ /\bbun\s+ci\b/.test(line));
408
+ }
409
+ function isPackageManagerBootstrapLine(line) {
410
+ return (/\bnpm\s+install\b.*\s--prefix\b.*\bnpm@\d+/.test(line) ||
411
+ /\bnpm\s+install\s+--prefix\b.*\bnpm@\d+/.test(line));
412
+ }
413
+ function isMutableInstallLine(line) {
414
+ if (isPackageManagerBootstrapLine(line))
415
+ return false;
416
+ return (/\bnpm\s+install\b/.test(line) ||
417
+ (/\bpnpm\s+(?:install|i)\b/.test(line) && !line.includes('--frozen-lockfile')) ||
418
+ (/\bbun\s+install\b/.test(line) && !line.includes('--frozen-lockfile')));
419
+ }
420
+ function checkFrozenCiInstalls(snapshot, violations) {
421
+ if (snapshot.workflows.length === 0)
422
+ return;
423
+ let hasFrozenInstall = false;
424
+ for (const workflow of snapshot.workflows) {
425
+ for (const [index, rawLine] of workflowLines(workflow).entries()) {
426
+ const line = rawLine.trim();
427
+ if (line.startsWith('#'))
428
+ continue;
429
+ if (isFrozenInstallLine(line))
430
+ hasFrozenInstall = true;
431
+ if (!isMutableInstallLine(line))
432
+ continue;
433
+ pushViolation(violations, {
434
+ filePath: workflow.filePath,
435
+ type: 'ci-install-not-frozen',
436
+ message: `${workflow.relPath} uses a mutable package install command: ${line}`,
437
+ suggestion: 'Use npm ci, pnpm install --frozen-lockfile, pnpm ci, bun install --frozen-lockfile, or bun ci in CI.',
438
+ severity: 'error',
439
+ line: index + 1,
440
+ });
441
+ }
442
+ }
443
+ if (!hasFrozenInstall) {
444
+ pushViolation(violations, {
445
+ filePath: snapshot.workflows[0]?.filePath ?? snapshot.rootPackagePath,
446
+ type: 'ci-frozen-install-missing',
447
+ message: 'No frozen package install command was found in GitHub workflows',
448
+ suggestion: 'Use npm ci, pnpm install --frozen-lockfile, pnpm ci, bun install --frozen-lockfile, or bun ci in every CI install lane.',
449
+ });
450
+ }
451
+ }
452
+ function checkTrustedPublishing(snapshot, violations) {
453
+ for (const workflow of snapshot.workflows) {
454
+ if (!/\bnpm\s+publish\b/.test(workflow.content))
455
+ continue;
456
+ if (!/id-token:\s*write/.test(workflow.content)) {
457
+ pushViolation(violations, {
458
+ filePath: workflow.filePath,
459
+ type: 'trusted-publishing-missing-oidc',
460
+ message: `${workflow.relPath} publishes to npm without id-token: write permission`,
461
+ suggestion: 'Use npm trusted publishing/OIDC and add permissions.id-token: write to the publish job.',
462
+ severity: 'error',
463
+ line: lineOf(workflow.content, 'npm publish'),
464
+ });
465
+ }
466
+ if (!/(--provenance|NPM_CONFIG_PROVENANCE\s*[:=]\s*true|provenance:\s*true)/.test(workflow.content)) {
467
+ pushViolation(violations, {
468
+ filePath: workflow.filePath,
469
+ type: 'publish-provenance-missing',
470
+ message: `${workflow.relPath} publishes to npm without explicit provenance`,
471
+ suggestion: 'Publish with npm trusted publishing and --provenance so consumers can verify build provenance.',
472
+ line: lineOf(workflow.content, 'npm publish'),
473
+ });
474
+ }
475
+ if (/(NPM_TOKEN|NODE_AUTH_TOKEN)/.test(workflow.content)) {
476
+ pushViolation(violations, {
477
+ filePath: workflow.filePath,
478
+ type: 'publish-token-exposure',
479
+ message: `${workflow.relPath} references a long-lived npm publish token`,
480
+ suggestion: 'Prefer npm trusted publishing/OIDC. Remove NPM_TOKEN/NODE_AUTH_TOKEN from publish jobs after migration.',
481
+ line: lineOf(workflow.content, /NPM_TOKEN|NODE_AUTH_TOKEN/),
482
+ });
483
+ }
484
+ }
485
+ }
486
+ export async function analyzePackageSupplyChainPolicy(files) {
487
+ const snapshot = await buildSnapshot(files);
488
+ if (!snapshot)
489
+ return [];
490
+ const violations = [];
491
+ const subChecks = [
492
+ checkPackageManagerPin,
493
+ checkLockfilePosture,
494
+ checkLockfileIntegrity,
495
+ checkExoticDependencies,
496
+ checkInstallLifecycleScripts,
497
+ checkInstallScriptPolicy,
498
+ checkMinimumReleaseAge,
499
+ checkFrozenCiInstalls,
500
+ checkTrustedPublishing,
501
+ ];
502
+ for (const runCheck of subChecks) {
503
+ // @fitness-ignore-next-line detached-promises -- sub-checks are synchronous (each returns void, mutating `violations`), not promises
504
+ runCheck(snapshot, violations);
505
+ }
506
+ return violations;
507
+ }
508
+ export const packageSupplyChainPolicy = defineCheck({
509
+ id: 'ea3ec1d6-16ab-43c4-9875-50d3fd9f564c',
510
+ slug: 'package-supply-chain-policy',
511
+ scope: { languages: ['typescript'], concerns: ['config'] },
512
+ contentFilter: 'raw',
513
+ fileTypes: ['json'],
514
+ confidence: 'medium',
515
+ description: 'Validate npm/pnpm/Bun supply-chain guardrails',
516
+ longDescription: `**Purpose:** Validates package-manager supply-chain guardrails for npm, pnpm, and Bun projects.
517
+
518
+ **Detects:**
519
+ - Missing or non-exact \`packageManager\` pins
520
+ - Missing or conflicting lockfiles
521
+ - Remote lockfile entries without integrity hashes
522
+ - Mutable git, URL, tarball, or local path dependencies
523
+ - Install-time lifecycle scripts and missing install-script allowlists
524
+ - Missing dependency release-age gates
525
+ - CI install commands that can rewrite lockfiles
526
+ - npm publish workflows that lack OIDC/provenance or still use long-lived tokens
527
+
528
+ **Why it matters:** Modern npm-family attacks often execute during installation, exploit fresh compromised versions before takedown, or bypass weakened lockfile/install-script policy. These checks keep the project in a fail-closed posture before dependency code runs in CI or developer machines.
529
+
530
+ **Scope:** General best practice. Cross-file analysis over package metadata, root lockfiles, package-manager config files, and GitHub workflow files.`,
531
+ tags: ['security', 'dependencies', 'supply-chain'],
532
+ analyzeAll: analyzePackageSupplyChainPolicy,
533
+ });
534
+ //# sourceMappingURL=package-supply-chain-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-supply-chain-policy.js","sourceRoot":"","sources":["../../../src/checks/security/package-supply-chain-policy.ts"],"names":[],"mappings":"AAAA,+JAA+J;AAC/J;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AAuC3F,MAAM,mBAAmB,GAAG;IAC1B,gBAAgB;IAChB,mBAAmB;IACnB,qBAAqB;IACrB,UAAU;IACV,WAAW;CACH,CAAC;AAEX,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AACpF,MAAM,iBAAiB,GAAG;IACxB,cAAc;IACd,iBAAiB;IACjB,sBAAsB;IACtB,kBAAkB;CACV,CAAC;AAEX,SAAS,YAAY,CAAC,QAAgB;IACpC,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1C,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,iEAAiE;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAI,OAAe;IACnC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAM,CAAC;IAClC,CAAC;IAAC,MAAM,CA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C1D,aAAa,EAAE,KAAK;IACpB,SAAS,EAAE,CAAC,MAAM,CAAC;IAEnB,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,+CAA+C;IAC5D,eAAe,EAAE;;;;;;;;;;;;;;sJAcmI;IACpJ,IAAI,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC;IAElD,UAAU,EAAE,+BAA+B;CAC5C,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview Validate routes have rate limiting configured
3
+ */
4
+ /**
5
+ * Check: security/rate-limit-coverage
6
+ *
7
+ * Validates that routes have rate limiting configured.
8
+ */
9
+ export declare const rateLimitCoverage: import("@opensip-cli/fitness").Check;
10
+ //# sourceMappingURL=rate-limit-coverage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit-coverage.d.ts","sourceRoot":"","sources":["../../../src/checks/security/rate-limit-coverage.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8FH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sCA+E5B,CAAC"}