@shepai/cli 1.170.0 → 1.171.0-pr527.e2ee839

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 (464) hide show
  1. package/apis/json-schema/ActionDispositionEntry.yaml +14 -0
  2. package/apis/json-schema/DependencyFinding.yaml +28 -0
  3. package/apis/json-schema/DependencyRiskType.yaml +11 -0
  4. package/apis/json-schema/DependencyRules.yaml +38 -0
  5. package/apis/json-schema/EffectivePolicySnapshot.yaml +24 -0
  6. package/apis/json-schema/ReleaseIntegrityCheck.yaml +22 -0
  7. package/apis/json-schema/ReleaseIntegrityCheckType.yaml +9 -0
  8. package/apis/json-schema/ReleaseIntegrityResult.yaml +16 -0
  9. package/apis/json-schema/ReleaseRules.yaml +21 -0
  10. package/apis/json-schema/SecurityActionCategory.yaml +10 -0
  11. package/apis/json-schema/SecurityActionDisposition.yaml +8 -0
  12. package/apis/json-schema/SecurityConfig.yaml +17 -0
  13. package/apis/json-schema/SecurityEvent.yaml +36 -0
  14. package/apis/json-schema/SecurityMode.yaml +8 -0
  15. package/apis/json-schema/SecurityPolicy.yaml +24 -0
  16. package/apis/json-schema/SecuritySeverity.yaml +9 -0
  17. package/apis/json-schema/Settings.yaml +3 -0
  18. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +15 -1
  19. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
  20. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +3 -1
  21. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  22. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts +76 -0
  23. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts.map +1 -0
  24. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.js +11 -0
  25. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +38 -0
  26. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
  27. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +9 -0
  28. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts +77 -0
  29. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts.map +1 -0
  30. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.js +13 -0
  31. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +11 -0
  32. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
  33. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
  34. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +2 -0
  35. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
  36. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +2 -0
  37. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts.map +1 -1
  38. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +2 -0
  39. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  40. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +1 -0
  41. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  42. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +2 -0
  43. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
  44. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +2 -0
  45. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts +71 -0
  46. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts.map +1 -0
  47. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.js +215 -0
  48. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts +24 -0
  49. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts.map +1 -0
  50. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.js +56 -0
  51. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts +36 -0
  52. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts.map +1 -0
  53. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.js +76 -0
  54. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts +14 -0
  55. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts.map +1 -0
  56. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.js +46 -0
  57. package/dist/packages/core/src/application/use-cases/upgrade/upgrade-cli.use-case.d.ts +1 -0
  58. package/dist/packages/core/src/application/use-cases/upgrade/upgrade-cli.use-case.d.ts.map +1 -1
  59. package/dist/packages/core/src/application/use-cases/upgrade/upgrade-cli.use-case.js +59 -2
  60. package/dist/packages/core/src/domain/errors/security-violation.error.d.ts +15 -0
  61. package/dist/packages/core/src/domain/errors/security-violation.error.d.ts.map +1 -0
  62. package/dist/packages/core/src/domain/errors/security-violation.error.js +20 -0
  63. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  64. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +5 -1
  65. package/dist/packages/core/src/domain/generated/output.d.ts +259 -0
  66. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  67. package/dist/packages/core/src/domain/generated/output.js +43 -0
  68. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  69. package/dist/packages/core/src/infrastructure/di/container.js +57 -0
  70. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts +44 -0
  71. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts.map +1 -0
  72. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.js +55 -0
  73. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +3 -0
  74. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  75. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +14 -0
  76. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts +18 -0
  77. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts.map +1 -0
  78. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.js +31 -0
  79. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts +29 -0
  80. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts.map +1 -0
  81. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.js +53 -0
  82. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts +24 -0
  83. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts.map +1 -0
  84. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.js +96 -0
  85. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  86. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +12 -3
  87. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +2 -0
  88. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  89. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +12 -0
  90. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts +22 -0
  91. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts.map +1 -0
  92. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.js +30 -0
  93. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +10 -0
  94. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  95. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +34 -0
  96. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  97. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +3 -1
  98. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  99. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +7 -1
  100. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +3 -1
  101. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  102. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -1
  103. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  104. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +19 -0
  105. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts +45 -0
  106. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts.map +1 -0
  107. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.js +70 -0
  108. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +4 -1
  109. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  110. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +10 -0
  111. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +10 -1
  112. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
  113. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +101 -1
  114. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts +53 -0
  115. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts.map +1 -0
  116. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.js +241 -0
  117. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts +44 -0
  118. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts.map +1 -0
  119. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.js +194 -0
  120. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts +28 -0
  121. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts.map +1 -0
  122. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.js +50 -0
  123. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts +26 -0
  124. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts.map +1 -0
  125. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.js +147 -0
  126. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts +44 -0
  127. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts.map +1 -0
  128. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.js +174 -0
  129. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -0
  130. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
  131. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +61 -0
  132. package/dist/src/presentation/cli/commands/security.command.d.ts +16 -0
  133. package/dist/src/presentation/cli/commands/security.command.d.ts.map +1 -0
  134. package/dist/src/presentation/cli/commands/security.command.js +118 -0
  135. package/dist/src/presentation/cli/commands/upgrade.command.d.ts.map +1 -1
  136. package/dist/src/presentation/cli/commands/upgrade.command.js +68 -3
  137. package/dist/src/presentation/cli/index.js +2 -0
  138. package/dist/src/presentation/web/app/actions/security.d.ts +28 -0
  139. package/dist/src/presentation/web/app/actions/security.d.ts.map +1 -0
  140. package/dist/src/presentation/web/app/actions/security.js +59 -0
  141. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +3 -1
  142. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
  143. package/dist/src/presentation/web/app/build-graph-nodes.js +2 -0
  144. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +3 -1
  145. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  146. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  147. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +2 -1
  148. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts +3 -1
  149. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  150. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +3 -2
  151. package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts +6 -0
  152. package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts.map +1 -0
  153. package/dist/src/presentation/web/components/common/repository-node/security-panel.js +29 -0
  154. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts +10 -0
  155. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts.map +1 -0
  156. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.js +53 -0
  157. package/dist/src/presentation/web/components/common/security-badge.d.ts +7 -0
  158. package/dist/src/presentation/web/components/common/security-badge.d.ts.map +1 -0
  159. package/dist/src/presentation/web/components/common/security-badge.js +30 -0
  160. package/dist/src/presentation/web/components/common/security-badge.stories.d.ts +12 -0
  161. package/dist/src/presentation/web/components/common/security-badge.stories.d.ts.map +1 -0
  162. package/dist/src/presentation/web/components/common/security-badge.stories.js +20 -0
  163. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  164. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +16 -3
  165. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts +6 -0
  166. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts.map +1 -0
  167. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.js +60 -0
  168. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts +14 -0
  169. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts.map +1 -0
  170. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.js +116 -0
  171. package/dist/translations/ar/cli.json +22 -0
  172. package/dist/translations/ar/web.json +43 -1
  173. package/dist/translations/de/cli.json +22 -0
  174. package/dist/translations/de/web.json +43 -1
  175. package/dist/translations/en/cli.json +22 -0
  176. package/dist/translations/en/web.json +43 -1
  177. package/dist/translations/es/cli.json +22 -0
  178. package/dist/translations/es/web.json +43 -1
  179. package/dist/translations/fr/cli.json +22 -0
  180. package/dist/translations/fr/web.json +43 -1
  181. package/dist/translations/he/cli.json +22 -0
  182. package/dist/translations/he/web.json +43 -1
  183. package/dist/translations/pt/cli.json +22 -0
  184. package/dist/translations/pt/web.json +43 -1
  185. package/dist/translations/ru/cli.json +22 -0
  186. package/dist/translations/ru/web.json +43 -1
  187. package/dist/tsconfig.build.tsbuildinfo +1 -1
  188. package/package.json +1 -1
  189. package/web/.next/BUILD_ID +1 -1
  190. package/web/.next/build-manifest.json +2 -2
  191. package/web/.next/fallback-build-manifest.json +2 -2
  192. package/web/.next/prerender-manifest.json +3 -3
  193. package/web/.next/required-server-files.js +3 -3
  194. package/web/.next/required-server-files.json +3 -3
  195. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  196. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +2 -1
  197. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  198. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  199. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  200. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +2 -1
  201. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  202. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  203. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  204. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -1
  205. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  206. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  207. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  208. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -1
  209. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  210. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  211. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +38 -38
  212. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -1
  213. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  214. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  215. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  216. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +2 -1
  217. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  218. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  219. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  220. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -1
  221. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  222. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  223. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  224. package/web/.next/server/app/(dashboard)/chat/page.js +2 -1
  225. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  226. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  227. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  228. package/web/.next/server/app/(dashboard)/create/page.js +2 -1
  229. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  230. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  231. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  232. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -1
  233. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  234. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  235. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +38 -38
  236. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -1
  237. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  238. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  239. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  240. package/web/.next/server/app/(dashboard)/page.js +2 -1
  241. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  242. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  243. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  244. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +2 -1
  245. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  246. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  247. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  248. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -1
  249. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  250. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  251. package/web/.next/server/app/_global-error.html +2 -2
  252. package/web/.next/server/app/_global-error.rsc +1 -1
  253. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  254. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  255. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  256. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  257. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  258. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  259. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  260. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  261. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  262. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  263. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  264. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  265. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  266. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
  267. package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
  268. package/web/.next/server/app/features/page.js.nft.json +1 -1
  269. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  270. package/web/.next/server/app/settings/page/server-reference-manifest.json +33 -18
  271. package/web/.next/server/app/settings/page.js +1 -1
  272. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  273. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  274. package/web/.next/server/app/skills/page/server-reference-manifest.json +13 -13
  275. package/web/.next/server/app/skills/page.js +2 -1
  276. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  277. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  278. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  279. package/web/.next/server/app/tools/page.js +2 -1
  280. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  281. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  282. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  283. package/web/.next/server/app/version/page.js.nft.json +1 -1
  284. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  285. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  286. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  287. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  288. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +1 -1
  289. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
  290. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  291. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +3 -0
  293. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -0
  294. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +3 -0
  295. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -0
  296. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +3 -0
  297. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -0
  298. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  299. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  301. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  303. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  305. package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js +3 -0
  306. package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -0
  307. package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +4 -0
  308. package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js.map +1 -0
  309. package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +3 -0
  310. package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -0
  311. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
  312. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
  313. package/web/.next/server/chunks/ssr/[root-of-the-server]__9a9cb046._.js +3 -0
  314. package/web/.next/server/chunks/ssr/[root-of-the-server]__9a9cb046._.js.map +1 -0
  315. package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js +4 -0
  316. package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js.map +1 -0
  317. package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +3 -0
  318. package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -0
  319. package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +3 -0
  320. package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -0
  321. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  322. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  323. package/web/.next/server/chunks/ssr/_02580450._.js +3 -0
  324. package/web/.next/server/chunks/ssr/_02580450._.js.map +1 -0
  325. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  326. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  327. package/web/.next/server/chunks/ssr/_1594e369._.js +9 -0
  328. package/web/.next/server/chunks/ssr/_1594e369._.js.map +1 -0
  329. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  330. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  331. package/web/.next/server/chunks/ssr/_21d37090._.js +3 -0
  332. package/web/.next/server/chunks/ssr/_21d37090._.js.map +1 -0
  333. package/web/.next/server/chunks/ssr/_45496654._.js +1 -1
  334. package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
  335. package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
  336. package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
  337. package/web/.next/server/chunks/ssr/_5119a3df._.js +1 -1
  338. package/web/.next/server/chunks/ssr/_5119a3df._.js.map +1 -1
  339. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  340. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  341. package/web/.next/server/chunks/ssr/{_0d7dd23b._.js → _767748d2._.js} +2 -2
  342. package/web/.next/server/chunks/ssr/_767748d2._.js.map +1 -0
  343. package/web/.next/server/chunks/ssr/_df737cce._.js +1 -1
  344. package/web/.next/server/chunks/ssr/{_77ae079a._.js → _ee42a212._.js} +2 -2
  345. package/web/.next/server/chunks/ssr/{_77ae079a._.js.map → _ee42a212._.js.map} +1 -1
  346. package/web/.next/server/chunks/ssr/_f8c55130._.js +4 -0
  347. package/web/.next/server/chunks/ssr/_f8c55130._.js.map +1 -0
  348. package/web/.next/server/chunks/ssr/_ff04802c._.js +3 -0
  349. package/web/.next/server/chunks/ssr/_ff04802c._.js.map +1 -0
  350. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  351. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  352. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  353. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  354. package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +3 -0
  355. package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -0
  356. package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +5 -0
  357. package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -0
  358. package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +5 -0
  359. package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -0
  360. package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +3 -0
  361. package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -0
  362. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +3 -0
  363. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -0
  364. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +3 -0
  365. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -0
  366. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +3 -0
  367. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -0
  368. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  369. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  370. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  371. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  372. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  373. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  374. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  375. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  376. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  377. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  378. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  379. package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js +3 -0
  380. package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -0
  381. package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +3 -0
  382. package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -0
  383. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
  384. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
  385. package/web/.next/server/pages/500.html +2 -2
  386. package/web/.next/server/server-reference-manifest.js +1 -1
  387. package/web/.next/server/server-reference-manifest.json +74 -59
  388. package/web/.next/static/chunks/051873309d87fb45.css +1 -0
  389. package/web/.next/static/chunks/{8e12deeabf6624e9.js → 16fa4d3877c28fe2.js} +1 -1
  390. package/web/.next/static/chunks/23d80bb760e7dc4c.js +1 -0
  391. package/web/.next/static/chunks/30a0ba9015f94405.js +7 -0
  392. package/web/.next/static/chunks/{7a6854bb07182777.js → 39f6ad3f9005703a.js} +1 -1
  393. package/web/.next/static/chunks/3aba9d2242420cb5.js +1 -0
  394. package/web/.next/static/chunks/7a6f56f37aaa17ea.js +1 -0
  395. package/web/.next/static/chunks/{b0a6fce5425f8d3a.js → 7e05e7e25220ee9a.js} +1 -1
  396. package/web/.next/static/chunks/{f9da308b3033c57a.js → 89dd90bf14488ec0.js} +1 -1
  397. package/web/.next/static/chunks/{2b2f3a70ebd6ac1c.js → 9374d251360e808b.js} +1 -1
  398. package/web/.next/static/chunks/{f29814a72404ea2b.js → 9423dc2310202fda.js} +1 -1
  399. package/web/.next/static/chunks/a794cf7a1a5648dd.js +1 -0
  400. package/web/.next/static/chunks/{3d1df5c349d855eb.js → a8edb9423086e83f.js} +1 -1
  401. package/web/.next/static/chunks/ae81796726a9bba3.js +1 -0
  402. package/web/.next/static/chunks/{a3802d6f8677cd04.js → b9c62932ed987239.js} +2 -2
  403. package/web/.next/static/chunks/{c5a0b452afc8fe47.js → d1c3e0ee8e788c87.js} +1 -1
  404. package/web/.next/static/chunks/{ca23a8642f750548.js → e8c3c12f92e9a521.js} +2 -2
  405. package/web/.next/static/chunks/f3d5e0ae13def35a.js +1 -0
  406. package/web/.next/static/chunks/{d5366257d6b9f855.js → fb8dadb64c0ffc6b.js} +1 -1
  407. package/web/.next/static/chunks/fd232b88b5b50b2e.js +1 -0
  408. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +0 -4
  409. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +0 -1
  410. package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js +0 -4
  411. package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js.map +0 -1
  412. package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js +0 -4
  413. package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js.map +0 -1
  414. package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js +0 -4
  415. package/web/.next/server/chunks/ssr/[root-of-the-server]__92ffd5ee._.js.map +0 -1
  416. package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js +0 -4
  417. package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js.map +0 -1
  418. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js +0 -4
  419. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js.map +0 -1
  420. package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js +0 -4
  421. package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js.map +0 -1
  422. package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js +0 -3
  423. package/web/.next/server/chunks/ssr/[root-of-the-server]__fa525872._.js.map +0 -1
  424. package/web/.next/server/chunks/ssr/_02e01240._.js +0 -4
  425. package/web/.next/server/chunks/ssr/_02e01240._.js.map +0 -1
  426. package/web/.next/server/chunks/ssr/_0d7dd23b._.js.map +0 -1
  427. package/web/.next/server/chunks/ssr/_18886033._.js +0 -4
  428. package/web/.next/server/chunks/ssr/_18886033._.js.map +0 -1
  429. package/web/.next/server/chunks/ssr/_22e00a14._.js +0 -4
  430. package/web/.next/server/chunks/ssr/_22e00a14._.js.map +0 -1
  431. package/web/.next/server/chunks/ssr/_43ba79e7._.js +0 -3
  432. package/web/.next/server/chunks/ssr/_43ba79e7._.js.map +0 -1
  433. package/web/.next/server/chunks/ssr/_a5a5901d._.js +0 -4
  434. package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +0 -1
  435. package/web/.next/server/chunks/ssr/_a963dd3c._.js +0 -3
  436. package/web/.next/server/chunks/ssr/_a963dd3c._.js.map +0 -1
  437. package/web/.next/server/chunks/ssr/_ad09f271._.js +0 -4
  438. package/web/.next/server/chunks/ssr/_ad09f271._.js.map +0 -1
  439. package/web/.next/server/chunks/ssr/_c3f595c6._.js +0 -4
  440. package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +0 -1
  441. package/web/.next/server/chunks/ssr/_deabc145._.js +0 -3
  442. package/web/.next/server/chunks/ssr/_deabc145._.js.map +0 -1
  443. package/web/.next/server/chunks/ssr/_e3f14907._.js +0 -9
  444. package/web/.next/server/chunks/ssr/_e3f14907._.js.map +0 -1
  445. package/web/.next/server/chunks/ssr/_ea9e1556._.js +0 -4
  446. package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +0 -1
  447. package/web/.next/server/chunks/ssr/_f1ba9be6._.js +0 -6
  448. package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +0 -1
  449. package/web/.next/server/chunks/ssr/_f33cd07e._.js +0 -6
  450. package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +0 -1
  451. package/web/.next/server/chunks/ssr/_f8b45233._.js +0 -4
  452. package/web/.next/server/chunks/ssr/_f8b45233._.js.map +0 -1
  453. package/web/.next/static/chunks/06a86173379e6c51.js +0 -1
  454. package/web/.next/static/chunks/16ed73f9880b7d63.js +0 -1
  455. package/web/.next/static/chunks/4559a403ee40dd19.js +0 -7
  456. package/web/.next/static/chunks/74e5b5c7950efbc1.js +0 -1
  457. package/web/.next/static/chunks/8b0a9cb5109fe899.js +0 -1
  458. package/web/.next/static/chunks/9c6f8f49799efd3a.js +0 -1
  459. package/web/.next/static/chunks/b14085e99b88e7f7.css +0 -1
  460. package/web/.next/static/chunks/b65e555419a0c664.js +0 -1
  461. package/web/.next/static/chunks/f51250616da82bd2.js +0 -1
  462. /package/web/.next/static/{0KDwNT3AGQmFGIwjHx99r → t6SUt71jyk_PYf152Imog}/_buildManifest.js +0 -0
  463. /package/web/.next/static/{0KDwNT3AGQmFGIwjHx99r → t6SUt71jyk_PYf152Imog}/_clientMiddlewareManifest.json +0 -0
  464. /package/web/.next/static/{0KDwNT3AGQmFGIwjHx99r → t6SUt71jyk_PYf152Imog}/_ssgManifest.js +0 -0
@@ -16,7 +16,7 @@ import { initializeContainer, container } from '../../../di/container.js';
16
16
  import { createFeatureAgentGraph } from './feature-agent-graph.js';
17
17
  import { createFastFeatureAgentGraph } from './fast-feature-agent-graph.js';
18
18
  import { createCheckpointer } from '../common/checkpointer.js';
19
- import { AgentRunStatus, SdlcLifecycle } from '../../../../domain/generated/output.js';
19
+ import { AgentRunStatus, SdlcLifecycle, SecurityMode, } from '../../../../domain/generated/output.js';
20
20
  import { initializeSettings } from '../../../services/settings.service.js';
21
21
  import { InitializeSettingsUseCase } from '../../../../application/use-cases/settings/initialize-settings.use-case.js';
22
22
  import { setHeartbeatContext } from './heartbeat.js';
@@ -76,6 +76,23 @@ export function parseWorkerArgs(args) {
76
76
  const resumeReason = resumeReasonIdx !== -1 && resumeReasonIdx + 1 < args.length
77
77
  ? args[resumeReasonIdx + 1]
78
78
  : undefined;
79
+ const securityModeIdx = args.indexOf('--security-mode');
80
+ const securityModeRaw = securityModeIdx !== -1 && securityModeIdx + 1 < args.length
81
+ ? args[securityModeIdx + 1]
82
+ : undefined;
83
+ const securityMode = securityModeRaw && Object.values(SecurityMode).includes(securityModeRaw)
84
+ ? securityModeRaw
85
+ : undefined;
86
+ const securityDispositionsIdx = args.indexOf('--security-dispositions');
87
+ let securityActionDispositions;
88
+ if (securityDispositionsIdx !== -1 && securityDispositionsIdx + 1 < args.length) {
89
+ try {
90
+ securityActionDispositions = JSON.parse(args[securityDispositionsIdx + 1]);
91
+ }
92
+ catch {
93
+ securityActionDispositions = undefined;
94
+ }
95
+ }
79
96
  return {
80
97
  featureId: getArg('feature-id'),
81
98
  runId: getArg('run-id'),
@@ -98,6 +115,8 @@ export function parseWorkerArgs(args) {
98
115
  fast,
99
116
  model,
100
117
  resumeReason,
118
+ securityMode,
119
+ securityActionDispositions,
101
120
  };
102
121
  }
103
122
  /** Simple worker logger — writes to stdout which is redirected to log file by the parent. */
@@ -159,6 +178,10 @@ export async function runWorker(args) {
159
178
  ...(args.agentType ? ['--agent-type', args.agentType] : []),
160
179
  ...(args.fast ? ['--fast'] : []),
161
180
  ...(args.model ? ['--model', args.model] : []),
181
+ ...(args.securityMode ? ['--security-mode', args.securityMode] : []),
182
+ ...(args.securityActionDispositions
183
+ ? ['--security-dispositions', JSON.stringify(args.securityActionDispositions)]
184
+ : []),
162
185
  ];
163
186
  log(`Starting worker — full command:`);
164
187
  log(` ${cmdParts.join(' ')}`);
@@ -292,6 +315,10 @@ export async function runWorker(args) {
292
315
  ciWatchEnabled: args.ciWatchEnabled ?? true,
293
316
  enableEvidence: args.enableEvidence ?? false,
294
317
  commitEvidence: args.commitEvidence ?? false,
318
+ ...(args.securityMode ? { securityMode: args.securityMode } : {}),
319
+ ...(args.securityActionDispositions
320
+ ? { securityActionDispositions: args.securityActionDispositions }
321
+ : {}),
295
322
  }, graphConfig);
296
323
  }
297
324
  else {
@@ -310,6 +337,10 @@ export async function runWorker(args) {
310
337
  ciWatchEnabled: args.ciWatchEnabled ?? true,
311
338
  enableEvidence: args.enableEvidence ?? false,
312
339
  commitEvidence: args.commitEvidence ?? false,
340
+ ...(args.securityMode ? { securityMode: args.securityMode } : {}),
341
+ ...(args.securityActionDispositions
342
+ ? { securityActionDispositions: args.securityActionDispositions }
343
+ : {}),
313
344
  }, graphConfig);
314
345
  }
315
346
  log(`Graph invocation completed. Error: ${result.error ?? 'none'}`);
@@ -1 +1 @@
1
- {"version":3,"file":"node-helpers.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages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M,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,MAAM,CAiCT;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAa3E;AAKD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,UAAU,GACd,IAAI,CA6BN;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,UAAU,KAAK,MAAM,GACjE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAwInE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,QAAQ,EAAE,EACpB,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,GACvC,IAAI,CAaN"}
1
+ {"version":3,"file":"node-helpers.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAK5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUrD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;IAE7C,4DAA4D;gBAChD,IAAI;kBAGF,MAAM,GAAG,IA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Q,EAAE,MAAM,EAChB,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,UAAU,KAAK,MAAM,GACjE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAqKnE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,QAAQ,EAAE,EACpB,GAAG,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,GACvC,IAAI,CAaN"}
@@ -9,7 +9,10 @@ import { mkdirSync, readFileSync, writeFileSync, renameSync, unlinkSync } from '
9
9
  import { execSync } from 'node:child_process';
10
10
  import { join, dirname, relative } from 'node:path';
11
11
  import { interrupt, isGraphBubbleUp } from '@langchain/langgraph';
12
+ import { SecurityMode } from '../../../../../domain/generated/output.js';
12
13
  import { hasSettings, getSettings } from '../../../../services/settings.service.js';
14
+ import { SecurityViolationError } from '../../../../../domain/errors/security-violation.error.js';
15
+ import { checkSecurityDisposition } from './security-pre-check.js';
13
16
  import { reportNodeStart } from '../heartbeat.js';
14
17
  import { recordPhaseStart, recordPhaseEnd, recordApprovalWaitStart, } from '../phase-timing-context.js';
15
18
  import { updateNodeLifecycle } from '../lifecycle-context.js';
@@ -489,6 +492,22 @@ export function executeNode(nodeName, executor, buildPrompt) {
489
492
  };
490
493
  }
491
494
  }
495
+ // Security pre-check: evaluate policy before executing the agent
496
+ const securityCheck = checkSecurityDisposition(nodeName, state.securityMode ?? SecurityMode.Disabled, state.securityActionDispositions ?? {});
497
+ if (securityCheck.action === 'deny') {
498
+ throw new SecurityViolationError(`Node "${nodeName}" denied by security policy (category: ${securityCheck.category})`, securityCheck.category, `Action category "${securityCheck.category}" is denied. Update security policy to allow this action.`);
499
+ }
500
+ if (securityCheck.action === 'approval_required') {
501
+ log.info(`Security policy requires approval for "${nodeName}" (category: ${securityCheck.category})`);
502
+ interrupt({
503
+ node: nodeName,
504
+ message: `Security policy requires approval for "${securityCheck.category}" before "${nodeName}" can execute.`,
505
+ securityCategory: securityCheck.category,
506
+ });
507
+ }
508
+ if (securityCheck.action === 'warn') {
509
+ log.info(`Security advisory: "${nodeName}" would be restricted (category: ${securityCheck.category})`);
510
+ }
492
511
  const startTime = Date.now();
493
512
  const resumePrefix = buildResumeContext(state.resumeReason);
494
513
  const prompt = resumePrefix + buildPrompt(state, log);
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Security Pre-Check for Feature Agent Nodes
3
+ *
4
+ * Classifies node actions by SecurityActionCategory and evaluates
5
+ * the effective disposition based on the security policy mode and
6
+ * per-category overrides from FeatureAgentState.
7
+ *
8
+ * Used by executeNode() to enforce or warn about security policy
9
+ * before executing agent prompts.
10
+ */
11
+ import { SecurityActionCategory, SecurityActionDisposition, SecurityMode } from '../../../../../domain/generated/output.js';
12
+ /**
13
+ * Classify a node name into its SecurityActionCategory.
14
+ * Returns null for read-only nodes (requirements, research, plan, analyze)
15
+ * that have no security-sensitive actions.
16
+ */
17
+ export declare function classifyNodeAction(nodeName: string): SecurityActionCategory | null;
18
+ /** Result of a security disposition check. */
19
+ export type SecurityCheckResult = {
20
+ action: 'skip';
21
+ } | {
22
+ action: 'allow';
23
+ } | {
24
+ action: 'warn';
25
+ category: SecurityActionCategory;
26
+ nodeName: string;
27
+ } | {
28
+ action: 'deny';
29
+ category: SecurityActionCategory;
30
+ nodeName: string;
31
+ } | {
32
+ action: 'approval_required';
33
+ category: SecurityActionCategory;
34
+ nodeName: string;
35
+ };
36
+ /**
37
+ * Check the security disposition for a node based on the effective policy.
38
+ *
39
+ * @param nodeName - The graph node name (e.g. 'implement', 'merge')
40
+ * @param securityMode - Effective security mode from state
41
+ * @param actionDispositions - Per-category disposition overrides from state
42
+ * @returns The action to take: skip, allow, warn, deny, or approval_required
43
+ */
44
+ export declare function checkSecurityDisposition(nodeName: string, securityMode: SecurityMode, actionDispositions: Partial<Record<SecurityActionCategory, SecurityActionDisposition>>): SecurityCheckResult;
45
+ //# sourceMappingURL=security-pre-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-pre-check.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,YAAY,EACb,MAAM,8BAA8B,CAAC;AAWtC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI,CAElF;AAED,8CAA8C;AAC9C,MAAM,MAAM,mBAAmB,GAC3B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtE;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC,GACrF,mBAAmB,CAyCrB"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Security Pre-Check for Feature Agent Nodes
3
+ *
4
+ * Classifies node actions by SecurityActionCategory and evaluates
5
+ * the effective disposition based on the security policy mode and
6
+ * per-category overrides from FeatureAgentState.
7
+ *
8
+ * Used by executeNode() to enforce or warn about security policy
9
+ * before executing agent prompts.
10
+ */
11
+ import { SecurityActionCategory, SecurityActionDisposition, SecurityMode, } from '../../../../../domain/generated/output.js';
12
+ /** Map node names to the security action category they represent. */
13
+ const NODE_ACTION_MAP = {
14
+ implement: SecurityActionCategory.PackageScriptExec,
15
+ 'fast-implement': SecurityActionCategory.PackageScriptExec,
16
+ evidence: SecurityActionCategory.PackageScriptExec,
17
+ merge: SecurityActionCategory.CiWorkflowModify,
18
+ 'ci-fix': SecurityActionCategory.CiWorkflowModify,
19
+ };
20
+ /**
21
+ * Classify a node name into its SecurityActionCategory.
22
+ * Returns null for read-only nodes (requirements, research, plan, analyze)
23
+ * that have no security-sensitive actions.
24
+ */
25
+ export function classifyNodeAction(nodeName) {
26
+ return NODE_ACTION_MAP[nodeName] ?? null;
27
+ }
28
+ /**
29
+ * Check the security disposition for a node based on the effective policy.
30
+ *
31
+ * @param nodeName - The graph node name (e.g. 'implement', 'merge')
32
+ * @param securityMode - Effective security mode from state
33
+ * @param actionDispositions - Per-category disposition overrides from state
34
+ * @returns The action to take: skip, allow, warn, deny, or approval_required
35
+ */
36
+ export function checkSecurityDisposition(nodeName, securityMode, actionDispositions) {
37
+ // Disabled mode — no checks
38
+ if (securityMode === SecurityMode.Disabled) {
39
+ return { action: 'skip' };
40
+ }
41
+ // Read-only nodes have no security-sensitive actions
42
+ const category = classifyNodeAction(nodeName);
43
+ if (!category) {
44
+ return { action: 'skip' };
45
+ }
46
+ // Look up the disposition for this category
47
+ const disposition = actionDispositions[category];
48
+ // No disposition configured — default to allow
49
+ if (!disposition) {
50
+ return { action: 'allow' };
51
+ }
52
+ if (disposition === SecurityActionDisposition.Allowed) {
53
+ return { action: 'allow' };
54
+ }
55
+ if (disposition === SecurityActionDisposition.Denied) {
56
+ // In Enforce mode, deny the action; in Advisory mode, just warn
57
+ if (securityMode === SecurityMode.Enforce) {
58
+ return { action: 'deny', category, nodeName };
59
+ }
60
+ return { action: 'warn', category, nodeName };
61
+ }
62
+ if (disposition === SecurityActionDisposition.ApprovalRequired) {
63
+ // In Enforce mode, require approval; in Advisory mode, just warn
64
+ if (securityMode === SecurityMode.Enforce) {
65
+ return { action: 'approval_required', category, nodeName };
66
+ }
67
+ return { action: 'warn', category, nodeName };
68
+ }
69
+ return { action: 'allow' };
70
+ }
@@ -1,4 +1,5 @@
1
- import type { ApprovalGates, CiFixRecord, Evidence } from '../../../../domain/generated/output.js';
1
+ import type { ApprovalGates, CiFixRecord, Evidence, SecurityActionCategory, SecurityActionDisposition } from '../../../../domain/generated/output.js';
2
+ import { SecurityMode } from '../../../../domain/generated/output.js';
2
3
  /**
3
4
  * State annotation for the feature-agent graph.
4
5
  *
@@ -59,6 +60,8 @@ export declare const FeatureAgentAnnotation: import("@langchain/langgraph").Anno
59
60
  ciFixAttempts: import("@langchain/langgraph").BinaryOperatorAggregate<number, number>;
60
61
  ciFixHistory: import("@langchain/langgraph").BinaryOperatorAggregate<CiFixRecord[], CiFixRecord[]>;
61
62
  ciFixStatus: import("@langchain/langgraph").BinaryOperatorAggregate<"success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted", "success" | "timeout" | "idle" | "watching" | "fixing" | "exhausted">;
63
+ securityMode: import("@langchain/langgraph").BinaryOperatorAggregate<SecurityMode, SecurityMode>;
64
+ securityActionDispositions: import("@langchain/langgraph").BinaryOperatorAggregate<Partial<Record<SecurityActionCategory, SecurityActionDisposition>>, Partial<Record<SecurityActionCategory, SecurityActionDisposition>>>;
62
65
  }>;
63
66
  export type FeatureAgentState = typeof FeatureAgentAnnotation.State;
64
67
  //# sourceMappingURL=state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwHjC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,OAAO,sBAAsB,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/services/agents/feature-agent/state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,QAAQ,EACR,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmIjC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,OAAO,sBAAsB,CAAC,KAAK,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Annotation } from '@langchain/langgraph';
2
+ import { SecurityMode } from '../../../../domain/generated/output.js';
2
3
  /**
3
4
  * State annotation for the feature-agent graph.
4
5
  *
@@ -126,4 +127,13 @@ export const FeatureAgentAnnotation = Annotation.Root({
126
127
  reducer: (_prev, next) => next,
127
128
  default: () => 'idle',
128
129
  }),
130
+ // --- Security policy state (set once at spawn, read by nodes) ---
131
+ securityMode: Annotation({
132
+ reducer: (_prev, next) => next,
133
+ default: () => SecurityMode.Disabled,
134
+ }),
135
+ securityActionDispositions: Annotation({
136
+ reducer: (_prev, next) => next,
137
+ default: () => ({}),
138
+ }),
129
139
  });
@@ -5,7 +5,7 @@
5
5
  * checks, repository listing, cloning (with progress streaming), and URL parsing.
6
6
  */
7
7
  import type { ExecFunction } from '../git/worktree.service.js';
8
- import type { IGitHubRepositoryService, GitHubRepo, GitHubOrganization, ListUserRepositoriesOptions, CloneOptions, ParsedGitHubUrl } from '../../../application/ports/output/services/github-repository-service.interface.js';
8
+ import type { IGitHubRepositoryService, GitHubRepo, GitHubOrganization, ListUserRepositoriesOptions, CloneOptions, ParsedGitHubUrl, GovernanceFinding } from '../../../application/ports/output/services/github-repository-service.interface.js';
9
9
  export declare class GitHubRepositoryService implements IGitHubRepositoryService {
10
10
  private readonly execFile;
11
11
  constructor(execFile: ExecFunction);
@@ -15,6 +15,15 @@ export declare class GitHubRepositoryService implements IGitHubRepositoryService
15
15
  cloneRepository(nameWithOwner: string, destination: string, options?: CloneOptions): Promise<void>;
16
16
  parseGitHubUrl(url: string): ParsedGitHubUrl;
17
17
  getViewerPermission(repoPath: string): Promise<string>;
18
+ auditRepositoryGovernance(owner: string, repo: string, defaultBranch?: string): Promise<GovernanceFinding[]>;
19
+ private checkBranchProtection;
20
+ private checkCodeowners;
21
+ /**
22
+ * Handle errors from governance API calls gracefully.
23
+ * 404 errors are treated as findings (missing config).
24
+ * Auth/permission errors are treated as Unknown severity findings.
25
+ */
26
+ private handleGovernanceCheckError;
18
27
  private cleanupPartialClone;
19
28
  }
20
29
  //# sourceMappingURL=github-repository.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github-repository.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/external/github-repository.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,wBAAwB,EACxB,UAAU,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,YAAY,EACZ,eAAe,EAChB,MAAM,mFAAmF,CAAC;AAyB3F,qBACa,uBAAwB,YAAW,wBAAwB;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB1B,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAuClF,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IA2BlD,eAAe,CACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC;IAgDhB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IA2CtC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAyB9C,mBAAmB;CAOlC"}
1
+ {"version":3,"file":"github-repository.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/external/github-repository.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,wBAAwB,EACxB,UAAU,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,YAAY,EACZ,eAAe,EACf,iBAAiB,EAClB,MAAM,mFAAmF,CAAC;AA0B3F,qBACa,uBAAwB,YAAW,wBAAwB;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB1B,oBAAoB,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAuClF,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IA2BlD,eAAe,CACnB,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,IAAI,CAAC;IAgDhB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe;IA2CtC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAyBtD,yBAAyB,CAC7B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,aAAa,SAAS,GACrB,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAcjB,qBAAqB;YAmCrB,eAAe;IA6B7B;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;YA6CpB,mBAAmB;CAOlC"}
@@ -20,7 +20,7 @@ import { injectable, inject } from 'tsyringe';
20
20
  import { resolve, normalize } from 'node:path';
21
21
  import { rm } from 'node:fs/promises';
22
22
  import { spawn } from 'node:child_process';
23
- import { GitHubAuthError, GitHubCloneError, GitHubPermissionError, GitHubRepoListError, GitHubUrlParseError, } from '../../../application/ports/output/services/github-repository-service.interface.js';
23
+ import { GitHubAuthError, GitHubCloneError, GitHubPermissionError, GitHubRepoListError, GitHubUrlParseError, GovernanceFindingCategory, } from '../../../application/ports/output/services/github-repository-service.interface.js';
24
24
  // ---------------------------------------------------------------------------
25
25
  // URL regex patterns
26
26
  // ---------------------------------------------------------------------------
@@ -191,6 +191,106 @@ let GitHubRepositoryService = class GitHubRepositoryService {
191
191
  throw new GitHubPermissionError(`Failed to check repository permission: ${cause?.message ?? String(error)}`, cause);
192
192
  }
193
193
  }
194
+ async auditRepositoryGovernance(owner, repo, defaultBranch = 'main') {
195
+ const findings = [];
196
+ // Check branch protection
197
+ const branchFindings = await this.checkBranchProtection(owner, repo, defaultBranch);
198
+ findings.push(...branchFindings);
199
+ // Check CODEOWNERS presence
200
+ const codeownersFindings = await this.checkCodeowners(owner, repo);
201
+ findings.push(...codeownersFindings);
202
+ return findings;
203
+ }
204
+ async checkBranchProtection(owner, repo, branch) {
205
+ try {
206
+ const { stdout } = await this.execFile('gh', [
207
+ 'api',
208
+ `/repos/${owner}/${repo}/branches/${branch}/protection`,
209
+ ]);
210
+ const protection = JSON.parse(stdout);
211
+ // Protection exists — check for PR review requirements
212
+ if (!protection.required_pull_request_reviews) {
213
+ return [
214
+ {
215
+ category: GovernanceFindingCategory.BranchProtection,
216
+ severity: 'Medium',
217
+ message: `Branch "${branch}" has protection enabled but does not require pull request reviews.`,
218
+ remediation: `Enable "Require a pull request before merging" in branch protection settings for "${branch}".`,
219
+ },
220
+ ];
221
+ }
222
+ return [];
223
+ }
224
+ catch (error) {
225
+ return this.handleGovernanceCheckError(error, GovernanceFindingCategory.BranchProtection, `Branch "${branch}" has no branch protection rules configured.`, `Enable branch protection for "${branch}" in repository settings. Require pull request reviews and status checks.`);
226
+ }
227
+ }
228
+ async checkCodeowners(owner, repo) {
229
+ // CODEOWNERS can live in repo root or .github/ directory
230
+ const paths = [
231
+ `/repos/${owner}/${repo}/contents/CODEOWNERS`,
232
+ `/repos/${owner}/${repo}/contents/.github/CODEOWNERS`,
233
+ ];
234
+ for (const path of paths) {
235
+ try {
236
+ await this.execFile('gh', ['api', path]);
237
+ // Found CODEOWNERS — no finding needed
238
+ return [];
239
+ }
240
+ catch {
241
+ // Not found at this path — try next
242
+ }
243
+ }
244
+ // Neither location found
245
+ return [
246
+ {
247
+ category: GovernanceFindingCategory.Codeowners,
248
+ severity: 'Medium',
249
+ message: 'No CODEOWNERS file found in the repository.',
250
+ remediation: 'Add a CODEOWNERS file to the repository root or .github/ directory to enforce code review ownership.',
251
+ },
252
+ ];
253
+ }
254
+ /**
255
+ * Handle errors from governance API calls gracefully.
256
+ * 404 errors are treated as findings (missing config).
257
+ * Auth/permission errors are treated as Unknown severity findings.
258
+ */
259
+ handleGovernanceCheckError(error, category, notFoundMessage, notFoundRemediation) {
260
+ const errMessage = error instanceof Error ? error.message : String(error);
261
+ const errnoCode = error?.code;
262
+ // gh not installed
263
+ if (errnoCode === 'ENOENT') {
264
+ return [
265
+ {
266
+ category,
267
+ severity: 'Unknown',
268
+ message: 'GitHub CLI (gh) is not installed. Cannot audit repository governance.',
269
+ remediation: 'Install the GitHub CLI from https://cli.github.com/',
270
+ },
271
+ ];
272
+ }
273
+ // 404 = resource not configured (branch protection, file missing, etc.)
274
+ if (errMessage.includes('404')) {
275
+ return [
276
+ {
277
+ category,
278
+ severity: 'High',
279
+ message: notFoundMessage,
280
+ remediation: notFoundRemediation,
281
+ },
282
+ ];
283
+ }
284
+ // Auth/permission errors or other unexpected failures — return Unknown finding
285
+ return [
286
+ {
287
+ category,
288
+ severity: 'Unknown',
289
+ message: `Unable to audit ${category}: ${errMessage}`,
290
+ remediation: 'Verify that the GitHub CLI is authenticated with sufficient permissions. Run `gh auth login`.',
291
+ },
292
+ ];
293
+ }
194
294
  async cleanupPartialClone(destination) {
195
295
  try {
196
296
  await rm(destination, { recursive: true, force: true });
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Dependency Risk Evaluator
3
+ *
4
+ * Evaluates repository-local dependency risk signals without
5
+ * external services. Checks:
6
+ * - Manifest-lockfile consistency (package.json vs lockfile)
7
+ * - Dependency source types (registry vs git vs file)
8
+ * - Risky lifecycle scripts (preinstall, postinstall, prepare)
9
+ * - Allowlist/denylist enforcement
10
+ * - Version-range strictness
11
+ *
12
+ * Returns an array of DependencyFinding objects with severity and remediation.
13
+ */
14
+ import type { DependencyFinding, DependencyRules } from '../../../domain/generated/output.js';
15
+ export declare class DependencyRiskEvaluator {
16
+ /**
17
+ * Evaluate dependency risk for a repository.
18
+ *
19
+ * @param repositoryPath - Absolute path to the repository root
20
+ * @param rules - Dependency risk policy rules
21
+ * @returns Array of dependency findings
22
+ */
23
+ evaluate(repositoryPath: string, rules: DependencyRules): DependencyFinding[];
24
+ /**
25
+ * Collect all dependencies from package.json (dependencies + devDependencies).
26
+ */
27
+ private collectDependencies;
28
+ /**
29
+ * Check that a lockfile exists when there are dependencies.
30
+ */
31
+ private checkLockfileConsistency;
32
+ /**
33
+ * Check for dependencies installed from non-registry sources.
34
+ */
35
+ private checkNonRegistrySources;
36
+ /**
37
+ * Check installed packages for risky lifecycle scripts.
38
+ */
39
+ private checkLifecycleScripts;
40
+ /**
41
+ * Check dependencies against the denylist.
42
+ */
43
+ private checkDenylist;
44
+ /**
45
+ * Check dependencies against the allowlist (non-empty allowlist = only listed packages allowed).
46
+ */
47
+ private checkAllowlist;
48
+ /**
49
+ * Check version ranges for strictness (no ^, ~, *, >= patterns).
50
+ */
51
+ private checkVersionRangeStrictness;
52
+ }
53
+ //# sourceMappingURL=dependency-risk-evaluator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency-risk-evaluator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/security/dependency-risk-evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAsB9F,qBAAa,uBAAuB;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,iBAAiB,EAAE;IAmD7E;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IA0BhC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAqB/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA8C7B;;OAEG;IACH,OAAO,CAAC,aAAa;IAoBrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,OAAO,CAAC,2BAA2B;CAwBpC"}