@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.
- package/apis/json-schema/ActionDispositionEntry.yaml +14 -0
- package/apis/json-schema/DependencyFinding.yaml +28 -0
- package/apis/json-schema/DependencyRiskType.yaml +11 -0
- package/apis/json-schema/DependencyRules.yaml +38 -0
- package/apis/json-schema/EffectivePolicySnapshot.yaml +24 -0
- package/apis/json-schema/FeatureFlags.yaml +5 -0
- package/apis/json-schema/ReleaseIntegrityCheck.yaml +22 -0
- package/apis/json-schema/ReleaseIntegrityCheckType.yaml +9 -0
- package/apis/json-schema/ReleaseIntegrityResult.yaml +16 -0
- package/apis/json-schema/ReleaseRules.yaml +21 -0
- package/apis/json-schema/SecurityActionCategory.yaml +10 -0
- package/apis/json-schema/SecurityActionDisposition.yaml +8 -0
- package/apis/json-schema/SecurityConfig.yaml +17 -0
- package/apis/json-schema/SecurityEvent.yaml +36 -0
- package/apis/json-schema/SecurityMode.yaml +8 -0
- package/apis/json-schema/SecurityPolicy.yaml +24 -0
- package/apis/json-schema/SecuritySeverity.yaml +9 -0
- package/apis/json-schema/Settings.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts +15 -1
- package/dist/packages/core/src/application/ports/output/agents/agent-executor.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +3 -1
- package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts +76 -0
- package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/security-event.repository.interface.js +11 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +38 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.js +9 -0
- package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts +77 -0
- package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/security-policy-service.interface.js +13 -0
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +11 -0
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.js +2 -0
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +2 -0
- package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js +2 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +1 -0
- package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +2 -0
- package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.js +2 -0
- package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts +71 -0
- package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.js +215 -0
- package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts +24 -0
- package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.js +56 -0
- package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts +36 -0
- package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/get-security-state.use-case.js +76 -0
- package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts +14 -0
- package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/security/record-security-event.use-case.js +46 -0
- package/dist/packages/core/src/domain/errors/security-violation.error.d.ts +15 -0
- package/dist/packages/core/src/domain/errors/security-violation.error.d.ts.map +1 -0
- package/dist/packages/core/src/domain/errors/security-violation.error.js +20 -0
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +6 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +263 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +43 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +57 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts +44 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/security-event.mapper.js +55 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +4 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +17 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts +18 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/053-add-security-settings-columns.js +31 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts +29 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-create-security-events-table.js +53 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.d.ts +16 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-feature-flag-supply-chain-security.js +22 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts +24 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-security-event.repository.js +96 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +15 -3
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-executor.service.js +12 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +44 -4
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts +22 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/security-constraint-validator.js +30 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +10 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +35 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +7 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +3 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +32 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +25 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts +59 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/security-pre-check.js +89 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +4 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +10 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +10 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +101 -1
- package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts +53 -0
- package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/dependency-risk-evaluator.js +241 -0
- package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts +44 -0
- package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/release-integrity-evaluator.js +194 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts +28 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-file-reader.js +50 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy-validator.js +147 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts +44 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/security/security-policy.service.js +174 -0
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +61 -0
- package/dist/src/presentation/cli/commands/security.command.d.ts +16 -0
- package/dist/src/presentation/cli/commands/security.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/security.command.js +133 -0
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +5 -1
- package/dist/src/presentation/web/app/actions/security.d.ts +28 -0
- package/dist/src/presentation/web/app/actions/security.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/security.js +59 -0
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts +3 -1
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-graph-nodes.js +2 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +3 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +2 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts +3 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +3 -2
- package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts +6 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.js +29 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/repository-node/security-panel.stories.js +53 -0
- package/dist/src/presentation/web/components/common/security-badge.d.ts +7 -0
- package/dist/src/presentation/web/components/common/security-badge.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/security-badge.js +30 -0
- package/dist/src/presentation/web/components/common/security-badge.stories.d.ts +12 -0
- package/dist/src/presentation/web/components/common/security-badge.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/security-badge.stories.js +20 -0
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -0
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +26 -7
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts +6 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.js +60 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts +14 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/supply-chain-security-settings-section.stories.js +116 -0
- package/dist/translations/ar/cli.json +21 -0
- package/dist/translations/ar/web.json +43 -1
- package/dist/translations/de/cli.json +21 -0
- package/dist/translations/de/web.json +43 -1
- package/dist/translations/en/cli.json +21 -0
- package/dist/translations/en/web.json +43 -1
- package/dist/translations/es/cli.json +21 -0
- package/dist/translations/es/web.json +43 -1
- package/dist/translations/fr/cli.json +21 -0
- package/dist/translations/fr/web.json +43 -1
- package/dist/translations/he/cli.json +21 -0
- package/dist/translations/he/web.json +43 -1
- package/dist/translations/pt/cli.json +22 -1
- package/dist/translations/pt/web.json +43 -1
- package/dist/translations/ru/cli.json +21 -0
- package/dist/translations/ru/web.json +43 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
- package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +33 -18
- package/web/.next/server/app/settings/page.js +1 -1
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +13 -13
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_ad0071c9.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_90d98b2b.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_d3828105.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__51ec77a8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__540c615f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__66047a1b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a2d6c0ac._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a932cd3a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aa72e794._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_08eaf4b1._.js +3 -0
- package/web/.next/server/chunks/ssr/_08eaf4b1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_295fffde._.js +1 -1
- package/web/.next/server/chunks/ssr/_295fffde._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js +1 -1
- package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_6abfa39e._.js +1 -1
- package/web/.next/server/chunks/ssr/_783debcb._.js +9 -0
- package/web/.next/server/chunks/ssr/_783debcb._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_af6b8b94._.js → _e7f76333._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_af6b8b94._.js.map → _e7f76333._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
- package/web/.next/server/chunks/ssr/_f8c55130._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_e0dd6fcf._.js → _fc1578d7._.js} +2 -2
- package/web/.next/server/chunks/ssr/_fc1578d7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ff04802c._.js +3 -0
- package/web/.next/server/chunks/ssr/_ff04802c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ff87ffa6._.js +3 -0
- package/web/.next/server/chunks/ssr/_ff87ffa6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_17d39233._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_54b02639._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_7b7b9e3b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_807cba76._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_90b5e66e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_4ce30db7.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_e4032193.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e1cd1869._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e3a30e30._.js.map +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +74 -59
- package/web/.next/static/chunks/{238fdbed09dc61b6.js → 1eeabda286169861.js} +2 -2
- package/web/.next/static/chunks/20ec94c610d07a10.css +1 -0
- package/web/.next/static/chunks/{940c842293a6ee9b.js → 2dcae7bd1f3e2b51.js} +1 -1
- package/web/.next/static/chunks/3aba9d2242420cb5.js +1 -0
- package/web/.next/static/chunks/6003ad985fb78e62.js +1 -0
- package/web/.next/static/chunks/{0b07ee72b0c639ef.js → 69aa6a996dccb7dc.js} +2 -2
- package/web/.next/static/chunks/{873e837cd1179cdd.js → 6e5aeb5da5bb2ab6.js} +1 -1
- package/web/.next/static/chunks/{2ad924f5ba5ec0a6.js → 7c8e1ab108e3ceea.js} +1 -1
- package/web/.next/static/chunks/{bc41a393614b1192.js → 825ddcb7c361b2fe.js} +1 -1
- package/web/.next/static/chunks/{a22ee308ae1509ca.js → 89a6182ae40ac10b.js} +1 -1
- package/web/.next/static/chunks/{d26542df5ecc8717.js → a6d516b7e128f889.js} +1 -1
- package/web/.next/static/chunks/ae81796726a9bba3.js +1 -0
- package/web/.next/static/chunks/{b49ab0b290e9342d.js → b46545caae3b4930.js} +1 -1
- package/web/.next/static/chunks/{b7b5d65a5dd2fff1.js → c43f00ac45c5381d.js} +1 -1
- package/web/.next/static/chunks/{39054eabee156e55.js → c741f40bcb2abe54.js} +3 -3
- package/web/.next/static/chunks/{1b336d1266a0aa3d.js → dfc05704351fc940.js} +1 -1
- package/web/.next/static/chunks/eb72ac7aa8986962.js +1 -0
- package/web/.next/static/chunks/eef5d47669e61a54.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1cd4327c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_2b021b35._.js +0 -3
- package/web/.next/server/chunks/ssr/_2b021b35._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_43ba79e7._.js +0 -3
- package/web/.next/server/chunks/ssr/_43ba79e7._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_7cb0396e._.js +0 -3
- package/web/.next/server/chunks/ssr/_7cb0396e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e0dd6fcf._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e680c57c._.js +0 -9
- package/web/.next/server/chunks/ssr/_e680c57c._.js.map +0 -1
- package/web/.next/static/chunks/28f6b1cab38ab025.js +0 -3
- package/web/.next/static/chunks/8b0a9cb5109fe899.js +0 -1
- package/web/.next/static/chunks/a20f2d6f76f469b7.css +0 -1
- package/web/.next/static/chunks/b2aa69e4b0b032d9.js +0 -1
- package/web/.next/static/chunks/b65e555419a0c664.js +0 -1
- package/web/.next/static/chunks/ba0e0fa2d1a650bb.js +0 -1
- /package/web/.next/static/{9rcv3ICw0kZNuv3TVdO8E → 4jtpgWCvk_Q6-K-puXRhW}/_buildManifest.js +0 -0
- /package/web/.next/static/{9rcv3ICw0kZNuv3TVdO8E → 4jtpgWCvk_Q6-K-puXRhW}/_clientMiddlewareManifest.json +0 -0
- /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;
|
|
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"}
|
package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js
CHANGED
|
@@ -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,
|
|
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
|
};
|
package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map
CHANGED
|
@@ -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":"
|
|
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 =
|
|
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:
|
|
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-
|
|
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: () => {
|
package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
|
@@ -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": "مسار قاعدة البيانات وإدارتها",
|