@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,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Policy Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for the central security policy engine.
|
|
5
|
+
* Implementations handle policy file reading, validation, merging
|
|
6
|
+
* with persisted settings, and deterministic policy evaluation.
|
|
7
|
+
*
|
|
8
|
+
* Following Clean Architecture:
|
|
9
|
+
* - Application and use-case layers depend on this interface
|
|
10
|
+
* - Infrastructure layer provides the concrete implementation
|
|
11
|
+
* - All consumers (CLI, runtime, CI, UI) resolve the same instance via DI
|
|
12
|
+
*/
|
|
13
|
+
import type { EffectivePolicySnapshot, SecurityActionCategory, SecurityActionDisposition } from '../../../../domain/generated/output.js';
|
|
14
|
+
/**
|
|
15
|
+
* Result of validating a security policy file.
|
|
16
|
+
*/
|
|
17
|
+
export interface PolicyValidationResult {
|
|
18
|
+
/** Whether the policy file is valid */
|
|
19
|
+
valid: boolean;
|
|
20
|
+
/** Per-field validation error messages (empty when valid) */
|
|
21
|
+
errors: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Service interface for security policy evaluation.
|
|
25
|
+
*
|
|
26
|
+
* Implementations must:
|
|
27
|
+
* - Read shep.security.yaml from the repository root
|
|
28
|
+
* - Merge repository policy with persisted settings defaults
|
|
29
|
+
* - Apply deterministic precedence (global defaults < repo policy)
|
|
30
|
+
* - Cache effective policy per repository path
|
|
31
|
+
* - Fail fast on invalid policy files with actionable errors
|
|
32
|
+
*/
|
|
33
|
+
export interface ISecurityPolicyService {
|
|
34
|
+
/**
|
|
35
|
+
* Evaluate and compute the effective security policy for a repository.
|
|
36
|
+
*
|
|
37
|
+
* Reads the policy file, merges with persisted settings defaults,
|
|
38
|
+
* validates, and returns a deterministic snapshot. Re-evaluates
|
|
39
|
+
* on every call (no cache).
|
|
40
|
+
*
|
|
41
|
+
* @param repositoryPath - Absolute path to the repository root
|
|
42
|
+
* @returns Computed effective policy snapshot
|
|
43
|
+
* @throws Error if the policy file exists but is invalid
|
|
44
|
+
*/
|
|
45
|
+
evaluatePolicy(repositoryPath: string): Promise<EffectivePolicySnapshot>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the effective security policy for a repository.
|
|
48
|
+
*
|
|
49
|
+
* Returns a cached snapshot if available, otherwise computes
|
|
50
|
+
* and caches the result. Use evaluatePolicy() to force re-evaluation.
|
|
51
|
+
*
|
|
52
|
+
* @param repositoryPath - Absolute path to the repository root
|
|
53
|
+
* @returns Cached or freshly computed effective policy snapshot
|
|
54
|
+
* @throws Error if the policy file exists but is invalid
|
|
55
|
+
*/
|
|
56
|
+
getEffectivePolicy(repositoryPath: string): Promise<EffectivePolicySnapshot>;
|
|
57
|
+
/**
|
|
58
|
+
* Validate a security policy file without computing effective policy.
|
|
59
|
+
*
|
|
60
|
+
* Parses and validates the file against the expected schema.
|
|
61
|
+
* Returns a structured result with per-field error messages.
|
|
62
|
+
*
|
|
63
|
+
* @param filePath - Absolute path to the policy file
|
|
64
|
+
* @returns Validation result with errors array
|
|
65
|
+
*/
|
|
66
|
+
validatePolicyFile(filePath: string): Promise<PolicyValidationResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Look up the enforcement disposition for a specific action category
|
|
69
|
+
* within a given effective policy snapshot.
|
|
70
|
+
*
|
|
71
|
+
* @param policy - The effective policy snapshot to query
|
|
72
|
+
* @param actionCategory - The action category to look up
|
|
73
|
+
* @returns The disposition (Allowed, Denied, or ApprovalRequired)
|
|
74
|
+
*/
|
|
75
|
+
getActionDisposition(policy: EffectivePolicySnapshot, actionCategory: SecurityActionCategory): SecurityActionDisposition;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=security-policy-service.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security-policy-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/security-policy-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEzE;;;;;;;;;OASG;IACH,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE7E;;;;;;;;OAQG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAEtE;;;;;;;OAOG;IACH,oBAAoB,CAClB,MAAM,EAAE,uBAAuB,EAC/B,cAAc,EAAE,sBAAsB,GACrC,yBAAyB,CAAC;CAC9B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Policy Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for the central security policy engine.
|
|
5
|
+
* Implementations handle policy file reading, validation, merging
|
|
6
|
+
* with persisted settings, and deterministic policy evaluation.
|
|
7
|
+
*
|
|
8
|
+
* Following Clean Architecture:
|
|
9
|
+
* - Application and use-case layers depend on this interface
|
|
10
|
+
* - Infrastructure layer provides the concrete implementation
|
|
11
|
+
* - All consumers (CLI, runtime, CI, UI) resolve the same instance via DI
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts
CHANGED
|
@@ -32,5 +32,16 @@ export interface ISpecInitializerService {
|
|
|
32
32
|
* @returns The spec directory path and feature number used
|
|
33
33
|
*/
|
|
34
34
|
initialize(basePath: string, slug: string, featureNumber: number, description: string, mode?: 'fast'): Promise<SpecInitializerResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Scaffold a baseline shep.security.yaml file at the repository root.
|
|
37
|
+
*
|
|
38
|
+
* Creates the security policy file with Advisory mode, default action
|
|
39
|
+
* dispositions, and dependency/release rules. Includes YAML comments
|
|
40
|
+
* explaining each section.
|
|
41
|
+
*
|
|
42
|
+
* @param repositoryPath - Absolute path to the repository root
|
|
43
|
+
* @returns The absolute path to the created security policy file
|
|
44
|
+
*/
|
|
45
|
+
scaffoldSecurityPolicy(repositoryPath: string): Promise<string>;
|
|
35
46
|
}
|
|
36
47
|
//# sourceMappingURL=spec-initializer.interface.d.ts.map
|
package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-initializer.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/spec-initializer.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"spec-initializer.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/spec-initializer.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElC;;;;;;;;;OASG;IACH,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACjE"}
|
package/dist/packages/core/src/application/use-cases/agents/approve-agent-run.use-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/approve-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"approve-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/approve-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAQ9E,qBACa,sBAAsB;IAG/B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBANrB,kBAAkB,EAAE,mBAAmB,EAEvC,cAAc,EAAE,2BAA2B,EAE3C,iBAAiB,EAAE,kBAAkB,EAErC,qBAAqB,EAAE,sBAAsB;IAG1D,OAAO,CACX,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CA2GlD"}
|
|
@@ -25,6 +25,7 @@ import { join } from 'node:path';
|
|
|
25
25
|
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
26
26
|
import { writeSpecFileAtomic, safeYamlDump, } from '../../../infrastructure/services/agents/feature-agent/nodes/node-helpers.js';
|
|
27
27
|
import { computeWorktreePath } from '../../../infrastructure/services/ide-launchers/compute-worktree-path.js';
|
|
28
|
+
import { getSettings } from '../../../infrastructure/services/settings.service.js';
|
|
28
29
|
let ApproveAgentRunUseCase = class ApproveAgentRunUseCase {
|
|
29
30
|
agentRunRepository;
|
|
30
31
|
processService;
|
|
@@ -120,6 +121,7 @@ let ApproveAgentRunUseCase = class ApproveAgentRunUseCase {
|
|
|
120
121
|
agentType: run.agentType,
|
|
121
122
|
...(run.modelId ? { model: run.modelId } : {}),
|
|
122
123
|
...(feature?.fast ? { fast: true } : {}),
|
|
124
|
+
securityMode: getSettings().security?.mode,
|
|
123
125
|
});
|
|
124
126
|
return { approved: true, reason: 'Approved and resumed' };
|
|
125
127
|
}
|
package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reject-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/reject-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"reject-agent-run.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/agents/reject-agent-run.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAc1G,qBACa,qBAAqB;IAG9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBANrB,kBAAkB,EAAE,mBAAmB,EAEvC,cAAc,EAAE,2BAA2B,EAE3C,iBAAiB,EAAE,kBAAkB,EAErC,qBAAqB,EAAE,sBAAsB;IAG1D,OAAO,CACX,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC;QACT,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;CAmIH"}
|
|
@@ -25,6 +25,7 @@ import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
|
25
25
|
import { writeSpecFileAtomic, safeYamlDump, } from '../../../infrastructure/services/agents/feature-agent/nodes/node-helpers.js';
|
|
26
26
|
import { recordLifecycleEvent } from '../../../infrastructure/services/agents/feature-agent/phase-timing-context.js';
|
|
27
27
|
import { computeWorktreePath } from '../../../infrastructure/services/ide-launchers/compute-worktree-path.js';
|
|
28
|
+
import { getSettings } from '../../../infrastructure/services/settings.service.js';
|
|
28
29
|
let RejectAgentRunUseCase = class RejectAgentRunUseCase {
|
|
29
30
|
agentRunRepository;
|
|
30
31
|
processService;
|
|
@@ -136,6 +137,7 @@ let RejectAgentRunUseCase = class RejectAgentRunUseCase {
|
|
|
136
137
|
agentType: run.agentType,
|
|
137
138
|
...(run.modelId ? { model: run.modelId } : {}),
|
|
138
139
|
...(feature.fast ? { fast: true } : {}),
|
|
140
|
+
securityMode: getSettings().security?.mode,
|
|
139
141
|
});
|
|
140
142
|
return {
|
|
141
143
|
rejected: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-and-unblock-features.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;
|
|
1
|
+
{"version":3,"file":"check-and-unblock-features.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAIhH,qBACa,8BAA8B;IAET,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE1D,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAFkB,WAAW,EAAE,kBAAkB,EAE7D,YAAY,EAAE,2BAA2B;IAG5D;;;;OAIG;IACG,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA6CtD"}
|
package/dist/packages/core/src/application/use-cases/features/check-and-unblock-features.use-case.js
CHANGED
|
@@ -29,6 +29,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
29
29
|
import { injectable, inject } from 'tsyringe';
|
|
30
30
|
import { SdlcLifecycle } from '../../../domain/generated/output.js';
|
|
31
31
|
import { POST_IMPLEMENTATION } from '../../../domain/lifecycle-gates.js';
|
|
32
|
+
import { getSettings } from '../../../infrastructure/services/settings.service.js';
|
|
32
33
|
let CheckAndUnblockFeaturesUseCase = class CheckAndUnblockFeaturesUseCase {
|
|
33
34
|
featureRepo;
|
|
34
35
|
agentProcess;
|
|
@@ -70,6 +71,7 @@ let CheckAndUnblockFeaturesUseCase = class CheckAndUnblockFeaturesUseCase {
|
|
|
70
71
|
enableEvidence: child.enableEvidence,
|
|
71
72
|
commitEvidence: child.commitEvidence,
|
|
72
73
|
...(child.fast ? { fast: true } : {}),
|
|
74
|
+
securityMode: getSettings().security?.mode,
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAMtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AACrG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uEAAuE,CAAC;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAIxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,mEAAmE,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE9F,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAtBb,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,iBAAiB,EAAE,iBAAiB,EAEpC,YAAY,EAAE,YAAY,EAE1B,cAAc,EAAE,qBAAqB,EAErC,YAAY,EAAE,aAAa,EAE3B,iBAAiB,EAAE,wBAAwB,EAE3C,cAAc,EAAE,eAAe,EAE/B,aAAa,EAAE,qBAAqB;IAGvD;;;OAGG;IACG,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAMtE;;;;OAIG;IACG,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyI1E;;;OAGG;IACG,kBAAkB,CACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,kBAAkB,EACzB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"create-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/use-cases/features/create/create-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAMtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AACrG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gEAAgE,CAAC;AAC1G,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uEAAuE,CAAC;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAIxG,OAAO,EAAE,wBAAwB,EAAE,MAAM,mEAAmE,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE9F,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAtBb,WAAW,EAAE,kBAAkB,EAE/B,eAAe,EAAE,gBAAgB,EAEjC,YAAY,EAAE,2BAA2B,EAEzC,aAAa,EAAE,mBAAmB,EAElC,eAAe,EAAE,uBAAuB,EAExC,iBAAiB,EAAE,iBAAiB,EAEpC,YAAY,EAAE,YAAY,EAE1B,cAAc,EAAE,qBAAqB,EAErC,YAAY,EAAE,aAAa,EAE3B,iBAAiB,EAAE,wBAAwB,EAE3C,cAAc,EAAE,eAAe,EAE/B,aAAa,EAAE,qBAAqB;IAGvD;;;OAGG;IACG,OAAO,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAMtE;;;;OAIG;IACG,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyI1E;;;OAGG;IACG,kBAAkB,CACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,kBAAkB,EACzB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,OAAO,CAAA;KAAE,CAAC;CAuK1D"}
|
package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js
CHANGED
|
@@ -326,6 +326,7 @@ let CreateFeatureUseCase = class CreateFeatureUseCase {
|
|
|
326
326
|
...(input.fast ? { fast: true } : {}),
|
|
327
327
|
...(input.agentType ? { agentType: input.agentType } : {}),
|
|
328
328
|
...(input.model ? { model: input.model } : {}),
|
|
329
|
+
securityMode: settings.security?.mode,
|
|
329
330
|
});
|
|
330
331
|
}
|
|
331
332
|
return { warning, updatedFeature };
|
package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/resume-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"resume-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/resume-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AASlG,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,qBACa,oBAAoB;IAG7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAExB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBANf,WAAW,EAAE,kBAAkB,EAE/B,OAAO,EAAE,mBAAmB,EAE5B,cAAc,EAAE,2BAA2B,EAE3C,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAClC,OAAO,CAAC,mBAAmB,CAAC;CA6GhC"}
|
|
@@ -19,6 +19,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
19
19
|
import { injectable, inject } from 'tsyringe';
|
|
20
20
|
import { randomUUID } from 'node:crypto';
|
|
21
21
|
import { AgentRunStatus } from '../../../domain/generated/output.js';
|
|
22
|
+
import { getSettings } from '../../../infrastructure/services/settings.service.js';
|
|
22
23
|
const RESUMABLE_STATUSES = new Set([
|
|
23
24
|
AgentRunStatus.interrupted,
|
|
24
25
|
AgentRunStatus.failed,
|
|
@@ -118,6 +119,7 @@ let ResumeFeatureUseCase = class ResumeFeatureUseCase {
|
|
|
118
119
|
...(feature.fast ? { fast: true } : {}),
|
|
119
120
|
...(lastRun.modelId ? { model: lastRun.modelId } : {}),
|
|
120
121
|
resumeReason: lastRun.status,
|
|
122
|
+
securityMode: getSettings().security?.mode,
|
|
121
123
|
});
|
|
122
124
|
return { feature, newRun };
|
|
123
125
|
}
|
package/dist/packages/core/src/application/use-cases/features/start-feature.use-case.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/start-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"start-feature.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/features/start-feature.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AACvG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8DAA8D,CAAC;AAChH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAIlG,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,qBACa,mBAAmB;IAG5B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAE5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAExB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBANf,WAAW,EAAE,kBAAkB,EAE/B,OAAO,EAAE,mBAAmB,EAE5B,cAAc,EAAE,2BAA2B,EAE3C,eAAe,EAAE,gBAAgB;IAG9C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA0G9D"}
|
|
@@ -20,6 +20,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
20
20
|
import { injectable, inject } from 'tsyringe';
|
|
21
21
|
import { SdlcLifecycle } from '../../../domain/generated/output.js';
|
|
22
22
|
import { POST_IMPLEMENTATION } from '../../../domain/lifecycle-gates.js';
|
|
23
|
+
import { getSettings } from '../../../infrastructure/services/settings.service.js';
|
|
23
24
|
let StartFeatureUseCase = class StartFeatureUseCase {
|
|
24
25
|
featureRepo;
|
|
25
26
|
runRepo;
|
|
@@ -105,6 +106,7 @@ let StartFeatureUseCase = class StartFeatureUseCase {
|
|
|
105
106
|
agentType: agentRun.agentType,
|
|
106
107
|
...(resolved.fast ? { fast: true } : {}),
|
|
107
108
|
...(agentRun.modelId ? { model: agentRun.modelId } : {}),
|
|
109
|
+
securityMode: getSettings().security?.mode,
|
|
108
110
|
});
|
|
109
111
|
}
|
|
110
112
|
return { feature: updatedFeature, agentRun };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enforce Security Use Case
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates the full security enforcement flow:
|
|
5
|
+
* 1. Evaluate effective policy
|
|
6
|
+
* 2. Run dependency-risk checks
|
|
7
|
+
* 3. Run release-integrity checks
|
|
8
|
+
* 4. Persist findings as security events
|
|
9
|
+
* 5. Return structured enforcement result
|
|
10
|
+
*
|
|
11
|
+
* Supports Advisory (always pass) and Enforce (fail on violations) modes.
|
|
12
|
+
* Disabled mode returns empty pass result.
|
|
13
|
+
*/
|
|
14
|
+
import { SecurityMode } from '../../../domain/generated/output.js';
|
|
15
|
+
import type { EffectivePolicySnapshot, DependencyFinding, ReleaseIntegrityResult } from '../../../domain/generated/output.js';
|
|
16
|
+
import type { ISecurityPolicyService } from '../../ports/output/services/security-policy-service.interface.js';
|
|
17
|
+
import type { ISecurityEventRepository } from '../../ports/output/repositories/security-event.repository.interface.js';
|
|
18
|
+
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
|
|
19
|
+
import type { IGitHubRepositoryService, GovernanceFinding } from '../../ports/output/services/github-repository-service.interface.js';
|
|
20
|
+
import { DependencyRiskEvaluator } from '../../../infrastructure/services/security/dependency-risk-evaluator.js';
|
|
21
|
+
import { ReleaseIntegrityEvaluator } from '../../../infrastructure/services/security/release-integrity-evaluator.js';
|
|
22
|
+
/**
|
|
23
|
+
* Input for the enforce security use case.
|
|
24
|
+
*/
|
|
25
|
+
export interface EnforceSecurityInput {
|
|
26
|
+
/** Absolute path to the repository to evaluate */
|
|
27
|
+
repositoryPath: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Result of the enforcement flow.
|
|
31
|
+
*/
|
|
32
|
+
export interface EnforceSecurityResult {
|
|
33
|
+
/** Whether all checks passed (Advisory always passes, Enforce fails on violations) */
|
|
34
|
+
passed: boolean;
|
|
35
|
+
/** Effective security mode used for evaluation */
|
|
36
|
+
mode: SecurityMode;
|
|
37
|
+
/** Effective policy snapshot */
|
|
38
|
+
policy: EffectivePolicySnapshot;
|
|
39
|
+
/** Dependency risk findings */
|
|
40
|
+
dependencyFindings: DependencyFinding[];
|
|
41
|
+
/** Release integrity result */
|
|
42
|
+
releaseIntegrity: ReleaseIntegrityResult;
|
|
43
|
+
/** GitHub governance audit findings (audit-only, do not affect pass/fail) */
|
|
44
|
+
governanceFindings: GovernanceFinding[];
|
|
45
|
+
/** Total number of findings (excludes governance — governance is audit-only) */
|
|
46
|
+
totalFindings: number;
|
|
47
|
+
}
|
|
48
|
+
export declare class EnforceSecurityUseCase {
|
|
49
|
+
private readonly policyService;
|
|
50
|
+
private readonly eventRepository;
|
|
51
|
+
private readonly settingsRepository;
|
|
52
|
+
private readonly dependencyEvaluator;
|
|
53
|
+
private readonly releaseEvaluator;
|
|
54
|
+
private readonly githubService;
|
|
55
|
+
constructor(policyService: ISecurityPolicyService, eventRepository: ISecurityEventRepository, settingsRepository: ISettingsRepository, dependencyEvaluator: DependencyRiskEvaluator, releaseEvaluator: ReleaseIntegrityEvaluator, githubService: IGitHubRepositoryService);
|
|
56
|
+
execute(input: EnforceSecurityInput): Promise<EnforceSecurityResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Resolve GitHub owner/repo from the repository's git remote and run governance audit.
|
|
59
|
+
* Returns empty array if the remote cannot be resolved (not a GitHub repo, no remote, etc.).
|
|
60
|
+
*/
|
|
61
|
+
private runGovernanceAudit;
|
|
62
|
+
/**
|
|
63
|
+
* Persist dependency findings, failed release checks, and governance findings as security events.
|
|
64
|
+
*/
|
|
65
|
+
private persistFindings;
|
|
66
|
+
/**
|
|
67
|
+
* Update settings with the latest evaluation timestamp and policy source.
|
|
68
|
+
*/
|
|
69
|
+
private updateEvaluationTimestamp;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=enforce-security.use-case.d.ts.map
|
package/dist/packages/core/src/application/use-cases/security/enforce-security.use-case.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforce-security.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/security/enforce-security.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,YAAY,EAA0B,MAAM,qCAAqC,CAAC;AAC3F,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EAIvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kEAAkE,CAAC;AAC/G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wEAAwE,CAAC;AACvH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,oEAAoE,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,wEAAwE,CAAC;AACjH,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAC;AAOrH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sFAAsF;IACtF,MAAM,EAAE,OAAO,CAAC;IAChB,kDAAkD;IAClD,IAAI,EAAE,YAAY,CAAC;IACnB,gCAAgC;IAChC,MAAM,EAAE,uBAAuB,CAAC;IAChC,+BAA+B;IAC/B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,+BAA+B;IAC/B,gBAAgB,EAAE,sBAAsB,CAAC;IACzC,6EAA6E;IAC7E,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAC;CACvB;AAuBD,qBACa,sBAAsB;IAG/B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAEpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAEjC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAVb,aAAa,EAAE,sBAAsB,EAErC,eAAe,EAAE,wBAAwB,EAEzC,kBAAkB,EAAE,mBAAmB,EAEvC,mBAAmB,EAAE,uBAAuB,EAE5C,gBAAgB,EAAE,yBAAyB,EAE3C,aAAa,EAAE,wBAAwB;IAGpD,OAAO,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA8D1E;;;OAGG;YACW,kBAAkB;IAgBhC;;OAEG;YACW,eAAe;IA6D7B;;OAEG;YACW,yBAAyB;CAgBxC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enforce Security Use Case
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates the full security enforcement flow:
|
|
5
|
+
* 1. Evaluate effective policy
|
|
6
|
+
* 2. Run dependency-risk checks
|
|
7
|
+
* 3. Run release-integrity checks
|
|
8
|
+
* 4. Persist findings as security events
|
|
9
|
+
* 5. Return structured enforcement result
|
|
10
|
+
*
|
|
11
|
+
* Supports Advisory (always pass) and Enforce (fail on violations) modes.
|
|
12
|
+
* Disabled mode returns empty pass result.
|
|
13
|
+
*/
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
21
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
|
+
};
|
|
23
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
24
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
25
|
+
};
|
|
26
|
+
import { injectable, inject } from 'tsyringe';
|
|
27
|
+
import { SecurityMode, SecurityActionCategory } from '../../../domain/generated/output.js';
|
|
28
|
+
import { DependencyRiskEvaluator } from '../../../infrastructure/services/security/dependency-risk-evaluator.js';
|
|
29
|
+
import { ReleaseIntegrityEvaluator } from '../../../infrastructure/services/security/release-integrity-evaluator.js';
|
|
30
|
+
import { randomUUID } from 'node:crypto';
|
|
31
|
+
import { execFile as execFileCb } from 'node:child_process';
|
|
32
|
+
import { promisify } from 'node:util';
|
|
33
|
+
const execFileAsync = promisify(execFileCb);
|
|
34
|
+
/**
|
|
35
|
+
* Default dependency rules when no policy file defines them.
|
|
36
|
+
*/
|
|
37
|
+
const DEFAULT_DEPENDENCY_RULES = {
|
|
38
|
+
checkLockfileConsistency: true,
|
|
39
|
+
checkLifecycleScripts: true,
|
|
40
|
+
checkNonRegistrySource: true,
|
|
41
|
+
enforceStrictVersionRanges: false,
|
|
42
|
+
allowlist: [],
|
|
43
|
+
denylist: [],
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Default release rules when no policy file defines them.
|
|
47
|
+
*/
|
|
48
|
+
const DEFAULT_RELEASE_RULES = {
|
|
49
|
+
requireCiOnlyPublishing: true,
|
|
50
|
+
requireProvenance: true,
|
|
51
|
+
checkWorkflowIntegrity: true,
|
|
52
|
+
};
|
|
53
|
+
let EnforceSecurityUseCase = class EnforceSecurityUseCase {
|
|
54
|
+
policyService;
|
|
55
|
+
eventRepository;
|
|
56
|
+
settingsRepository;
|
|
57
|
+
dependencyEvaluator;
|
|
58
|
+
releaseEvaluator;
|
|
59
|
+
githubService;
|
|
60
|
+
constructor(policyService, eventRepository, settingsRepository, dependencyEvaluator, releaseEvaluator, githubService) {
|
|
61
|
+
this.policyService = policyService;
|
|
62
|
+
this.eventRepository = eventRepository;
|
|
63
|
+
this.settingsRepository = settingsRepository;
|
|
64
|
+
this.dependencyEvaluator = dependencyEvaluator;
|
|
65
|
+
this.releaseEvaluator = releaseEvaluator;
|
|
66
|
+
this.githubService = githubService;
|
|
67
|
+
}
|
|
68
|
+
async execute(input) {
|
|
69
|
+
// Evaluate effective policy
|
|
70
|
+
const policy = await this.policyService.evaluatePolicy(input.repositoryPath);
|
|
71
|
+
// Disabled mode — return empty pass result
|
|
72
|
+
if (policy.mode === SecurityMode.Disabled) {
|
|
73
|
+
return {
|
|
74
|
+
passed: true,
|
|
75
|
+
mode: SecurityMode.Disabled,
|
|
76
|
+
policy,
|
|
77
|
+
dependencyFindings: [],
|
|
78
|
+
releaseIntegrity: { checks: [], passed: true },
|
|
79
|
+
governanceFindings: [],
|
|
80
|
+
totalFindings: 0,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// Run dependency-risk checks
|
|
84
|
+
const dependencyFindings = this.dependencyEvaluator.evaluate(input.repositoryPath, DEFAULT_DEPENDENCY_RULES);
|
|
85
|
+
// Run release-integrity checks
|
|
86
|
+
const releaseIntegrity = this.releaseEvaluator.evaluate(input.repositoryPath, DEFAULT_RELEASE_RULES);
|
|
87
|
+
// Run governance audit (audit-only — does not affect pass/fail)
|
|
88
|
+
const governanceFindings = await this.runGovernanceAudit(input.repositoryPath);
|
|
89
|
+
// Count total findings (governance excluded — audit-only per FR-15)
|
|
90
|
+
const failedReleaseChecks = releaseIntegrity.checks.filter((c) => !c.passed);
|
|
91
|
+
const totalFindings = dependencyFindings.length + failedReleaseChecks.length;
|
|
92
|
+
// Persist findings as security events
|
|
93
|
+
await this.persistFindings(input.repositoryPath, dependencyFindings, releaseIntegrity, governanceFindings);
|
|
94
|
+
// Update settings with evaluation timestamp
|
|
95
|
+
await this.updateEvaluationTimestamp(policy.source);
|
|
96
|
+
// Determine pass/fail based on mode (governance is always advisory)
|
|
97
|
+
const hasFailures = totalFindings > 0;
|
|
98
|
+
const passed = policy.mode === SecurityMode.Advisory ? true : !hasFailures;
|
|
99
|
+
return {
|
|
100
|
+
passed,
|
|
101
|
+
mode: policy.mode,
|
|
102
|
+
policy,
|
|
103
|
+
dependencyFindings,
|
|
104
|
+
releaseIntegrity,
|
|
105
|
+
governanceFindings,
|
|
106
|
+
totalFindings,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Resolve GitHub owner/repo from the repository's git remote and run governance audit.
|
|
111
|
+
* Returns empty array if the remote cannot be resolved (not a GitHub repo, no remote, etc.).
|
|
112
|
+
*/
|
|
113
|
+
async runGovernanceAudit(repositoryPath) {
|
|
114
|
+
try {
|
|
115
|
+
const { stdout } = await execFileAsync('git', ['remote', 'get-url', 'origin'], {
|
|
116
|
+
cwd: repositoryPath,
|
|
117
|
+
});
|
|
118
|
+
const remoteUrl = stdout.trim();
|
|
119
|
+
if (!remoteUrl)
|
|
120
|
+
return [];
|
|
121
|
+
const parsed = this.githubService.parseGitHubUrl(remoteUrl);
|
|
122
|
+
return await this.githubService.auditRepositoryGovernance(parsed.owner, parsed.repo);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
// Not a GitHub repository, no remote configured, or parse failure — skip governance audit
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Persist dependency findings, failed release checks, and governance findings as security events.
|
|
131
|
+
*/
|
|
132
|
+
async persistFindings(repositoryPath, depFindings, releaseResult, govFindings) {
|
|
133
|
+
const now = new Date().toISOString();
|
|
134
|
+
for (const finding of depFindings) {
|
|
135
|
+
const event = {
|
|
136
|
+
id: randomUUID(),
|
|
137
|
+
repositoryPath,
|
|
138
|
+
severity: finding.severity,
|
|
139
|
+
category: SecurityActionCategory.DependencyInstall,
|
|
140
|
+
disposition: 'Denied',
|
|
141
|
+
message: finding.message,
|
|
142
|
+
remediationSummary: finding.remediation,
|
|
143
|
+
createdAt: now,
|
|
144
|
+
updatedAt: now,
|
|
145
|
+
};
|
|
146
|
+
await this.eventRepository.save(event);
|
|
147
|
+
}
|
|
148
|
+
for (const check of releaseResult.checks) {
|
|
149
|
+
if (!check.passed) {
|
|
150
|
+
const event = {
|
|
151
|
+
id: randomUUID(),
|
|
152
|
+
repositoryPath,
|
|
153
|
+
severity: check.severity,
|
|
154
|
+
category: SecurityActionCategory.PublishRelease,
|
|
155
|
+
disposition: 'Denied',
|
|
156
|
+
message: check.message,
|
|
157
|
+
createdAt: now,
|
|
158
|
+
updatedAt: now,
|
|
159
|
+
};
|
|
160
|
+
await this.eventRepository.save(event);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// Persist governance findings as advisory events
|
|
164
|
+
for (const finding of govFindings) {
|
|
165
|
+
// Map governance severity to SecuritySeverity (Unknown → Low for persistence)
|
|
166
|
+
const severity = finding.severity === 'Unknown'
|
|
167
|
+
? 'Low'
|
|
168
|
+
: finding.severity;
|
|
169
|
+
const event = {
|
|
170
|
+
id: randomUUID(),
|
|
171
|
+
repositoryPath,
|
|
172
|
+
severity,
|
|
173
|
+
category: SecurityActionCategory.CiWorkflowModify,
|
|
174
|
+
disposition: 'Allowed',
|
|
175
|
+
message: `[Governance Audit] ${finding.message}`,
|
|
176
|
+
remediationSummary: finding.remediation,
|
|
177
|
+
createdAt: now,
|
|
178
|
+
updatedAt: now,
|
|
179
|
+
};
|
|
180
|
+
await this.eventRepository.save(event);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Update settings with the latest evaluation timestamp and policy source.
|
|
185
|
+
*/
|
|
186
|
+
async updateEvaluationTimestamp(policySource) {
|
|
187
|
+
try {
|
|
188
|
+
const settings = await this.settingsRepository.load();
|
|
189
|
+
if (settings) {
|
|
190
|
+
settings.security = {
|
|
191
|
+
...settings.security,
|
|
192
|
+
mode: settings.security?.mode ?? SecurityMode.Advisory,
|
|
193
|
+
lastEvaluationAt: new Date().toISOString(),
|
|
194
|
+
policySource,
|
|
195
|
+
};
|
|
196
|
+
await this.settingsRepository.update(settings);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// Non-fatal — evaluation results are still returned even if settings update fails
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
EnforceSecurityUseCase = __decorate([
|
|
205
|
+
injectable(),
|
|
206
|
+
__param(0, inject('ISecurityPolicyService')),
|
|
207
|
+
__param(1, inject('ISecurityEventRepository')),
|
|
208
|
+
__param(2, inject('ISettingsRepository')),
|
|
209
|
+
__param(3, inject('DependencyRiskEvaluator')),
|
|
210
|
+
__param(4, inject('ReleaseIntegrityEvaluator')),
|
|
211
|
+
__param(5, inject('IGitHubRepositoryService')),
|
|
212
|
+
__metadata("design:paramtypes", [Object, Object, Object, DependencyRiskEvaluator,
|
|
213
|
+
ReleaseIntegrityEvaluator, Object])
|
|
214
|
+
], EnforceSecurityUseCase);
|
|
215
|
+
export { EnforceSecurityUseCase };
|
package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluate Security Policy Use Case
|
|
3
|
+
*
|
|
4
|
+
* Wraps ISecurityPolicyService.evaluatePolicy() as a use case.
|
|
5
|
+
* Updates settings with the latest evaluation timestamp and policy source.
|
|
6
|
+
* Returns the effective policy snapshot.
|
|
7
|
+
*/
|
|
8
|
+
import type { EffectivePolicySnapshot } from '../../../domain/generated/output.js';
|
|
9
|
+
import type { ISecurityPolicyService } from '../../ports/output/services/security-policy-service.interface.js';
|
|
10
|
+
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
|
|
11
|
+
/**
|
|
12
|
+
* Input for the evaluate security policy use case.
|
|
13
|
+
*/
|
|
14
|
+
export interface EvaluateSecurityPolicyInput {
|
|
15
|
+
/** Absolute path to the repository to evaluate */
|
|
16
|
+
repositoryPath: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class EvaluateSecurityPolicyUseCase {
|
|
19
|
+
private readonly policyService;
|
|
20
|
+
private readonly settingsRepository;
|
|
21
|
+
constructor(policyService: ISecurityPolicyService, settingsRepository: ISettingsRepository);
|
|
22
|
+
execute(input: EvaluateSecurityPolicyInput): Promise<EffectivePolicySnapshot>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=evaluate-security-policy.use-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-security-policy.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kEAAkE,CAAC;AAC/G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAE5G;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,kDAAkD;IAClD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,qBACa,6BAA6B;IAGtC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAFlB,aAAa,EAAE,sBAAsB,EAErC,kBAAkB,EAAE,mBAAmB;IAGpD,OAAO,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAqBpF"}
|
package/dist/packages/core/src/application/use-cases/security/evaluate-security-policy.use-case.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evaluate Security Policy Use Case
|
|
3
|
+
*
|
|
4
|
+
* Wraps ISecurityPolicyService.evaluatePolicy() as a use case.
|
|
5
|
+
* Updates settings with the latest evaluation timestamp and policy source.
|
|
6
|
+
* Returns the effective policy snapshot.
|
|
7
|
+
*/
|
|
8
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
9
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
11
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
|
+
};
|
|
14
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
16
|
+
};
|
|
17
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
18
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
19
|
+
};
|
|
20
|
+
import { injectable, inject } from 'tsyringe';
|
|
21
|
+
import { SecurityMode } from '../../../domain/generated/output.js';
|
|
22
|
+
let EvaluateSecurityPolicyUseCase = class EvaluateSecurityPolicyUseCase {
|
|
23
|
+
policyService;
|
|
24
|
+
settingsRepository;
|
|
25
|
+
constructor(policyService, settingsRepository) {
|
|
26
|
+
this.policyService = policyService;
|
|
27
|
+
this.settingsRepository = settingsRepository;
|
|
28
|
+
}
|
|
29
|
+
async execute(input) {
|
|
30
|
+
const policy = await this.policyService.evaluatePolicy(input.repositoryPath);
|
|
31
|
+
// Update settings with evaluation timestamp and source
|
|
32
|
+
try {
|
|
33
|
+
const settings = await this.settingsRepository.load();
|
|
34
|
+
if (settings) {
|
|
35
|
+
settings.security = {
|
|
36
|
+
...settings.security,
|
|
37
|
+
mode: settings.security?.mode ?? SecurityMode.Advisory,
|
|
38
|
+
lastEvaluationAt: new Date().toISOString(),
|
|
39
|
+
policySource: policy.source,
|
|
40
|
+
};
|
|
41
|
+
await this.settingsRepository.update(settings);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Non-fatal — policy is still returned even if settings update fails
|
|
46
|
+
}
|
|
47
|
+
return policy;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
EvaluateSecurityPolicyUseCase = __decorate([
|
|
51
|
+
injectable(),
|
|
52
|
+
__param(0, inject('ISecurityPolicyService')),
|
|
53
|
+
__param(1, inject('ISettingsRepository')),
|
|
54
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
55
|
+
], EvaluateSecurityPolicyUseCase);
|
|
56
|
+
export { EvaluateSecurityPolicyUseCase };
|