@shepai/cli 1.175.0 → 1.175.1-pr527.ea242b8

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 (416) 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/FeatureFlags.yaml +5 -0
  7. package/apis/json-schema/ReleaseIntegrityCheck.yaml +22 -0
  8. package/apis/json-schema/ReleaseIntegrityCheckType.yaml +9 -0
  9. package/apis/json-schema/ReleaseIntegrityResult.yaml +16 -0
  10. package/apis/json-schema/ReleaseRules.yaml +21 -0
  11. package/apis/json-schema/SecurityActionCategory.yaml +10 -0
  12. package/apis/json-schema/SecurityActionDisposition.yaml +8 -0
  13. package/apis/json-schema/SecurityConfig.yaml +17 -0
  14. package/apis/json-schema/SecurityEvent.yaml +36 -0
  15. package/apis/json-schema/SecurityMode.yaml +8 -0
  16. package/apis/json-schema/SecurityPolicy.yaml +24 -0
  17. package/apis/json-schema/SecuritySeverity.yaml +9 -0
  18. package/apis/json-schema/Settings.yaml +3 -0
  19. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +15 -1
  20. package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
  21. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +3 -1
  22. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  23. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts +76 -0
  24. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts.map +1 -0
  25. package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.js +11 -0
  26. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +38 -0
  27. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
  28. package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +9 -0
  29. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts +77 -0
  30. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts.map +1 -0
  31. package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.js +13 -0
  32. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +11 -0
  33. package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
  34. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
  35. package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +2 -0
  36. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
  37. package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +2 -0
  38. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts.map +1 -1
  39. package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +2 -0
  40. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  41. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +1 -0
  42. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  43. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +2 -0
  44. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
  45. package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +2 -0
  46. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts +71 -0
  47. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts.map +1 -0
  48. package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.js +215 -0
  49. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts +24 -0
  50. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts.map +1 -0
  51. package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.js +56 -0
  52. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts +36 -0
  53. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts.map +1 -0
  54. package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.js +76 -0
  55. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts +14 -0
  56. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts.map +1 -0
  57. package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.js +46 -0
  58. package/dist/packages/core/src/domain/errors/security-violation.error.d.ts +15 -0
  59. package/dist/packages/core/src/domain/errors/security-violation.error.d.ts.map +1 -0
  60. package/dist/packages/core/src/domain/errors/security-violation.error.js +20 -0
  61. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  62. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +6 -1
  63. package/dist/packages/core/src/domain/generated/output.d.ts +263 -0
  64. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  65. package/dist/packages/core/src/domain/generated/output.js +43 -0
  66. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  67. package/dist/packages/core/src/infrastructure/di/container.js +57 -0
  68. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts +44 -0
  69. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts.map +1 -0
  70. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.js +55 -0
  71. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +4 -0
  72. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  73. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +17 -0
  74. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts +18 -0
  75. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts.map +1 -0
  76. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.js +31 -0
  77. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts +29 -0
  78. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts.map +1 -0
  79. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.js +53 -0
  80. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.d.ts +16 -0
  81. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.d.ts.map +1 -0
  82. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.js +22 -0
  83. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts +24 -0
  84. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts.map +1 -0
  85. package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.js +96 -0
  86. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  87. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +15 -3
  88. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +2 -0
  89. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
  90. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +12 -0
  91. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts.map +1 -1
  92. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +44 -4
  93. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts +22 -0
  94. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts.map +1 -0
  95. package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.js +30 -0
  96. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +10 -0
  97. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  98. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +35 -1
  99. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  100. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +3 -1
  101. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  102. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +7 -1
  103. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +3 -1
  104. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  105. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -1
  106. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  107. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +25 -0
  108. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts +59 -0
  109. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts.map +1 -0
  110. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.js +89 -0
  111. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +4 -1
  112. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  113. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +10 -0
  114. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +10 -1
  115. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
  116. package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +101 -1
  117. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts +53 -0
  118. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts.map +1 -0
  119. package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.js +241 -0
  120. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts +44 -0
  121. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts.map +1 -0
  122. package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.js +194 -0
  123. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts +28 -0
  124. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts.map +1 -0
  125. package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.js +50 -0
  126. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts +26 -0
  127. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts.map +1 -0
  128. package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.js +147 -0
  129. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts +44 -0
  130. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts.map +1 -0
  131. package/dist/packages/core/src/infrastructure/services/security/security-policy.service.js +174 -0
  132. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -0
  133. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
  134. package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +61 -0
  135. package/dist/src/presentation/cli/commands/security.command.d.ts +16 -0
  136. package/dist/src/presentation/cli/commands/security.command.d.ts.map +1 -0
  137. package/dist/src/presentation/cli/commands/security.command.js +133 -0
  138. package/dist/src/presentation/cli/index.js +2 -0
  139. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
  140. package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +5 -1
  141. package/dist/src/presentation/web/app/actions/security.d.ts +28 -0
  142. package/dist/src/presentation/web/app/actions/security.d.ts.map +1 -0
  143. package/dist/src/presentation/web/app/actions/security.js +59 -0
  144. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +3 -1
  145. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
  146. package/dist/src/presentation/web/app/build-graph-nodes.js +2 -0
  147. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +3 -1
  148. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  149. package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
  150. package/dist/src/presentation/web/components/common/feature-node/feature-node.js +2 -1
  151. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts +3 -1
  152. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  153. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +3 -2
  154. package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts +6 -0
  155. package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts.map +1 -0
  156. package/dist/src/presentation/web/components/common/repository-node/security-panel.js +29 -0
  157. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts +10 -0
  158. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts.map +1 -0
  159. package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.js +53 -0
  160. package/dist/src/presentation/web/components/common/security-badge.d.ts +7 -0
  161. package/dist/src/presentation/web/components/common/security-badge.d.ts.map +1 -0
  162. package/dist/src/presentation/web/components/common/security-badge.js +30 -0
  163. package/dist/src/presentation/web/components/common/security-badge.stories.d.ts +12 -0
  164. package/dist/src/presentation/web/components/common/security-badge.stories.d.ts.map +1 -0
  165. package/dist/src/presentation/web/components/common/security-badge.stories.js +20 -0
  166. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  167. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -0
  168. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  169. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
  170. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  171. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +26 -7
  172. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  173. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
  174. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts +6 -0
  175. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts.map +1 -0
  176. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.js +60 -0
  177. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts +14 -0
  178. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts.map +1 -0
  179. package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.js +116 -0
  180. package/dist/translations/ar/cli.json +21 -0
  181. package/dist/translations/ar/web.json +43 -1
  182. package/dist/translations/de/cli.json +21 -0
  183. package/dist/translations/de/web.json +43 -1
  184. package/dist/translations/en/cli.json +21 -0
  185. package/dist/translations/en/web.json +43 -1
  186. package/dist/translations/es/cli.json +21 -0
  187. package/dist/translations/es/web.json +43 -1
  188. package/dist/translations/fr/cli.json +21 -0
  189. package/dist/translations/fr/web.json +43 -1
  190. package/dist/translations/he/cli.json +21 -0
  191. package/dist/translations/he/web.json +43 -1
  192. package/dist/translations/pt/cli.json +22 -1
  193. package/dist/translations/pt/web.json +43 -1
  194. package/dist/translations/ru/cli.json +21 -0
  195. package/dist/translations/ru/web.json +43 -1
  196. package/dist/tsconfig.build.tsbuildinfo +1 -1
  197. package/package.json +1 -1
  198. package/web/.next/BUILD_ID +1 -1
  199. package/web/.next/build-manifest.json +2 -2
  200. package/web/.next/fallback-build-manifest.json +2 -2
  201. package/web/.next/prerender-manifest.json +3 -3
  202. package/web/.next/required-server-files.js +3 -3
  203. package/web/.next/required-server-files.json +3 -3
  204. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  205. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  206. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  207. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  208. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  209. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  210. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  211. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  212. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  213. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  214. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  215. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  216. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +38 -38
  217. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  218. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  219. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  220. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  221. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  222. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  223. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  224. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  225. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  226. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  227. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  228. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  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.nft.json +1 -1
  233. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  234. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +38 -38
  235. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  236. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  237. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  238. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  239. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  240. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  241. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  242. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  243. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  244. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  245. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  246. package/web/.next/server/app/_global-error.html +2 -2
  247. package/web/.next/server/app/_global-error.rsc +1 -1
  248. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  249. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  250. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  251. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  252. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  253. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  254. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  255. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  256. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  257. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  258. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  259. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  260. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  261. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
  262. package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
  263. package/web/.next/server/app/features/page.js.nft.json +1 -1
  264. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  265. package/web/.next/server/app/settings/page/server-reference-manifest.json +33 -18
  266. package/web/.next/server/app/settings/page.js +1 -1
  267. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  268. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  269. package/web/.next/server/app/skills/page/server-reference-manifest.json +13 -13
  270. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  271. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  272. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  273. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  274. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  275. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  276. package/web/.next/server/app/version/page.js.nft.json +1 -1
  277. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  278. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  279. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  280. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  281. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +1 -1
  282. package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
  283. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  284. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  285. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +1 -1
  286. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -1
  287. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +1 -1
  288. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -1
  289. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +1 -1
  290. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -1
  291. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  292. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  293. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  294. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  295. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  296. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  297. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  298. package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js +1 -1
  299. package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +2 -2
  301. package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +1 -1
  303. package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
  305. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
  306. package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js +4 -0
  307. package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js.map +1 -0
  308. package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +1 -1
  309. package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +1 -1
  311. package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -1
  312. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  313. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  314. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  315. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  316. package/web/.next/server/chunks/ssr/_08eaf4b1._.js +3 -0
  317. package/web/.next/server/chunks/ssr/_08eaf4b1._.js.map +1 -0
  318. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  319. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  320. package/web/.next/server/chunks/ssr/_295fffde._.js +1 -1
  321. package/web/.next/server/chunks/ssr/_295fffde._.js.map +1 -1
  322. package/web/.next/server/chunks/ssr/_45496654._.js +1 -1
  323. package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
  324. package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
  325. package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
  326. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  327. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  328. package/web/.next/server/chunks/ssr/_6abfa39e._.js +1 -1
  329. package/web/.next/server/chunks/ssr/_783debcb._.js +9 -0
  330. package/web/.next/server/chunks/ssr/_783debcb._.js.map +1 -0
  331. package/web/.next/server/chunks/ssr/{_af6b8b94._.js → _e7f76333._.js} +2 -2
  332. package/web/.next/server/chunks/ssr/{_af6b8b94._.js.map → _e7f76333._.js.map} +1 -1
  333. package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
  334. package/web/.next/server/chunks/ssr/_f8c55130._.js.map +1 -1
  335. package/web/.next/server/chunks/ssr/{_e0dd6fcf._.js → _fc1578d7._.js} +2 -2
  336. package/web/.next/server/chunks/ssr/_fc1578d7._.js.map +1 -0
  337. package/web/.next/server/chunks/ssr/_ff04802c._.js +3 -0
  338. package/web/.next/server/chunks/ssr/_ff04802c._.js.map +1 -0
  339. package/web/.next/server/chunks/ssr/_ff87ffa6._.js +3 -0
  340. package/web/.next/server/chunks/ssr/_ff87ffa6._.js.map +1 -0
  341. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  342. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  343. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  344. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  345. package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +1 -1
  346. package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -1
  347. package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +2 -2
  348. package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -1
  349. package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +2 -2
  350. package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -1
  351. package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +1 -1
  352. package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -1
  353. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +1 -1
  354. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -1
  355. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +1 -1
  356. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -1
  357. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +1 -1
  358. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -1
  359. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  360. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  361. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  362. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  363. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  364. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  365. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  366. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  367. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  368. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  369. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  370. package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js +1 -1
  371. package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -1
  372. package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +1 -1
  373. package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -1
  374. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
  375. package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
  376. package/web/.next/server/pages/500.html +2 -2
  377. package/web/.next/server/server-reference-manifest.js +1 -1
  378. package/web/.next/server/server-reference-manifest.json +74 -59
  379. package/web/.next/static/chunks/{238fdbed09dc61b6.js → 1eeabda286169861.js} +2 -2
  380. package/web/.next/static/chunks/20ec94c610d07a10.css +1 -0
  381. package/web/.next/static/chunks/{940c842293a6ee9b.js → 2dcae7bd1f3e2b51.js} +1 -1
  382. package/web/.next/static/chunks/3aba9d2242420cb5.js +1 -0
  383. package/web/.next/static/chunks/6003ad985fb78e62.js +1 -0
  384. package/web/.next/static/chunks/{0b07ee72b0c639ef.js → 69aa6a996dccb7dc.js} +2 -2
  385. package/web/.next/static/chunks/{873e837cd1179cdd.js → 6e5aeb5da5bb2ab6.js} +1 -1
  386. package/web/.next/static/chunks/{2ad924f5ba5ec0a6.js → 7c8e1ab108e3ceea.js} +1 -1
  387. package/web/.next/static/chunks/{bc41a393614b1192.js → 825ddcb7c361b2fe.js} +1 -1
  388. package/web/.next/static/chunks/{a22ee308ae1509ca.js → 89a6182ae40ac10b.js} +1 -1
  389. package/web/.next/static/chunks/{d26542df5ecc8717.js → a6d516b7e128f889.js} +1 -1
  390. package/web/.next/static/chunks/ae81796726a9bba3.js +1 -0
  391. package/web/.next/static/chunks/{b49ab0b290e9342d.js → b46545caae3b4930.js} +1 -1
  392. package/web/.next/static/chunks/{b7b5d65a5dd2fff1.js → c43f00ac45c5381d.js} +1 -1
  393. package/web/.next/static/chunks/{39054eabee156e55.js → c741f40bcb2abe54.js} +3 -3
  394. package/web/.next/static/chunks/{1b336d1266a0aa3d.js → dfc05704351fc940.js} +1 -1
  395. package/web/.next/static/chunks/eb72ac7aa8986962.js +1 -0
  396. package/web/.next/static/chunks/eef5d47669e61a54.js +3 -0
  397. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +0 -4
  398. package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +0 -1
  399. package/web/.next/server/chunks/ssr/_2b021b35._.js +0 -3
  400. package/web/.next/server/chunks/ssr/_2b021b35._.js.map +0 -1
  401. package/web/.next/server/chunks/ssr/_43ba79e7._.js +0 -3
  402. package/web/.next/server/chunks/ssr/_43ba79e7._.js.map +0 -1
  403. package/web/.next/server/chunks/ssr/_7cb0396e._.js +0 -3
  404. package/web/.next/server/chunks/ssr/_7cb0396e._.js.map +0 -1
  405. package/web/.next/server/chunks/ssr/_e0dd6fcf._.js.map +0 -1
  406. package/web/.next/server/chunks/ssr/_e680c57c._.js +0 -9
  407. package/web/.next/server/chunks/ssr/_e680c57c._.js.map +0 -1
  408. package/web/.next/static/chunks/28f6b1cab38ab025.js +0 -3
  409. package/web/.next/static/chunks/8b0a9cb5109fe899.js +0 -1
  410. package/web/.next/static/chunks/a20f2d6f76f469b7.css +0 -1
  411. package/web/.next/static/chunks/b2aa69e4b0b032d9.js +0 -1
  412. package/web/.next/static/chunks/b65e555419a0c664.js +0 -1
  413. package/web/.next/static/chunks/ba0e0fa2d1a650bb.js +0 -1
  414. /package/web/.next/static/{9rcv3ICw0kZNuv3TVdO8E → 4jtpgWCvk_Q6-K-puXRhW}/_buildManifest.js +0 -0
  415. /package/web/.next/static/{9rcv3ICw0kZNuv3TVdO8E → 4jtpgWCvk_Q6-K-puXRhW}/_clientMiddlewareManifest.json +0 -0
  416. /package/web/.next/static/{9rcv3ICw0kZNuv3TVdO8E → 4jtpgWCvk_Q6-K-puXRhW}/_ssgManifest.js +0 -0
@@ -0,0 +1,53 @@
1
+ import { SecuritySeverity, SecurityActionCategory, SecurityActionDisposition, } from '../../../../../../packages/core/src/domain/generated/output.js';
2
+ import { SecurityPanel } from './security-panel.js';
3
+ const meta = {
4
+ title: 'Common/SecurityPanel',
5
+ component: SecurityPanel,
6
+ tags: ['autodocs'],
7
+ };
8
+ export default meta;
9
+ /** No findings — clean repository. */
10
+ export const NoFindings = {
11
+ args: {
12
+ events: [],
13
+ },
14
+ };
15
+ /** Mixed governance and dependency findings. */
16
+ export const MixedFindings = {
17
+ args: {
18
+ events: [
19
+ {
20
+ id: 'evt-1',
21
+ repositoryPath: '/path/to/repo',
22
+ severity: SecuritySeverity.High,
23
+ category: SecurityActionCategory.DependencyInstall,
24
+ disposition: SecurityActionDisposition.Denied,
25
+ message: 'Package has postinstall lifecycle script: suspicious-pkg@2.0.0',
26
+ remediationSummary: 'Review and approve the lifecycle script or add to denylist',
27
+ createdAt: new Date().toISOString(),
28
+ updatedAt: new Date().toISOString(),
29
+ },
30
+ {
31
+ id: 'evt-2',
32
+ repositoryPath: '/path/to/repo',
33
+ severity: SecuritySeverity.Medium,
34
+ category: SecurityActionCategory.CiWorkflowModify,
35
+ disposition: SecurityActionDisposition.Allowed,
36
+ message: '[Governance Audit] Branch protection not enabled on main',
37
+ remediationSummary: 'Enable branch protection rules for the main branch',
38
+ createdAt: new Date().toISOString(),
39
+ updatedAt: new Date().toISOString(),
40
+ },
41
+ {
42
+ id: 'evt-3',
43
+ repositoryPath: '/path/to/repo',
44
+ severity: SecuritySeverity.Low,
45
+ category: SecurityActionCategory.DependencyInstall,
46
+ disposition: SecurityActionDisposition.Allowed,
47
+ message: 'Dependency uses git source: lodash@git+https://github.com/lodash/lodash.git',
48
+ createdAt: new Date().toISOString(),
49
+ updatedAt: new Date().toISOString(),
50
+ },
51
+ ],
52
+ },
53
+ };
@@ -0,0 +1,7 @@
1
+ import { SecurityMode } from '../../../../../packages/core/src/domain/generated/output.js';
2
+ export interface SecurityBadgeProps {
3
+ mode: SecurityMode;
4
+ className?: string;
5
+ }
6
+ export declare function SecurityBadge({ mode, className }: SecurityBadgeProps): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=security-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-badge.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/common/security-badge.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuBD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CAsBpE"}
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Shield, ShieldAlert, ShieldOff } from 'lucide-react';
4
+ import { useTranslation } from 'react-i18next';
5
+ import { cn } from '../../lib/utils.js';
6
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip.js';
7
+ import { SecurityMode } from '../../../../../packages/core/src/domain/generated/output.js';
8
+ const BADGE_CONFIG = {
9
+ [SecurityMode.Disabled]: {
10
+ icon: ShieldOff,
11
+ colorClass: 'text-gray-400',
12
+ labelKey: 'settings.security.badge.disabled',
13
+ },
14
+ [SecurityMode.Advisory]: {
15
+ icon: Shield,
16
+ colorClass: 'text-yellow-500',
17
+ labelKey: 'settings.security.badge.advisory',
18
+ },
19
+ [SecurityMode.Enforce]: {
20
+ icon: ShieldAlert,
21
+ colorClass: 'text-red-500',
22
+ labelKey: 'settings.security.badge.enforce',
23
+ },
24
+ };
25
+ export function SecurityBadge({ mode, className }) {
26
+ const { t } = useTranslation('web');
27
+ const config = BADGE_CONFIG[mode];
28
+ const Icon = config.icon;
29
+ return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { "data-testid": "security-badge", className: cn('inline-flex shrink-0 items-center', className), children: _jsx(Icon, { className: cn('h-3.5 w-3.5', config.colorClass) }) }) }), _jsx(TooltipContent, { side: "top", children: _jsx("p", { className: "text-xs", children: t(config.labelKey) }) })] }) }));
30
+ }
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { SecurityBadge } from './security-badge.js';
3
+ declare const meta: Meta<typeof SecurityBadge>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SecurityBadge>;
6
+ /** Advisory mode — yellow shield indicating findings are logged but not blocked. */
7
+ export declare const Advisory: Story;
8
+ /** Enforce mode — red shield indicating violations are actively blocked. */
9
+ export declare const Enforce: Story;
10
+ /** Disabled mode — gray shield indicating security is turned off. */
11
+ export declare const Disabled: Story;
12
+ //# sourceMappingURL=security-badge.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-badge.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/common/security-badge.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAIpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,oFAAoF;AACpF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { SecurityMode } from '../../../../../packages/core/src/domain/generated/output.js';
2
+ import { SecurityBadge } from './security-badge.js';
3
+ const meta = {
4
+ title: 'Common/SecurityBadge',
5
+ component: SecurityBadge,
6
+ tags: ['autodocs'],
7
+ };
8
+ export default meta;
9
+ /** Advisory mode — yellow shield indicating findings are logged but not blocked. */
10
+ export const Advisory = {
11
+ args: { mode: SecurityMode.Advisory },
12
+ };
13
+ /** Enforce mode — red shield indicating violations are actively blocked. */
14
+ export const Enforce = {
15
+ args: { mode: SecurityMode.Enforce },
16
+ };
17
+ /** Disabled mode — gray shield indicating security is turned off. */
18
+ export const Disabled = {
19
+ args: { mode: SecurityMode.Disabled },
20
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"feature-flags-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/feature-flags-settings-section.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAoCzE,MAAM,WAAW,gCAAgC;IAC/C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,wBAAgB,2BAA2B,CAAC,EAAE,YAAY,EAAE,EAAE,gCAAgC,2CAgE7F"}
1
+ {"version":3,"file":"feature-flags-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/feature-flags-settings-section.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAwCzE,MAAM,WAAW,gCAAgC;IAC/C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,wBAAgB,2BAA2B,CAAC,EAAE,YAAY,EAAE,EAAE,gCAAgC,2CAgE7F"}
@@ -16,6 +16,7 @@ const FLAG_DESCRIPTIONS = {
16
16
  gitRebaseSync: 'Enable git rebase-on-main and sync-main operations in the web UI',
17
17
  reactFileManager: 'Use the built-in React file manager instead of the native OS folder picker. Also serves as automatic fallback when the native picker is unavailable.',
18
18
  inventory: 'Enable the Inventory page showing all repositories and features in a tree view',
19
+ supplyChainSecurity: 'Master switch for the supply chain security feature (policy engine, canvas badges, Settings section, CLI enforce, CI gate). Turn off to disable the entire feature regardless of Security Mode.',
19
20
  };
20
21
  const FLAG_LABELS = {
21
22
  skills: 'Skills',
@@ -26,6 +27,7 @@ const FLAG_LABELS = {
26
27
  gitRebaseSync: 'Git Rebase & Sync',
27
28
  reactFileManager: 'React File Manager',
28
29
  inventory: 'Inventory',
30
+ supplyChainSecurity: 'Supply Chain Security',
29
31
  };
30
32
  const FLAG_KEYS = [
31
33
  'skills',
@@ -36,6 +38,7 @@ const FLAG_KEYS = [
36
38
  'gitRebaseSync',
37
39
  'reactFileManager',
38
40
  'inventory',
41
+ 'supplyChainSecurity',
39
42
  ];
40
43
  export function FeatureFlagsSettingsSection({ featureFlags }) {
41
44
  const [flags, setFlags] = useState({ ...featureFlags });
@@ -1 +1 @@
1
- {"version":3,"file":"feature-flags-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/feature-flags-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAazB,CAAC"}
1
+ {"version":3,"file":"feature-flags-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/feature-flags-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC"}
@@ -19,6 +19,7 @@ export const Default = {
19
19
  gitRebaseSync: false,
20
20
  reactFileManager: false,
21
21
  inventory: false,
22
+ supplyChainSecurity: true,
22
23
  },
23
24
  },
24
25
  };
@@ -33,6 +34,7 @@ export const AllEnabled = {
33
34
  gitRebaseSync: true,
34
35
  reactFileManager: true,
35
36
  inventory: true,
37
+ supplyChainSecurity: true,
36
38
  },
37
39
  },
38
40
  };
@@ -47,6 +49,7 @@ export const AllDisabled = {
47
49
  gitRebaseSync: false,
48
50
  reactFileManager: false,
49
51
  inventory: false,
52
+ supplyChainSecurity: false,
50
53
  },
51
54
  },
52
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"settings-page-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/settings-page-client.tsx"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EACV,QAAQ,EAKT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AA8B/E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AA+QD,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,GACnB,EAAE,uBAAuB,2CAw5CzB"}
1
+ {"version":3,"file":"settings-page-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/settings-page-client.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EACV,QAAQ,EAKT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AA+B/E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AA+QD,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,GACnB,EAAE,uBAAuB,2CA+7CzB"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useTransition, useRef, useEffect, useCallback } from 'react';
4
- import { Check, Bot, Terminal, GitBranch, Activity, Bell, Flag, Database, Globe, Minus, Plus, ExternalLink, Settings2, Timer, MessageSquare, LayoutGrid, } from 'lucide-react';
3
+ import { useState, useTransition, useRef, useEffect, useCallback, useMemo } from 'react';
4
+ import { Check, Bot, Terminal, GitBranch, Activity, Bell, Flag, Database, Globe, Minus, Plus, ExternalLink, Settings2, Timer, MessageSquare, LayoutGrid, Shield, } from 'lucide-react';
5
5
  import { toast } from 'sonner';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { cn } from '../../../lib/utils.js';
@@ -9,11 +9,12 @@ import { Label } from '../../ui/label.js';
9
9
  import { Switch } from '../../ui/switch.js';
10
10
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../ui/select.js';
11
11
  import { updateSettingsAction } from '../../../app/actions/update-settings.js';
12
- import { EditorType, Language, TerminalType, } from '../../../../../../packages/core/src/domain/generated/output.js';
12
+ import { EditorType, Language, SecurityMode, TerminalType, } from '../../../../../../packages/core/src/domain/generated/output.js';
13
13
  import { getEditorTypeIcon } from '../../common/editor-type-icons.js';
14
14
  import { AgentModelPicker } from '../../features/settings/AgentModelPicker/index.js';
15
15
  import { LanguageSettingsSection } from '../../features/settings/language-settings-section.js';
16
16
  import { TimeoutSlider } from '../../features/settings/timeout-slider.js';
17
+ import { SupplyChainSecuritySettingsSection } from '../../features/settings/supply-chain-security-settings-section.js';
17
18
  const EDITOR_OPTIONS = [
18
19
  { value: EditorType.VsCode, label: 'VS Code' },
19
20
  { value: EditorType.Cursor, label: 'Cursor' },
@@ -31,6 +32,7 @@ const SECTIONS = [
31
32
  { id: 'agent', labelKey: 'settings.sections.agent', icon: Bot },
32
33
  { id: 'environment', labelKey: 'settings.sections.environment', icon: Terminal },
33
34
  { id: 'workflow', labelKey: 'settings.sections.workflow', icon: GitBranch },
35
+ { id: 'security', labelKey: 'settings.sections.security', icon: Shield },
34
36
  { id: 'ci', labelKey: 'settings.sections.ci', icon: Activity },
35
37
  { id: 'stage-timeouts', labelKey: 'settings.sections.timeouts', icon: Timer },
36
38
  { id: 'notifications', labelKey: 'settings.sections.notifications', icon: Bell },
@@ -132,6 +134,7 @@ export function SettingsPageClient({ settings, shepHome, dbFileSize, availableTe
132
134
  gitRebaseSync: false,
133
135
  reactFileManager: false,
134
136
  inventory: false,
137
+ supplyChainSecurity: true,
135
138
  };
136
139
  // Agent state
137
140
  const [agentType, setAgentType] = useState(settings.agent.type);
@@ -299,9 +302,14 @@ export function SettingsPageClient({ settings, shepHome, dbFileSize, availableTe
299
302
  };
300
303
  }
301
304
  const [activeSection, setActiveSection] = useState('agent');
305
+ // Filter sections based on feature flags. When supplyChainSecurity is off,
306
+ // hide the Security nav tab AND the section below so the feature is fully inert.
307
+ const visibleSections = useMemo(() => SECTIONS.filter((s) => s.id !== 'security' || flags.supplyChainSecurity), [flags.supplyChainSecurity]);
302
308
  // Track which section is in view via IntersectionObserver
303
309
  useEffect(() => {
304
- const els = SECTIONS.map((s) => document.getElementById(`section-${s.id}`)).filter(Boolean);
310
+ const els = visibleSections
311
+ .map((s) => document.getElementById(`section-${s.id}`))
312
+ .filter(Boolean);
305
313
  if (els.length === 0)
306
314
  return;
307
315
  const observer = new IntersectionObserver((entries) => {
@@ -314,7 +322,7 @@ export function SettingsPageClient({ settings, shepHome, dbFileSize, availableTe
314
322
  for (const el of els)
315
323
  observer.observe(el);
316
324
  return () => observer.disconnect();
317
- }, []);
325
+ }, [visibleSections]);
318
326
  const scrollToSection = useCallback((id) => {
319
327
  const el = document.getElementById(`section-${id}`);
320
328
  if (!el)
@@ -326,7 +334,7 @@ export function SettingsPageClient({ settings, shepHome, dbFileSize, availableTe
326
334
  void el.offsetHeight;
327
335
  el.style.animation = 'section-flash 1s ease-out';
328
336
  }, []);
329
- return (_jsxs("div", { "data-testid": "settings-page-client", className: "max-w-5xl", children: [_jsx("div", { className: "bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Settings2, { className: "text-muted-foreground h-4 w-4" }), _jsx("h1", { className: "text-sm font-bold tracking-tight", children: t('settings.title') }), _jsxs("span", { className: "relative h-4 w-16", children: [_jsx("span", { className: cn('text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300', showSaving ? 'opacity-100' : 'opacity-0'), children: t('settings.saving') }), _jsxs("span", { className: cn('absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300', showSaved && !showSaving ? 'opacity-100' : 'opacity-0'), children: [_jsx(Check, { className: "h-3 w-3" }), t('settings.saved')] })] }), _jsx("nav", { className: "ml-auto flex items-center gap-0.5", children: SECTIONS.map((s) => {
337
+ return (_jsxs("div", { "data-testid": "settings-page-client", className: "max-w-5xl", children: [_jsx("div", { className: "bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Settings2, { className: "text-muted-foreground h-4 w-4" }), _jsx("h1", { className: "text-sm font-bold tracking-tight", children: t('settings.title') }), _jsxs("span", { className: "relative h-4 w-16", children: [_jsx("span", { className: cn('text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300', showSaving ? 'opacity-100' : 'opacity-0'), children: t('settings.saving') }), _jsxs("span", { className: cn('absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300', showSaved && !showSaving ? 'opacity-100' : 'opacity-0'), children: [_jsx(Check, { className: "h-3 w-3" }), t('settings.saved')] })] }), _jsx("nav", { className: "ml-auto flex items-center gap-0.5", children: visibleSections.map((s) => {
330
338
  const SectionIcon = s.icon;
331
339
  const isActive = activeSection === s.id;
332
340
  return (_jsxs("button", { type: "button", onClick: () => scrollToSection(s.id), className: cn('flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all', isActive
@@ -440,7 +448,18 @@ export function SettingsPageClient({ settings, shepHome, dbFileSize, availableTe
440
448
  label: t('settings.workflow.links.pushAndPrFlags'),
441
449
  href: 'https://github.com/shep-ai/shep/blob/main/specs/037-feature-pr-push-flags/spec.yaml',
442
450
  },
443
- ], children: t('settings.workflow.hint') })] }), _jsxs("div", { id: "section-ci", className: "grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]", children: [_jsxs(SettingsSection, { icon: Activity, title: t('settings.ci.title'), description: t('settings.ci.description'), testId: "ci-settings-section", children: [_jsx(SettingsRow, { label: t('settings.ci.maxFixAttempts'), description: t('settings.ci.maxFixAttemptsDescription'), htmlFor: "ci-max-fix", children: _jsx(NumberStepper, { id: "ci-max-fix", testId: "ci-max-fix-input", placeholder: "3", value: ciMaxFix, onChange: setCiMaxFix, onBlur: () => {
451
+ ], children: t('settings.workflow.hint') })] }), flags.supplyChainSecurity ? (_jsxs("div", { id: "section-security", className: "grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]", children: [_jsx(SupplyChainSecuritySettingsSection, { securityState: {
452
+ mode: settings.security?.mode ?? SecurityMode.Advisory,
453
+ lastEvaluationAt: settings.security?.lastEvaluationAt ?? null,
454
+ policySource: settings.security?.policySource ?? null,
455
+ recentEvents: [],
456
+ highestSeverityFinding: null,
457
+ } }), _jsx(SectionHint, { links: [
458
+ {
459
+ label: t('settings.security.links.securitySpec'),
460
+ href: 'https://github.com/shep-ai/shep/blob/main/specs/083-supply-chain-security/spec.yaml',
461
+ },
462
+ ], children: t('settings.security.hint') })] })) : null, _jsxs("div", { id: "section-ci", className: "grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]", children: [_jsxs(SettingsSection, { icon: Activity, title: t('settings.ci.title'), description: t('settings.ci.description'), testId: "ci-settings-section", children: [_jsx(SettingsRow, { label: t('settings.ci.maxFixAttempts'), description: t('settings.ci.maxFixAttemptsDescription'), htmlFor: "ci-max-fix", children: _jsx(NumberStepper, { id: "ci-max-fix", testId: "ci-max-fix-input", placeholder: "3", value: ciMaxFix, onChange: setCiMaxFix, onBlur: () => {
444
463
  if (ciMaxFix !== originalCiMaxFix)
445
464
  save(buildWorkflowPayload({ ciMaxFix }));
446
465
  }, min: 1, max: 10 }) }), _jsx(SettingsRow, { label: t('settings.ci.watchTimeout'), description: t('settings.ci.watchTimeoutDescription'), htmlFor: "ci-timeout", children: _jsx(NumberStepper, { id: "ci-timeout", testId: "ci-timeout-input", placeholder: "300", value: ciTimeout, onChange: setCiTimeout, onBlur: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"settings-page-client.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/settings-page-client.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM5D,QAAA,MAAM,IAAI;;;;;;;CAOiC,CAAC;AAE5C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAsBzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAuB5B,CAAC"}
1
+ {"version":3,"file":"settings-page-client.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/settings-page-client.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM5D,QAAA,MAAM,IAAI;;;;;;;CAOiC,CAAC;AAE5C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAuB5B,CAAC"}
@@ -35,6 +35,7 @@ export const AllSections = {
35
35
  gitRebaseSync: false,
36
36
  reactFileManager: false,
37
37
  inventory: false,
38
+ supplyChainSecurity: true,
38
39
  },
39
40
  },
40
41
  shepHome: '/opt/shep',
@@ -0,0 +1,6 @@
1
+ import type { SecurityState } from '../../../../../../packages/core/src/application/use-cases/security/get-security-state.use-case.js';
2
+ export interface SupplyChainSecuritySettingsSectionProps {
3
+ securityState: SecurityState;
4
+ }
5
+ export declare function SupplyChainSecuritySettingsSection({ securityState, }: SupplyChainSecuritySettingsSectionProps): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=supply-chain-security-settings-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supply-chain-security-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/supply-chain-security-settings-section.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yEAAyE,CAAC;AAE7G,MAAM,WAAW,uCAAuC;IACtD,aAAa,EAAE,aAAa,CAAC;CAC9B;AAeD,wBAAgB,kCAAkC,CAAC,EACjD,aAAa,GACd,EAAE,uCAAuC,2CAgKzC"}
@@ -0,0 +1,60 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useTransition, useRef, useEffect } from 'react';
4
+ import { Shield, Check, AlertTriangle, ShieldAlert, ShieldOff } from 'lucide-react';
5
+ import { toast } from 'sonner';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { cn } from '../../../lib/utils.js';
8
+ import { Badge } from '../../ui/badge.js';
9
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../ui/select.js';
10
+ import { updateSecurityModeAction } from '../../../app/actions/security.js';
11
+ import { SecurityMode } from '../../../../../../packages/core/src/domain/generated/output.js';
12
+ const MODE_OPTIONS = [
13
+ { value: SecurityMode.Disabled, icon: ShieldOff },
14
+ { value: SecurityMode.Advisory, icon: Shield },
15
+ { value: SecurityMode.Enforce, icon: ShieldAlert },
16
+ ];
17
+ const SEVERITY_COLORS = {
18
+ Low: 'bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300',
19
+ Medium: 'bg-yellow-100 text-yellow-700 dark:bg-yellow-900/40 dark:text-yellow-300',
20
+ High: 'bg-orange-100 text-orange-700 dark:bg-orange-900/40 dark:text-orange-300',
21
+ Critical: 'bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300',
22
+ };
23
+ export function SupplyChainSecuritySettingsSection({ securityState, }) {
24
+ const { t } = useTranslation('web');
25
+ const [mode, setMode] = useState(securityState.mode);
26
+ const [isPending, startTransition] = useTransition();
27
+ const [showSaved, setShowSaved] = useState(false);
28
+ const prevPendingRef = useRef(false);
29
+ useEffect(() => {
30
+ if (prevPendingRef.current && !isPending) {
31
+ setShowSaved(true);
32
+ const timer = setTimeout(() => setShowSaved(false), 2000);
33
+ return () => clearTimeout(timer);
34
+ }
35
+ prevPendingRef.current = isPending;
36
+ }, [isPending]);
37
+ function handleModeChange(value) {
38
+ const newMode = value;
39
+ setMode(newMode);
40
+ startTransition(async () => {
41
+ const result = await updateSecurityModeAction(newMode);
42
+ if (!result.success) {
43
+ toast.error(result.error ?? t('settings.failedToSave'));
44
+ setMode(securityState.mode);
45
+ }
46
+ });
47
+ }
48
+ const lastEvalDisplay = securityState.lastEvaluationAt
49
+ ? new Date(securityState.lastEvaluationAt).toLocaleString()
50
+ : t('settings.security.lastEvaluationNever');
51
+ const policySourceDisplay = securityState.policySource ?? t('settings.security.policySourceNone');
52
+ return (_jsxs("div", { className: "bg-background rounded-lg border", "data-testid": "security-settings-section", children: [_jsxs("div", { className: "bg-muted/30 border-b px-4 py-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Shield, { className: "text-muted-foreground h-3.5 w-3.5" }), _jsx("h2", { className: "text-sm font-semibold", children: t('settings.security.sectionTitle') }), isPending ? (_jsx("span", { className: "text-muted-foreground text-xs", children: t('settings.saving') })) : null, showSaved && !isPending ? (_jsxs("span", { className: "flex items-center gap-1 text-xs text-green-600", children: [_jsx(Check, { className: "h-3 w-3" }), t('settings.saved')] })) : null] }), _jsx("p", { className: "text-muted-foreground mt-0.5 text-[11px]", children: t('settings.security.sectionDescription') })] }), _jsxs("div", { className: "px-4", children: [_jsxs("div", { className: "flex items-center justify-between gap-4 border-b py-2.5", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("label", { htmlFor: "security-mode", className: "cursor-pointer text-sm font-normal whitespace-nowrap", children: t('settings.security.mode') }), _jsx("p", { className: "text-muted-foreground text-[11px] leading-tight", children: t('settings.security.modeDescription') })] }), _jsx("div", { className: "flex shrink-0 items-center gap-2", children: _jsxs(Select, { value: mode, onValueChange: handleModeChange, children: [_jsx(SelectTrigger, { id: "security-mode", "data-testid": "security-mode-select", className: "w-40 cursor-pointer text-xs", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: MODE_OPTIONS.map((opt) => {
53
+ const Icon = opt.icon;
54
+ return (_jsx(SelectItem, { value: opt.value, children: _jsxs("span", { className: "flex items-center gap-2 text-xs", children: [_jsx(Icon, { className: "h-3.5 w-3.5 shrink-0" }), t(`settings.security.mode${opt.value}`)] }) }, opt.value));
55
+ }) })] }) })] }), _jsxs("div", { className: "flex items-center justify-between gap-4 border-b py-2.5", children: [_jsx("div", { className: "min-w-0", children: _jsx("span", { className: "text-sm font-normal whitespace-nowrap", children: t('settings.security.policySource') }) }), _jsx("span", { className: "text-muted-foreground max-w-50 truncate font-mono text-xs", children: policySourceDisplay })] }), _jsxs("div", { className: "flex items-center justify-between gap-4 border-b py-2.5", children: [_jsx("div", { className: "min-w-0", children: _jsx("span", { className: "text-sm font-normal whitespace-nowrap", children: t('settings.security.lastEvaluation') }) }), _jsx("span", { className: "text-muted-foreground text-xs", children: lastEvalDisplay })] }), _jsxs("div", { className: "py-2.5 last:border-b-0", children: [_jsx("div", { className: "mb-2", children: _jsx("span", { className: "text-sm font-normal", children: t('settings.security.recentFindings') }) }), securityState.recentEvents.length === 0 ? (_jsx("p", { className: "text-muted-foreground text-xs", children: t('settings.security.noFindings') })) : (_jsx("div", { className: "flex flex-col gap-1.5", children: securityState.recentEvents.slice(0, 5).map((event) => (_jsxs("div", { className: "flex items-start gap-2 rounded-md border px-2.5 py-1.5", children: [_jsx(AlertTriangle, { className: cn('mt-0.5 h-3 w-3 shrink-0', event.severity === 'Critical' || event.severity === 'High'
56
+ ? 'text-red-500'
57
+ : event.severity === 'Medium'
58
+ ? 'text-yellow-500'
59
+ : 'text-blue-500') }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Badge, { variant: "secondary", className: cn('px-1 py-0 text-[9px]', SEVERITY_COLORS[event.severity]), children: t(`settings.security.severity.${event.severity}`) }), _jsx("span", { className: "text-muted-foreground text-[10px]", children: event.category })] }), _jsx("p", { className: "mt-0.5 truncate text-[11px]", children: event.message })] })] }, event.id))) }))] })] })] }));
60
+ }
@@ -0,0 +1,14 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { SupplyChainSecuritySettingsSection } from './supply-chain-security-settings-section.js';
3
+ declare const meta: Meta<typeof SupplyChainSecuritySettingsSection>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SupplyChainSecuritySettingsSection>;
6
+ /** Advisory mode with no findings — default posture for new repositories. */
7
+ export declare const AdvisoryNoFindings: Story;
8
+ /** Disabled mode — security enforcement is turned off. */
9
+ export declare const Disabled: Story;
10
+ /** Enforce mode with a critical finding. */
11
+ export declare const EnforceWithCriticalFinding: Story;
12
+ /** Advisory mode with multiple findings of varying severity. */
13
+ export declare const AdvisoryWithMultipleFindings: Story;
14
+ //# sourceMappingURL=supply-chain-security-settings-section.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supply-chain-security-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,0CAA0C,CAAC;AAG9F,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kCAAkC,CAIzD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAUjE,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,KAIhC,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,0BAA0B,EAAE,KAgCxC,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,4BAA4B,EAAE,KAkD1C,CAAC"}
@@ -0,0 +1,116 @@
1
+ import { SecurityMode, SecuritySeverity, SecurityActionCategory, SecurityActionDisposition, } from '../../../../../../packages/core/src/domain/generated/output.js';
2
+ import { SupplyChainSecuritySettingsSection } from './supply-chain-security-settings-section.js';
3
+ const meta = {
4
+ title: 'Settings/SupplyChainSecuritySettingsSection',
5
+ component: SupplyChainSecuritySettingsSection,
6
+ tags: ['autodocs'],
7
+ };
8
+ export default meta;
9
+ const baseState = {
10
+ mode: SecurityMode.Advisory,
11
+ lastEvaluationAt: null,
12
+ policySource: null,
13
+ recentEvents: [],
14
+ highestSeverityFinding: null,
15
+ };
16
+ /** Advisory mode with no findings — default posture for new repositories. */
17
+ export const AdvisoryNoFindings = {
18
+ args: {
19
+ securityState: baseState,
20
+ },
21
+ };
22
+ /** Disabled mode — security enforcement is turned off. */
23
+ export const Disabled = {
24
+ args: {
25
+ securityState: {
26
+ ...baseState,
27
+ mode: SecurityMode.Disabled,
28
+ },
29
+ },
30
+ };
31
+ /** Enforce mode with a critical finding. */
32
+ export const EnforceWithCriticalFinding = {
33
+ args: {
34
+ securityState: {
35
+ mode: SecurityMode.Enforce,
36
+ lastEvaluationAt: new Date().toISOString(),
37
+ policySource: 'shep.security.yaml',
38
+ recentEvents: [
39
+ {
40
+ id: 'evt-1',
41
+ repositoryPath: '/path/to/repo',
42
+ severity: SecuritySeverity.Critical,
43
+ category: SecurityActionCategory.PublishRelease,
44
+ disposition: SecurityActionDisposition.Denied,
45
+ message: 'Missing npm provenance configuration in release workflow',
46
+ remediationSummary: 'Add --provenance flag to npm publish step',
47
+ createdAt: new Date().toISOString(),
48
+ updatedAt: new Date().toISOString(),
49
+ },
50
+ ],
51
+ highestSeverityFinding: {
52
+ id: 'evt-1',
53
+ repositoryPath: '/path/to/repo',
54
+ severity: SecuritySeverity.Critical,
55
+ category: SecurityActionCategory.PublishRelease,
56
+ disposition: SecurityActionDisposition.Denied,
57
+ message: 'Missing npm provenance configuration in release workflow',
58
+ remediationSummary: 'Add --provenance flag to npm publish step',
59
+ createdAt: new Date().toISOString(),
60
+ updatedAt: new Date().toISOString(),
61
+ },
62
+ },
63
+ },
64
+ };
65
+ /** Advisory mode with multiple findings of varying severity. */
66
+ export const AdvisoryWithMultipleFindings = {
67
+ args: {
68
+ securityState: {
69
+ mode: SecurityMode.Advisory,
70
+ lastEvaluationAt: new Date(Date.now() - 3600000).toISOString(),
71
+ policySource: 'shep.security.yaml',
72
+ recentEvents: [
73
+ {
74
+ id: 'evt-1',
75
+ repositoryPath: '/path/to/repo',
76
+ severity: SecuritySeverity.High,
77
+ category: SecurityActionCategory.DependencyInstall,
78
+ disposition: SecurityActionDisposition.Denied,
79
+ message: 'Package has postinstall lifecycle script: malicious-pkg@1.0.0',
80
+ createdAt: new Date().toISOString(),
81
+ updatedAt: new Date().toISOString(),
82
+ },
83
+ {
84
+ id: 'evt-2',
85
+ repositoryPath: '/path/to/repo',
86
+ severity: SecuritySeverity.Medium,
87
+ category: SecurityActionCategory.CiWorkflowModify,
88
+ disposition: SecurityActionDisposition.Allowed,
89
+ message: '[Governance Audit] Branch protection not enabled on main',
90
+ createdAt: new Date().toISOString(),
91
+ updatedAt: new Date().toISOString(),
92
+ },
93
+ {
94
+ id: 'evt-3',
95
+ repositoryPath: '/path/to/repo',
96
+ severity: SecuritySeverity.Low,
97
+ category: SecurityActionCategory.DependencyInstall,
98
+ disposition: SecurityActionDisposition.Allowed,
99
+ message: 'Dependency uses git source instead of registry: lodash@git+https://...',
100
+ createdAt: new Date().toISOString(),
101
+ updatedAt: new Date().toISOString(),
102
+ },
103
+ ],
104
+ highestSeverityFinding: {
105
+ id: 'evt-1',
106
+ repositoryPath: '/path/to/repo',
107
+ severity: SecuritySeverity.High,
108
+ category: SecurityActionCategory.DependencyInstall,
109
+ disposition: SecurityActionDisposition.Denied,
110
+ message: 'Package has postinstall lifecycle script: malicious-pkg@1.0.0',
111
+ createdAt: new Date().toISOString(),
112
+ updatedAt: new Date().toISOString(),
113
+ },
114
+ },
115
+ },
116
+ };
@@ -187,6 +187,27 @@
187
187
  "failedToList": "خطأ في عرض الأدوات: {{error}}"
188
188
  }
189
189
  },
190
+ "security": {
191
+ "description": "Supply-chain security policy management",
192
+ "enforce": {
193
+ "description": "Evaluate repository security posture and enforce policy",
194
+ "repoOption": "Repository path (defaults to current directory)",
195
+ "outputOption": "Output format (table, json, yaml)",
196
+ "passed": "Security enforcement passed",
197
+ "failed": "Security enforcement failed",
198
+ "advisoryNote": "Mode is Advisory — findings are reported but do not block",
199
+ "disabledNote": "Security mode is Disabled — no checks performed",
200
+ "modeLabel": "Mode",
201
+ "sourceLabel": "Source",
202
+ "dependencyFindingsLabel": "Dependency Findings",
203
+ "releaseIntegrityLabel": "Release Integrity",
204
+ "totalFindingsLabel": "Total Findings",
205
+ "governanceFindingsLabel": "GitHub Governance (audit-only)",
206
+ "noFindings": "No findings",
207
+ "failedToEnforce": "Failed to evaluate security posture",
208
+ "flagDisabledNote": "Supply chain security feature flag is off — enforce is a no-op"
209
+ }
210
+ },
190
211
  "feat": {
191
212
  "description": "إدارة الميزات عبر دورة حياة تطوير البرمجيات",
192
213
  "new": {
@@ -15,7 +15,8 @@
15
15
  "flags": "العلامات",
16
16
  "chat": "المحادثة",
17
17
  "layout": "التخطيط",
18
- "database": "قاعدة البيانات"
18
+ "database": "قاعدة البيانات",
19
+ "security": "Security"
19
20
  },
20
21
  "language": {
21
22
  "title": "اللغة",
@@ -224,6 +225,47 @@
224
225
  "swapPositionDescription": "نقل زر المحادثة إلى اليسار وزر الإنشاء إلى اليمين",
225
226
  "hint": "يوجد زران عائمان (إنشاء ومحادثة) في الزوايا السفلية لمركز التحكم. قم بتفعيل هذا الخيار لتبديل مواضعهما."
226
227
  },
228
+ "security": {
229
+ "title": "Supply Chain Security",
230
+ "sectionTitle": "Supply Chain Security",
231
+ "sectionDescription": "Configure security mode and review policy enforcement findings",
232
+ "mode": "Security mode",
233
+ "modeDescription": "Controls how the policy engine responds to violations",
234
+ "modeDisabled": "Disabled",
235
+ "modeAdvisory": "Advisory",
236
+ "modeEnforce": "Enforce",
237
+ "policySource": "Policy source",
238
+ "policySourceNone": "No policy loaded",
239
+ "lastEvaluation": "Last evaluation",
240
+ "lastEvaluationNever": "Never",
241
+ "recentFindings": "Recent findings",
242
+ "noFindings": "No security findings recorded",
243
+ "runEnforcement": "Run enforcement",
244
+ "running": "Running...",
245
+ "severity": {
246
+ "Low": "Low",
247
+ "Medium": "Medium",
248
+ "High": "High",
249
+ "Critical": "Critical"
250
+ },
251
+ "hint": "Security mode controls how the policy engine handles violations. Advisory mode logs findings without blocking. Enforce mode blocks risky actions and fails builds.",
252
+ "links": {
253
+ "securitySpec": "Security spec"
254
+ },
255
+ "badge": {
256
+ "advisory": "Security: Advisory",
257
+ "enforce": "Security: Enforce",
258
+ "disabled": "Security: Disabled"
259
+ },
260
+ "panel": {
261
+ "title": "Security",
262
+ "governance": "Governance",
263
+ "dependencies": "Dependencies",
264
+ "noFindings": "No security findings",
265
+ "findingsByCategory": "Findings by category",
266
+ "totalFindings": "{{count}} finding(s)"
267
+ }
268
+ },
227
269
  "database": {
228
270
  "title": "قاعدة البيانات",
229
271
  "description": "مسار قاعدة البيانات وإدارتها",