@intentius/chant 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audit/catalog.d.ts +45 -5
- package/dist/audit/catalog.d.ts.map +1 -1
- package/dist/audit/proof.d.ts +3 -0
- package/dist/audit/proof.d.ts.map +1 -1
- package/dist/audit/report-model.d.ts +4 -1
- package/dist/audit/report-model.d.ts.map +1 -1
- package/dist/audit/report.d.ts +3 -0
- package/dist/audit/report.d.ts.map +1 -1
- package/dist/audit/rules-doc.d.ts +8 -2
- package/dist/audit/rules-doc.d.ts.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/lexicon-rolling-upgrade.d.ts +37 -0
- package/dist/cli/commands/lexicon-rolling-upgrade.d.ts.map +1 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts +48 -0
- package/dist/cli/commands/lexicon-surface-diff.d.ts.map +1 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/pinned-upgrade.d.ts +41 -0
- package/dist/cli/commands/pinned-upgrade.d.ts.map +1 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts +39 -0
- package/dist/cli/handlers/components.d.ts.map +1 -0
- package/dist/cli/handlers/dev.d.ts +3 -0
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/graph.d.ts +4 -2
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts +49 -0
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +35 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/fetch.d.ts +22 -0
- package/dist/codegen/fetch.d.ts.map +1 -1
- package/dist/codegen/lexicon-regen.d.ts +110 -0
- package/dist/codegen/lexicon-regen.d.ts.map +1 -0
- package/dist/codegen/pinned-upgrade.d.ts +153 -0
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -0
- package/dist/codegen/rolling-upgrade.d.ts +138 -0
- package/dist/codegen/rolling-upgrade.d.ts.map +1 -0
- package/dist/codegen/surface-snapshot.d.ts +173 -0
- package/dist/codegen/surface-snapshot.d.ts.map +1 -0
- package/dist/codegen/version-bump.d.ts +21 -0
- package/dist/codegen/version-bump.d.ts.map +1 -0
- package/dist/components/auto-release.d.ts +93 -0
- package/dist/components/auto-release.d.ts.map +1 -0
- package/dist/components/builders.d.ts +37 -0
- package/dist/components/builders.d.ts.map +1 -0
- package/dist/components/capability-plugin-loader.d.ts +111 -0
- package/dist/components/capability-plugin-loader.d.ts.map +1 -0
- package/dist/components/capability-plugin-schema.d.ts +24 -0
- package/dist/components/capability-plugin-schema.d.ts.map +1 -0
- package/dist/components/capability-plugin.d.ts +85 -0
- package/dist/components/capability-plugin.d.ts.map +1 -0
- package/dist/components/capability.d.ts +89 -0
- package/dist/components/capability.d.ts.map +1 -0
- package/dist/components/cli-support.d.ts +204 -0
- package/dist/components/cli-support.d.ts.map +1 -0
- package/dist/components/component.d.ts +179 -0
- package/dist/components/component.d.ts.map +1 -0
- package/dist/components/config-defaults.d.ts +41 -0
- package/dist/components/config-defaults.d.ts.map +1 -0
- package/dist/components/discover.d.ts +60 -0
- package/dist/components/discover.d.ts.map +1 -0
- package/dist/components/driver-output.d.ts +20 -0
- package/dist/components/driver-output.d.ts.map +1 -0
- package/dist/components/driver.d.ts +209 -0
- package/dist/components/driver.d.ts.map +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/manifest-persistence.d.ts +79 -0
- package/dist/components/manifest-persistence.d.ts.map +1 -0
- package/dist/components/pilots/alb-ecs.pilot.d.ts +27 -0
- package/dist/components/pilots/alb-ecs.pilot.d.ts.map +1 -0
- package/dist/components/pilots/dynamodb.pilot.d.ts +22 -0
- package/dist/components/pilots/dynamodb.pilot.d.ts.map +1 -0
- package/dist/components/pilots/jar-emr.pilot.d.ts +37 -0
- package/dist/components/pilots/jar-emr.pilot.d.ts.map +1 -0
- package/dist/components/pilots/lambda.pilot.d.ts +35 -0
- package/dist/components/pilots/lambda.pilot.d.ts.map +1 -0
- package/dist/components/pilots/neo4j-fanout.pilot.d.ts +17 -0
- package/dist/components/pilots/neo4j-fanout.pilot.d.ts.map +1 -0
- package/dist/components/pilots/project.d.ts +13 -0
- package/dist/components/pilots/project.d.ts.map +1 -0
- package/dist/components/presets/ecs-fargate.d.ts +59 -0
- package/dist/components/presets/ecs-fargate.d.ts.map +1 -0
- package/dist/components/presets/index.d.ts +29 -0
- package/dist/components/presets/index.d.ts.map +1 -0
- package/dist/components/presets/lambda.d.ts +35 -0
- package/dist/components/presets/lambda.d.ts.map +1 -0
- package/dist/components/presets/single-host-compose.d.ts +43 -0
- package/dist/components/presets/single-host-compose.d.ts.map +1 -0
- package/dist/components/registry.d.ts +29 -0
- package/dist/components/registry.d.ts.map +1 -0
- package/dist/components/starter-plugin.d.ts +51 -0
- package/dist/components/starter-plugin.d.ts.map +1 -0
- package/dist/components/temporal-codegen-loader.d.ts +27 -0
- package/dist/components/temporal-codegen-loader.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.d.ts +35 -0
- package/dist/components/verbs/__tests__/mock-cloud-executor.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-process-runner.d.ts +45 -0
- package/dist/components/verbs/__tests__/mock-process-runner.d.ts.map +1 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.d.ts +33 -0
- package/dist/components/verbs/__tests__/mock-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/bom-writer.d.ts +155 -0
- package/dist/components/verbs/bom-writer.d.ts.map +1 -0
- package/dist/components/verbs/build-archive.d.ts +205 -0
- package/dist/components/verbs/build-archive.d.ts.map +1 -0
- package/dist/components/verbs/build.d.ts +150 -0
- package/dist/components/verbs/build.d.ts.map +1 -0
- package/dist/components/verbs/cloud-executor.d.ts +88 -0
- package/dist/components/verbs/cloud-executor.d.ts.map +1 -0
- package/dist/components/verbs/component-bom.d.ts +103 -0
- package/dist/components/verbs/component-bom.d.ts.map +1 -0
- package/dist/components/verbs/index.d.ts +49 -0
- package/dist/components/verbs/index.d.ts.map +1 -0
- package/dist/components/verbs/license-policy.d.ts +56 -0
- package/dist/components/verbs/license-policy.d.ts.map +1 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts +81 -0
- package/dist/components/verbs/lockfile-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/process-runner.d.ts +64 -0
- package/dist/components/verbs/process-runner.d.ts.map +1 -0
- package/dist/components/verbs/reproducibility.d.ts +80 -0
- package/dist/components/verbs/reproducibility.d.ts.map +1 -0
- package/dist/components/verbs/sbom-generator.d.ts +157 -0
- package/dist/components/verbs/sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/sbom.d.ts +79 -0
- package/dist/components/verbs/sbom.d.ts.map +1 -0
- package/dist/components/verbs/shell.d.ts +35 -0
- package/dist/components/verbs/shell.d.ts.map +1 -0
- package/dist/components/verbs/sign.d.ts +222 -0
- package/dist/components/verbs/sign.d.ts.map +1 -0
- package/dist/components/verbs/stub.d.ts +18 -0
- package/dist/components/verbs/stub.d.ts.map +1 -0
- package/dist/components/verbs/tool-sbom-generator.d.ts +51 -0
- package/dist/components/verbs/tool-sbom-generator.d.ts.map +1 -0
- package/dist/components/verbs/verify.d.ts +106 -0
- package/dist/components/verbs/verify.d.ts.map +1 -0
- package/dist/components/verbs/vex.d.ts +65 -0
- package/dist/components/verbs/vex.d.ts.map +1 -0
- package/dist/components/verbs/vuln-gate.d.ts +91 -0
- package/dist/components/verbs/vuln-gate.d.ts.map +1 -0
- package/dist/components/verbs/vuln-scan.d.ts +116 -0
- package/dist/components/verbs/vuln-scan.d.ts.map +1 -0
- package/dist/components/verbs/wait-verify.d.ts +85 -0
- package/dist/components/verbs/wait-verify.d.ts.map +1 -0
- package/dist/config.d.ts +205 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon.d.ts +78 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/build-ledger-store.d.ts +121 -0
- package/dist/lifecycle/build-ledger-store.d.ts.map +1 -0
- package/dist/lifecycle/build-ledger.d.ts +225 -0
- package/dist/lifecycle/build-ledger.d.ts.map +1 -0
- package/dist/lifecycle/git.d.ts +84 -0
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +5 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/oras-referrer-lookup.d.ts +41 -0
- package/dist/lifecycle/oras-referrer-lookup.d.ts.map +1 -0
- package/dist/lifecycle/release-ledger.d.ts +122 -0
- package/dist/lifecycle/release-ledger.d.ts.map +1 -0
- package/dist/lifecycle/status.d.ts +150 -0
- package/dist/lifecycle/status.d.ts.map +1 -0
- package/dist/lint/component-checks.d.ts +95 -0
- package/dist/lint/component-checks.d.ts.map +1 -0
- package/dist/lint/engine.d.ts +23 -0
- package/dist/lint/engine.d.ts.map +1 -1
- package/dist/lint/presets/strict.json +8 -1
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.d.ts +10 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.d.ts +3 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.d.ts +3 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.d.ts.map +1 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.d.ts +4 -0
- package/dist/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.d.ts +20 -0
- package/dist/lint/rules/comp/comp001-publishes-never-applies.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.d.ts +28 -0
- package/dist/lint/rules/comp/comp002-dangling-wiring-ref.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts +39 -0
- package/dist/lint/rules/comp/comp003-mutating-no-rollback.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts +37 -0
- package/dist/lint/rules/comp/comp004-gate-needs-temporal.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.d.ts +43 -0
- package/dist/lint/rules/comp/comp005-capability-kind-is-noun.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.d.ts +22 -0
- package/dist/lint/rules/comp/comp006-shell-needs-reason.d.ts.map +1 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.d.ts +33 -0
- package/dist/lint/rules/comp/comp007-composition-sprawl.d.ts.map +1 -0
- package/dist/lint/rules/comp/index.d.ts +18 -0
- package/dist/lint/rules/comp/index.d.ts.map +1 -0
- package/dist/lint/rules/comp/support.d.ts +71 -0
- package/dist/lint/rules/comp/support.d.ts.map +1 -0
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activity-registry.d.ts +11 -6
- package/dist/op/activity-registry.d.ts.map +1 -1
- package/dist/op/activity-runtime.d.ts +24 -0
- package/dist/op/activity-runtime.d.ts.map +1 -0
- package/dist/op/builders.d.ts +56 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/index.d.ts +2 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/ownership.d.ts +20 -14
- package/dist/ownership.d.ts.map +1 -1
- package/package.json +14 -1
- package/src/audit/catalog.test.ts +74 -22
- package/src/audit/catalog.ts +74 -471
- package/src/audit/proof.ts +4 -2
- package/src/audit/report-html.test.ts +14 -7
- package/src/audit/report-model.ts +20 -9
- package/src/audit/report.test.ts +36 -13
- package/src/audit/report.ts +2 -0
- package/src/audit/rules-doc.test.ts +8 -6
- package/src/audit/rules-doc.ts +13 -5
- package/src/cli/commands/audit.ts +23 -18
- package/src/cli/commands/component-lint.test.ts +158 -0
- package/src/cli/commands/doctor.test.ts +116 -2
- package/src/cli/commands/doctor.ts +46 -0
- package/src/cli/commands/lexicon-rolling-upgrade.ts +198 -0
- package/src/cli/commands/lexicon-surface-diff.test.ts +104 -0
- package/src/cli/commands/lexicon-surface-diff.ts +185 -0
- package/src/cli/commands/lint.ts +142 -1
- package/src/cli/commands/pinned-upgrade.ts +204 -0
- package/src/cli/handlers/build.ts +58 -1
- package/src/cli/handlers/components.test.ts +504 -0
- package/src/cli/handlers/components.ts +404 -0
- package/src/cli/handlers/dev.ts +60 -1
- package/src/cli/handlers/graph.ts +47 -2
- package/src/cli/handlers/misc.ts +45 -1
- package/src/cli/handlers/run.test.ts +967 -3
- package/src/cli/handlers/run.ts +618 -11
- package/src/cli/main.test.ts +66 -0
- package/src/cli/main.ts +105 -2
- package/src/cli/registry.ts +35 -0
- package/src/codegen/fetch.test.ts +84 -3
- package/src/codegen/fetch.ts +76 -2
- package/src/codegen/lexicon-regen.test.ts +298 -0
- package/src/codegen/lexicon-regen.ts +545 -0
- package/src/codegen/pinned-upgrade.test.ts +399 -0
- package/src/codegen/pinned-upgrade.ts +423 -0
- package/src/codegen/rolling-upgrade.test.ts +333 -0
- package/src/codegen/rolling-upgrade.ts +320 -0
- package/src/codegen/surface-snapshot.test.ts +461 -0
- package/src/codegen/surface-snapshot.ts +546 -0
- package/src/codegen/version-bump.test.ts +47 -0
- package/src/codegen/version-bump.ts +39 -0
- package/src/components/README.md +130 -0
- package/src/components/SPRAWL-VALIDATION.md +181 -0
- package/src/components/__fixtures__/alb-ecs-service.json +51 -0
- package/src/components/__fixtures__/dynamodb-infra.json +32 -0
- package/src/components/__fixtures__/emr-job-consumer.json +26 -0
- package/src/components/__fixtures__/jar-lib-producer.json +16 -0
- package/src/components/__fixtures__/lambda-image-processor.json +28 -0
- package/src/components/__fixtures__/neo4j-fanout.json +34 -0
- package/src/components/__fixtures__/single-host-compose.json +29 -0
- package/src/components/auto-release.test.ts +217 -0
- package/src/components/auto-release.ts +216 -0
- package/src/components/builders.test.ts +45 -0
- package/src/components/builders.ts +71 -0
- package/src/components/capability-plugin-loader.ts +218 -0
- package/src/components/capability-plugin-schema.ts +56 -0
- package/src/components/capability-plugin.test.ts +235 -0
- package/src/components/capability-plugin.ts +108 -0
- package/src/components/capability.ts +117 -0
- package/src/components/cli-support.test.ts +579 -0
- package/src/components/cli-support.ts +481 -0
- package/src/components/component-schema.test.ts +265 -0
- package/src/components/component.schema.json +235 -0
- package/src/components/component.test.ts +251 -0
- package/src/components/component.ts +255 -0
- package/src/components/config-defaults.test.ts +263 -0
- package/src/components/config-defaults.ts +145 -0
- package/src/components/discover.test.ts +352 -0
- package/src/components/discover.ts +167 -0
- package/src/components/driver-output.ts +71 -0
- package/src/components/driver.test.ts +638 -0
- package/src/components/driver.ts +690 -0
- package/src/components/index.ts +113 -0
- package/src/components/manifest-persistence.test.ts +152 -0
- package/src/components/manifest-persistence.ts +164 -0
- package/src/components/pilots/README.md +33 -0
- package/src/components/pilots/alb-ecs.pilot.ts +63 -0
- package/src/components/pilots/dynamodb.pilot.ts +59 -0
- package/src/components/pilots/jar-emr.pilot.ts +69 -0
- package/src/components/pilots/lambda.pilot.ts +55 -0
- package/src/components/pilots/neo4j-fanout.pilot.ts +92 -0
- package/src/components/pilots/pilots-lint-clean.test.ts +78 -0
- package/src/components/pilots/pilots.test.ts +126 -0
- package/src/components/pilots/project.ts +13 -0
- package/src/components/presets/comp007-reduction.test.ts +122 -0
- package/src/components/presets/ecs-fargate.test.ts +84 -0
- package/src/components/presets/ecs-fargate.ts +103 -0
- package/src/components/presets/index.ts +32 -0
- package/src/components/presets/lambda.test.ts +35 -0
- package/src/components/presets/lambda.ts +53 -0
- package/src/components/presets/single-host-compose.test.ts +65 -0
- package/src/components/presets/single-host-compose.ts +64 -0
- package/src/components/registry.test.ts +112 -0
- package/src/components/registry.ts +37 -0
- package/src/components/starter-plugin.ts +105 -0
- package/src/components/temporal-codegen-loader.ts +41 -0
- package/src/components/verbs/__fixtures__/package-lock.json +45 -0
- package/src/components/verbs/__fixtures__/pom.xml +37 -0
- package/src/components/verbs/__fixtures__/schemas/cyclonedx-1.5.schema.json +3800 -0
- package/src/components/verbs/__fixtures__/schemas/cyclonedx-spdx-license.schema.json +621 -0
- package/src/components/verbs/__fixtures__/schemas/jsf-0.82.schema.json +240 -0
- package/src/components/verbs/__fixtures__/schemas/spdx-2.3.schema.json +740 -0
- package/src/components/verbs/__tests__/mock-cloud-executor.ts +102 -0
- package/src/components/verbs/__tests__/mock-process-runner.ts +79 -0
- package/src/components/verbs/__tests__/mock-sbom-generator.ts +85 -0
- package/src/components/verbs/bom-writer.test.ts +331 -0
- package/src/components/verbs/bom-writer.ts +386 -0
- package/src/components/verbs/build-archive.test.ts +251 -0
- package/src/components/verbs/build-archive.ts +296 -0
- package/src/components/verbs/build.test.ts +222 -0
- package/src/components/verbs/build.ts +252 -0
- package/src/components/verbs/cloud-executor.ts +181 -0
- package/src/components/verbs/component-bom.test.ts +219 -0
- package/src/components/verbs/component-bom.ts +189 -0
- package/src/components/verbs/index.ts +49 -0
- package/src/components/verbs/license-policy.ts +115 -0
- package/src/components/verbs/lockfile-sbom-generator.test.ts +195 -0
- package/src/components/verbs/lockfile-sbom-generator.ts +236 -0
- package/src/components/verbs/process-runner.test.ts +79 -0
- package/src/components/verbs/process-runner.ts +113 -0
- package/src/components/verbs/reproducibility.test.ts +24 -0
- package/src/components/verbs/reproducibility.ts +100 -0
- package/src/components/verbs/sbom-generator.test.ts +96 -0
- package/src/components/verbs/sbom-generator.ts +209 -0
- package/src/components/verbs/sbom.test.ts +184 -0
- package/src/components/verbs/sbom.ts +152 -0
- package/src/components/verbs/shell.test.ts +36 -0
- package/src/components/verbs/shell.ts +51 -0
- package/src/components/verbs/sign.test.ts +210 -0
- package/src/components/verbs/sign.ts +350 -0
- package/src/components/verbs/stub.ts +34 -0
- package/src/components/verbs/tool-sbom-generator.test.ts +194 -0
- package/src/components/verbs/tool-sbom-generator.ts +192 -0
- package/src/components/verbs/verify.test.ts +159 -0
- package/src/components/verbs/verify.ts +179 -0
- package/src/components/verbs/vex.ts +182 -0
- package/src/components/verbs/vuln-gate.test.ts +201 -0
- package/src/components/verbs/vuln-gate.ts +170 -0
- package/src/components/verbs/vuln-scan.test.ts +145 -0
- package/src/components/verbs/vuln-scan.ts +266 -0
- package/src/components/verbs/wait-verify.test.ts +111 -0
- package/src/components/verbs/wait-verify.ts +171 -0
- package/src/config.test.ts +74 -1
- package/src/config.ts +219 -0
- package/src/index.ts +32 -0
- package/src/lexicon.ts +88 -0
- package/src/lifecycle/build-ledger-store.test.ts +217 -0
- package/src/lifecycle/build-ledger-store.ts +165 -0
- package/src/lifecycle/build-ledger.test.ts +349 -0
- package/src/lifecycle/build-ledger.ts +305 -0
- package/src/lifecycle/git.test.ts +118 -0
- package/src/lifecycle/git.ts +149 -14
- package/src/lifecycle/index.ts +5 -0
- package/src/lifecycle/oras-referrer-lookup.test.ts +116 -0
- package/src/lifecycle/oras-referrer-lookup.ts +110 -0
- package/src/lifecycle/release-ledger.test.ts +209 -0
- package/src/lifecycle/release-ledger.ts +185 -0
- package/src/lifecycle/status.test.ts +330 -0
- package/src/lifecycle/status.ts +278 -0
- package/src/lint/component-checks.ts +148 -0
- package/src/lint/config.test.ts +21 -0
- package/src/lint/engine.ts +11 -2
- package/src/lint/presets/relaxed.json +8 -1
- package/src/lint/presets/strict.json +8 -1
- package/src/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-a.component.ts +9 -0
- package/src/lint/rules/__fixtures__/comp/comp000-discovery-error/broken-b.component.ts +9 -0
- package/src/lint/rules/__fixtures__/comp/comp001/fail/orphan-lib.component.ts +11 -0
- package/src/lint/rules/__fixtures__/comp/comp001/pass/emr-job.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp001/pass/jar-lib.component.ts +11 -0
- package/src/lint/rules/__fixtures__/comp/comp002/fail/search-service.component.ts +27 -0
- package/src/lint/rules/__fixtures__/comp/comp002/pass/jar-lib.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp002/pass/search-service.component.ts +23 -0
- package/src/lint/rules/__fixtures__/comp/comp003/fail/migrator.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/migrator.component.ts +19 -0
- package/src/lint/rules/__fixtures__/comp/comp003/pass/orders-table.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp004/fail/neo4j-cluster.component.ts +20 -0
- package/src/lint/rules/__fixtures__/comp/comp004/pass/neo4j-cluster.component.ts +23 -0
- package/src/lint/rules/__fixtures__/comp/comp004/pass/orders-table.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp005/fail/search-service.component.ts +14 -0
- package/src/lint/rules/__fixtures__/comp/comp005/pass/search-service.component.ts +18 -0
- package/src/lint/rules/__fixtures__/comp/comp006/fail/legacy-tool.component.ts +10 -0
- package/src/lint/rules/__fixtures__/comp/comp006/pass/legacy-tool.component.ts +14 -0
- package/src/lint/rules/__fixtures__/comp/comp007/fail/inventory-table.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp007/fail/orders-table.component.ts +13 -0
- package/src/lint/rules/__fixtures__/comp/comp007/pass/orders-table.component.ts +12 -0
- package/src/lint/rules/__fixtures__/comp/comp007/pass/search-service.component.ts +18 -0
- package/src/lint/rules/comp/comp.test.ts +378 -0
- package/src/lint/rules/comp/comp001-publishes-never-applies.ts +78 -0
- package/src/lint/rules/comp/comp002-dangling-wiring-ref.ts +94 -0
- package/src/lint/rules/comp/comp003-mutating-no-rollback.ts +115 -0
- package/src/lint/rules/comp/comp004-gate-needs-temporal.ts +66 -0
- package/src/lint/rules/comp/comp005-capability-kind-is-noun.ts +113 -0
- package/src/lint/rules/comp/comp006-shell-needs-reason.ts +55 -0
- package/src/lint/rules/comp/comp007-composition-sprawl.ts +71 -0
- package/src/lint/rules/comp/index.ts +37 -0
- package/src/lint/rules/comp/support.ts +173 -0
- package/src/lsp/lexicon-providers.test.ts +55 -0
- package/src/lsp/lexicon-providers.ts +13 -3
- package/src/op/activity-registry.test.ts +38 -0
- package/src/op/activity-registry.ts +31 -12
- package/src/op/activity-runtime.ts +73 -0
- package/src/op/builders.ts +92 -0
- package/src/op/index.ts +3 -1
- package/src/ownership.test.ts +24 -26
- package/src/ownership.ts +26 -38
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BuildArchive format — the self-contained bundle `docker-build` (and the
|
|
3
|
+
* other build-family verbs) write into (#564, epic #551 "4. Build archive +
|
|
4
|
+
* deferred publish"). See docs/components/build-archive.mdx.
|
|
5
|
+
*
|
|
6
|
+
* A build archive holds four kinds of contents, enumerated by one manifest:
|
|
7
|
+
* - `image` — an image tarball in OCI layout (as `docker save` produces),
|
|
8
|
+
* content-addressed by its digest.
|
|
9
|
+
* - `template` — a synthesized deploy template (e.g. a CloudFormation
|
|
10
|
+
* document) referenced by `cfn-deploy`'s `archive:<name>` convention
|
|
11
|
+
* (see ../verbs/apply.ts's `CfnDeployInput.template`). Per #613, a
|
|
12
|
+
* `template` entry is a first-class artifact with its own content
|
|
13
|
+
* digest — peer to `image`/`asset` — so it can itself be the
|
|
14
|
+
* `subjectDigest` a `sbom`-kind entry (specifically a config-BOM,
|
|
15
|
+
* `bomKind: "config"`) is attached to.
|
|
16
|
+
* - `asset` — any other published artifact (a jar, a zip) the `publish`
|
|
17
|
+
* family's non-image backends (`publish-artifact`) promote.
|
|
18
|
+
* - `sbom` — a Bill of Materials attached to another entry's digest (#606,
|
|
19
|
+
* #613, epic #551 follow-up to #564/#568), written by either the
|
|
20
|
+
* `generate-sbom` capability (./sbom.ts, a **software** BOM over an
|
|
21
|
+
* image/jar/zip/dir) or the `extract-config-bom` capability
|
|
22
|
+
* (./config-bom.ts, a **config-BOM** over a synthesized IaC template's
|
|
23
|
+
* declared resources/nested stacks/external references). `bomKind`
|
|
24
|
+
* distinguishes the two without introducing a separate entry kind — both
|
|
25
|
+
* are content-addressed, digest-linked BOM documents, and every existing
|
|
26
|
+
* `sbom`-kind consumer (`findSbomForSubject`, the build ledger) keeps
|
|
27
|
+
* working unmodified for either kind. The archive is the **universal
|
|
28
|
+
* home** for both: an image's SBOM may also be projected as an OCI
|
|
29
|
+
* referrer at publish time (a registry-side convenience for `oras
|
|
30
|
+
* discover`/`cosign tree`), but the archive-carried copy is what makes
|
|
31
|
+
* non-image artifacts (a jar in S3, a zip, a template) and registry-less
|
|
32
|
+
* deploys (`load-image-on-host`) work identically — no registry required
|
|
33
|
+
* to read a build's BOM back.
|
|
34
|
+
*
|
|
35
|
+
* The manifest is itself content-addressed (`manifestDigest`, a stable hash
|
|
36
|
+
* over its entries) so two builds of the same inputs produce the same
|
|
37
|
+
* archive identity, and so a promoted digest can be traced back to exactly
|
|
38
|
+
* the manifest that produced it. Nothing here shells out or touches a real
|
|
39
|
+
* filesystem/docker daemon — manifest assembly is pure data, which is what
|
|
40
|
+
* lets `docker-build` (./build.ts) and `publish-image`/`load-image-on-host`
|
|
41
|
+
* (./publish.ts) build and promote an archive entirely through the injectable
|
|
42
|
+
* `CloudExecutor`, exercised in tests via `MockCloudExecutor` with no real
|
|
43
|
+
* disk/docker/AWS involved. The same is true of `generate-sbom` (./sbom.ts)
|
|
44
|
+
* and the injectable `SbomGenerator` (./sbom-generator.ts).
|
|
45
|
+
*
|
|
46
|
+
* Per #614, every `image`/`template`/`asset` entry also carries an honest,
|
|
47
|
+
* per-artifact `reproducibility` record and an optional `provenance`
|
|
48
|
+
* source->output link (see ./reproducibility.ts) — never a single blanket
|
|
49
|
+
* flag hoisted to the component, since a component that builds more than one
|
|
50
|
+
* artifact type (an image plus a synthesized template, say) has a different
|
|
51
|
+
* true answer for each.
|
|
52
|
+
*/
|
|
53
|
+
import type { ArtifactReproducibility, ProvenanceLink } from "./reproducibility.js";
|
|
54
|
+
export type BuildArchiveEntryKind = "image" | "template" | "asset" | "sbom";
|
|
55
|
+
/** One content-addressed item inside a build archive. */
|
|
56
|
+
export interface BuildArchiveEntry {
|
|
57
|
+
/** What this entry is — an OCI-layout image tarball, a synthesized template, a non-image asset (jar/zip), or an SBOM. */
|
|
58
|
+
kind: BuildArchiveEntryKind;
|
|
59
|
+
/** Path of this entry inside the archive (what `cfn-deploy`'s `archive:<path>` and `publish-image`/`publish-artifact`'s `from` reference). */
|
|
60
|
+
path: string;
|
|
61
|
+
/** Content-addressed digest of this entry's bytes (`sha256:...`). Identity for promote-by-digest. */
|
|
62
|
+
digest: string;
|
|
63
|
+
/** Declared media type, mirroring the OCI conventions the epic references (`oras discover`/`cosign tree` attach to the same digest). Defaults are assigned per `kind` by `addArchiveEntry` when omitted. For a `kind: "sbom"` entry this is the SBOM's own media type (`application/spdx+json` or `application/vnd.cyclonedx+json`) — never hardcoded, always read from the `SbomDocument` that produced the entry (./sbom-generator.ts). */
|
|
64
|
+
mediaType?: string;
|
|
65
|
+
/**
|
|
66
|
+
* For a `kind: "sbom"` entry only: the digest of the artifact this SBOM
|
|
67
|
+
* describes (an `image`/`asset` entry's `digest` elsewhere in the same
|
|
68
|
+
* manifest) — the OCI "referrer subject" relationship, recorded uniformly
|
|
69
|
+
* here regardless of whether the backend that produced it was a BuildKit
|
|
70
|
+
* attestation or a `syft` scan (#606: "the backend owns HOW it attaches
|
|
71
|
+
* ... the archive manifest records it uniformly"). Absent for non-SBOM
|
|
72
|
+
* entries.
|
|
73
|
+
*/
|
|
74
|
+
subjectDigest?: string;
|
|
75
|
+
/** For a `kind: "sbom"` entry only: number of packages/components the SBOM enumerates, when known — surfaced by `chant components status` without parsing the SBOM bytes. */
|
|
76
|
+
packageCount?: number;
|
|
77
|
+
/** For a `kind: "sbom"` entry only: which tool produced it (e.g. "syft", "buildkit") — surfaced alongside format/package count so status reports SBOM *source*. */
|
|
78
|
+
generator?: string;
|
|
79
|
+
/**
|
|
80
|
+
* For a `kind: "sbom"` entry only: whether this is a **software** BOM
|
|
81
|
+
* (over an image/jar/zip/dir's declared dependencies, ./sbom.ts) or a
|
|
82
|
+
* **config-BOM** (over a synthesized IaC template's declared resources +
|
|
83
|
+
* nested stacks + external references, ./config-bom.ts) (#613). Defaults
|
|
84
|
+
* to `"software"` when omitted, so every pre-#613 `sbom` entry (and every
|
|
85
|
+
* caller that never set this field) is unambiguously the software kind —
|
|
86
|
+
* this default must never change without a manifest version bump.
|
|
87
|
+
*/
|
|
88
|
+
bomKind?: "software" | "config";
|
|
89
|
+
/**
|
|
90
|
+
* For an `image`/`template`/`asset` entry: the honest, per-artifact
|
|
91
|
+
* reproducibility basis (#614, see ./reproducibility.ts). Assigned a
|
|
92
|
+
* kind-appropriate default by `addArchiveEntry` when omitted — see
|
|
93
|
+
* `defaultReproducibility` — so every entry that can meaningfully carry a
|
|
94
|
+
* reproducibility claim gets one without every call site having to compute
|
|
95
|
+
* it. Absent for `sbom` entries, which describe another artifact rather
|
|
96
|
+
* than being one themselves.
|
|
97
|
+
*/
|
|
98
|
+
reproducibility?: ArtifactReproducibility;
|
|
99
|
+
/**
|
|
100
|
+
* For an `image`/`template`/`asset` entry: the source ref/commit that
|
|
101
|
+
* produced this artifact's digest (#614). Optional — a caller that hasn't
|
|
102
|
+
* threaded through a source ref (e.g. a test fixture, or a build run
|
|
103
|
+
* outside a git checkout) simply omits it rather than fabricating one.
|
|
104
|
+
*/
|
|
105
|
+
provenance?: ProvenanceLink;
|
|
106
|
+
}
|
|
107
|
+
/** The manifest of contents for one build archive — the "self-contained format" #564 asks for. */
|
|
108
|
+
export interface BuildArchiveManifest {
|
|
109
|
+
/** Manifest schema version, so a future incompatible shape can be detected before being misread. */
|
|
110
|
+
version: 1;
|
|
111
|
+
/** Component this archive was built for. */
|
|
112
|
+
component: string;
|
|
113
|
+
/** ISO-8601 timestamp this manifest was assembled. */
|
|
114
|
+
createdAt: string;
|
|
115
|
+
/** Every image/template/asset this archive carries. */
|
|
116
|
+
contents: BuildArchiveEntry[];
|
|
117
|
+
/**
|
|
118
|
+
* Content-addressed digest of this manifest's own entries (`sha256:...`),
|
|
119
|
+
* stable across rebuilds of byte-identical inputs and independent of
|
|
120
|
+
* `createdAt` — so identical inputs produce the same archive identity even
|
|
121
|
+
* when built at different times, and a changed digest here always means
|
|
122
|
+
* changed contents, not merely a re-run.
|
|
123
|
+
*/
|
|
124
|
+
manifestDigest: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Deterministic content digest over arbitrary string content. Same shape as
|
|
128
|
+
* the FNV-ish fake digest `MockCloudExecutor` uses, so tests can assert on it
|
|
129
|
+
* without a real `sha256` implementation. Exported so callers that need to
|
|
130
|
+
* digest content that never goes through the `CloudExecutor` (e.g. a
|
|
131
|
+
* synthesized template's serialized bytes, see ./build.ts's
|
|
132
|
+
* `addArchiveTemplate`) share this one algorithm rather than each defining
|
|
133
|
+
* their own. Production `image`/`asset` entries instead carry the real
|
|
134
|
+
* digest their producing capability already computed (e.g. `docker-build`'s
|
|
135
|
+
* `executor.docker.build` digest).
|
|
136
|
+
*/
|
|
137
|
+
export declare function contentDigest(input: string): string;
|
|
138
|
+
/** Compute the aggregate `manifestDigest` over a set of entries — sorted by path so entry order never changes the digest, only content does. */
|
|
139
|
+
export declare function computeManifestDigest(contents: BuildArchiveEntry[]): string;
|
|
140
|
+
/** Start a new, empty manifest for `component`. Entries are added with `addArchiveEntry`. */
|
|
141
|
+
export declare function createBuildArchiveManifest(component: string, opts?: {
|
|
142
|
+
now?: () => Date;
|
|
143
|
+
}): BuildArchiveManifest;
|
|
144
|
+
/**
|
|
145
|
+
* Add (or replace, by `path`) one entry and return a new manifest with
|
|
146
|
+
* `manifestDigest` recomputed. Pure/immutable so callers (and tests) can hold
|
|
147
|
+
* onto a manifest snapshot before/after a step without aliasing surprises.
|
|
148
|
+
*
|
|
149
|
+
* Assigns a kind-appropriate default `reproducibility` (#614,
|
|
150
|
+
* `defaultReproducibility`) when the caller omits one — `template` entries
|
|
151
|
+
* default to `deterministic-synthesis`, `image`/`asset` entries default to
|
|
152
|
+
* `best-effort`, and `sbom` entries get none. An explicit `entry.reproducibility`
|
|
153
|
+
* (e.g. a future reproducible-build-attested image) always wins over the
|
|
154
|
+
* default. `reproducibility`/`provenance` are never part of
|
|
155
|
+
* `computeManifestDigest`'s input — they describe the artifact, they are not
|
|
156
|
+
* content the artifact's identity depends on, so recording/correcting them
|
|
157
|
+
* later never perturbs `manifestDigest`.
|
|
158
|
+
*/
|
|
159
|
+
export declare function addArchiveEntry(manifest: BuildArchiveManifest, entry: BuildArchiveEntry): BuildArchiveManifest;
|
|
160
|
+
/** Look up one entry by archive-relative path (the same path form `cfn-deploy`'s `archive:<path>` and `publish-image`'s `from` use). */
|
|
161
|
+
export declare function findArchiveEntry(manifest: BuildArchiveManifest, path: string): BuildArchiveEntry | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Strip the `archive:` prefix chant's step wiring uses
|
|
164
|
+
* (e.g. `cfn-deploy`'s `template: "archive:search.template.json"`) down to
|
|
165
|
+
* the manifest-relative path. Returns the input unchanged when it carries no
|
|
166
|
+
* such prefix (a plain filesystem path outside the archive).
|
|
167
|
+
*/
|
|
168
|
+
export declare function archiveRelativePath(ref: string): string;
|
|
169
|
+
/** All `image`-kind entries in a manifest — what a publish backend has to choose from when `from` is ambiguous/omitted. */
|
|
170
|
+
export declare function imageEntries(manifest: BuildArchiveManifest): BuildArchiveEntry[];
|
|
171
|
+
/** All `sbom`-kind entries in a manifest, regardless of which artifact they describe (#606). */
|
|
172
|
+
export declare function sbomEntries(manifest: BuildArchiveManifest): BuildArchiveEntry[];
|
|
173
|
+
/**
|
|
174
|
+
* Find the archive-carried SBOM entry attached to a given artifact digest
|
|
175
|
+
* (an `image`/`asset` entry's `digest` elsewhere in the same manifest). This
|
|
176
|
+
* is the archive-native lookup ../../lifecycle/build-ledger.ts's
|
|
177
|
+
* `buildLedgerEntries` uses to surface "SBOM by digest" without any registry
|
|
178
|
+
* or `oras`/network access — the archive is the universal home for the SBOM
|
|
179
|
+
* regardless of artifact type (#606).
|
|
180
|
+
*/
|
|
181
|
+
export declare function findSbomForSubject(manifest: BuildArchiveManifest, subjectDigest: string): BuildArchiveEntry | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Find the archive-carried **config-BOM** entry (`bomKind: "config"`)
|
|
184
|
+
* attached to a given template digest — the config-BOM analogue of
|
|
185
|
+
* `findSbomForSubject` (#613). A `template` entry's digest is computed the
|
|
186
|
+
* same way an `image`/`asset` entry's is (`contentDigest` over its bytes,
|
|
187
|
+
* see `addArchiveTemplate` in ./build.ts), so config-only/infra components
|
|
188
|
+
* with no software artifact still resolve a BOM by digest through the same
|
|
189
|
+
* lookup shape as every other artifact kind.
|
|
190
|
+
*/
|
|
191
|
+
export declare function findConfigBomForSubject(manifest: BuildArchiveManifest, subjectDigest: string): BuildArchiveEntry | undefined;
|
|
192
|
+
/** All `template`-kind entries in a manifest — every synthesized IaC document the archive carries, each a first-class artifact with its own content digest (#613). */
|
|
193
|
+
export declare function templateEntries(manifest: BuildArchiveManifest): BuildArchiveEntry[];
|
|
194
|
+
/** All `asset`-kind entries in a manifest (non-image published artifacts — a jar, a zip). */
|
|
195
|
+
export declare function assetEntries(manifest: BuildArchiveManifest): BuildArchiveEntry[];
|
|
196
|
+
/**
|
|
197
|
+
* Every artifact entry in a manifest — `image`, `template`, and `asset`
|
|
198
|
+
* kinds, excluding `sbom` entries (which describe an artifact rather than
|
|
199
|
+
* being one) — the set #614's per-artifact reproducibility surface iterates
|
|
200
|
+
* over. Order is manifest insertion order; callers that need a stable order
|
|
201
|
+
* for display/JSON output sort by `path` themselves (mirroring
|
|
202
|
+
* `computeManifestDigest`'s own path-sort convention).
|
|
203
|
+
*/
|
|
204
|
+
export declare function artifactEntries(manifest: BuildArchiveManifest): BuildArchiveEntry[];
|
|
205
|
+
//# sourceMappingURL=build-archive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-archive.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/build-archive.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* build family — source -> BuildArchive, keyed by artifact type.
|
|
3
|
+
* Fully cloud-agnostic (see docs/components/cloud-boundary). `docker-build` is
|
|
4
|
+
* a real implementation (#557, epic #551) built over the injectable
|
|
5
|
+
* `CloudExecutor` (./cloud-executor.ts) so tests never shell out to a real
|
|
6
|
+
* `docker` daemon. `zip-package` (via `zip`) and `jvm-build` (via `mvn`/the
|
|
7
|
+
* gradle wrapper) are real, run through the injectable `ProcessRunner`.
|
|
8
|
+
*
|
|
9
|
+
* `docker-build` also assembles the component's `BuildArchiveManifest`
|
|
10
|
+
* (#564, epic #551 "4. Build archive + deferred publish" — see
|
|
11
|
+
* ./build-archive.ts): every build appends an `image`-kind entry recording
|
|
12
|
+
* the archive path and digest it just produced, so the archive is
|
|
13
|
+
* self-describing (content-addressed, with a manifest of contents) rather
|
|
14
|
+
* than a bare tarball. `addArchiveTemplate` lets a caller fold synthesized
|
|
15
|
+
* deploy templates (e.g. CloudFormation JSON, already written into the
|
|
16
|
+
* archive by chant's existing synthesis step) into the same manifest, so one
|
|
17
|
+
* document enumerates every content kind the archive holds.
|
|
18
|
+
*
|
|
19
|
+
* Per #614, both entry points accept an optional `sourceRef` (a git sha, or
|
|
20
|
+
* `"<sha>:<path>"` for a monorepo subpath) that becomes the entry's
|
|
21
|
+
* `provenance` link. `image`/`template` entries otherwise default to their
|
|
22
|
+
* kind-appropriate `reproducibility` basis via `addArchiveEntry` — see
|
|
23
|
+
* ./reproducibility.ts.
|
|
24
|
+
*/
|
|
25
|
+
import type { Capability } from "../capability.js";
|
|
26
|
+
import { type CloudExecutor } from "./cloud-executor.js";
|
|
27
|
+
import { type ProcessRunner } from "./process-runner.js";
|
|
28
|
+
import { type BuildArchiveManifest } from "./build-archive.js";
|
|
29
|
+
export interface DockerBuildInput {
|
|
30
|
+
/** Build context directory. */
|
|
31
|
+
context: string;
|
|
32
|
+
/** Path to the Dockerfile, relative to `context`. Default: "Dockerfile". */
|
|
33
|
+
dockerfile?: string;
|
|
34
|
+
/** Build args passed to `docker build --build-arg`. */
|
|
35
|
+
buildArgs?: Record<string, string>;
|
|
36
|
+
/** Target stage for a multi-stage build. */
|
|
37
|
+
target?: string;
|
|
38
|
+
/** Where the produced image tarball is written inside the build archive. */
|
|
39
|
+
into: string;
|
|
40
|
+
/**
|
|
41
|
+
* Manifest to extend with this build's `image` entry, rather than starting
|
|
42
|
+
* a fresh one. Pass the manifest returned by a prior build/template step in
|
|
43
|
+
* the same archive (e.g. via `@Build.manifest` wiring) to accumulate one
|
|
44
|
+
* manifest across a component's whole build phase. Omit to start a new
|
|
45
|
+
* single-entry manifest for this build alone.
|
|
46
|
+
*/
|
|
47
|
+
manifest?: BuildArchiveManifest;
|
|
48
|
+
/** Source ref/commit this build was run against (#614) — recorded as the entry's `provenance.sourceRef`. Omit when unknown (e.g. a build run outside a git checkout); no `provenance` is recorded in that case. */
|
|
49
|
+
sourceRef?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface DockerBuildOutput {
|
|
52
|
+
/** Path of the produced image tarball (OCI layout) inside the build archive. */
|
|
53
|
+
archivePath: string;
|
|
54
|
+
/** Content-addressed digest of the built image (`sha256:...`). */
|
|
55
|
+
digest: string;
|
|
56
|
+
/** The build archive's manifest, now including this image's entry — content-addressed via `manifest.manifestDigest`. */
|
|
57
|
+
manifest: BuildArchiveManifest;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build a container image from a Dockerfile into the build archive: `docker
|
|
61
|
+
* build`, tagged with a build-local reference derived from `into`, then
|
|
62
|
+
* `docker save`d to the archive path (OCI layout, per `docker save`'s output
|
|
63
|
+
* format). Records the produced tarball as an `image` entry in the archive's
|
|
64
|
+
* manifest (extending `input.manifest` when the caller threads one through,
|
|
65
|
+
* so a component with more than one image build accumulates a single
|
|
66
|
+
* manifest for the whole archive). No rollback — a local build produces no
|
|
67
|
+
* remote/mutable state to compensate; the archive path is simply not consumed
|
|
68
|
+
* further if a later step fails.
|
|
69
|
+
*/
|
|
70
|
+
export declare function createDockerBuildCapability(executor?: CloudExecutor): Capability<DockerBuildInput, DockerBuildOutput>;
|
|
71
|
+
/** Default `docker-build` capability, backed by the real `CloudExecutor`. */
|
|
72
|
+
export declare const dockerBuildCapability: Capability<DockerBuildInput, DockerBuildOutput>;
|
|
73
|
+
export interface AddArchiveTemplateInput {
|
|
74
|
+
/** Where the synthesized template is written inside the build archive (e.g. `"search.template.json"`). */
|
|
75
|
+
path: string;
|
|
76
|
+
/** Serialized template content — its digest is computed from these exact bytes, so an unrelated re-synthesis with identical content keeps the same manifest digest. */
|
|
77
|
+
content: string;
|
|
78
|
+
/** Manifest to extend. Omit to start a new manifest holding just this template. */
|
|
79
|
+
manifest?: BuildArchiveManifest;
|
|
80
|
+
/** Source ref/commit this template was synthesized from (#614) — recorded as the entry's `provenance.sourceRef`. Omit when unknown; no `provenance` is recorded in that case. */
|
|
81
|
+
sourceRef?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface AddArchiveTemplateOutput {
|
|
84
|
+
/** Content-addressed digest computed over `content`. */
|
|
85
|
+
digest: string;
|
|
86
|
+
/** The build archive's manifest, now including this template's entry. */
|
|
87
|
+
manifest: BuildArchiveManifest;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Fold one synthesized deploy template (e.g. the CloudFormation JSON chant's
|
|
91
|
+
* existing synthesis already produces) into a build archive's manifest as a
|
|
92
|
+
* `template`-kind entry, alongside the image(s) `docker-build` recorded. Not
|
|
93
|
+
* a registered capability — template synthesis is chant's existing `build`
|
|
94
|
+
* pipeline (see ../../build.ts), not a new deploy-time verb — so this is a
|
|
95
|
+
* plain function a build orchestration step calls directly to keep one
|
|
96
|
+
* manifest across every content kind the archive holds (image + templates).
|
|
97
|
+
* Exported alongside the build-family capabilities since it is the other
|
|
98
|
+
* half of "what goes in the manifest" `docker-build` documents above.
|
|
99
|
+
*/
|
|
100
|
+
export declare function addArchiveTemplate(input: AddArchiveTemplateInput): AddArchiveTemplateOutput;
|
|
101
|
+
export interface ZipPackageInput {
|
|
102
|
+
/** Directory (or file list) to package. */
|
|
103
|
+
source: string;
|
|
104
|
+
/** Glob patterns to exclude from the archive. */
|
|
105
|
+
exclude?: string[];
|
|
106
|
+
/** Where the produced zip is written inside the build archive. */
|
|
107
|
+
into: string;
|
|
108
|
+
}
|
|
109
|
+
export interface ZipPackageOutput {
|
|
110
|
+
/** Path of the produced zip inside the build archive. */
|
|
111
|
+
archivePath: string;
|
|
112
|
+
/** Content hash of the zip (for promote-by-digest style referencing). */
|
|
113
|
+
digest: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Package a directory into a zip artifact (e.g. a Lambda deployment package)
|
|
117
|
+
* inside the build archive, via the `zip` CLI through the injectable
|
|
118
|
+
* `ProcessRunner`. Removes any prior `into` first so the archive is rebuilt from
|
|
119
|
+
* scratch (not appended to), then returns its content digest for
|
|
120
|
+
* promote-by-digest referencing.
|
|
121
|
+
*/
|
|
122
|
+
export declare function createZipPackageCapability(processRunner?: ProcessRunner): Capability<ZipPackageInput, ZipPackageOutput>;
|
|
123
|
+
/** Default `zip-package` capability, backed by the real process runner. */
|
|
124
|
+
export declare const zipPackageCapability: Capability<ZipPackageInput, ZipPackageOutput>;
|
|
125
|
+
export interface JvmBuildInput {
|
|
126
|
+
/** Build tool driving the compile/package step. */
|
|
127
|
+
tool: "maven" | "gradle";
|
|
128
|
+
/** Project directory containing the build file. */
|
|
129
|
+
path: string;
|
|
130
|
+
/** Build tool goals/tasks to run. Default: tool-appropriate package goal. */
|
|
131
|
+
goals?: string[];
|
|
132
|
+
/** Where the produced jar is written inside the build archive. */
|
|
133
|
+
into: string;
|
|
134
|
+
}
|
|
135
|
+
export interface JvmBuildOutput {
|
|
136
|
+
/** Path of the produced jar inside the build archive. */
|
|
137
|
+
archivePath: string;
|
|
138
|
+
/** Content hash of the jar. */
|
|
139
|
+
digest: string;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Compile and package a JVM project (Maven or Gradle) into a jar in the build
|
|
143
|
+
* archive, via the build tool through the injectable `ProcessRunner`. Runs the
|
|
144
|
+
* package goal, copies the produced jar (skipping `-sources`/`-javadoc`
|
|
145
|
+
* classifiers) to `into`, and returns its content digest.
|
|
146
|
+
*/
|
|
147
|
+
export declare function createJvmBuildCapability(processRunner?: ProcessRunner): Capability<JvmBuildInput, JvmBuildOutput>;
|
|
148
|
+
/** Default `jvm-build` capability, backed by the real process runner. */
|
|
149
|
+
export declare const jvmBuildCapability: Capability<JvmBuildInput, JvmBuildOutput>;
|
|
150
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/build.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injectable cloud I/O boundary for the *agnostic* capability implementations
|
|
3
|
+
* that remain in core: the `docker` build/push client and the Neo4j bolt-port
|
|
4
|
+
* probe. Every capability here that talks to a real tool goes through a
|
|
5
|
+
* `CloudExecutor` instead of shelling out directly, so production code gets a
|
|
6
|
+
* real, `child_process`/`net`-backed executor and tests get a
|
|
7
|
+
* `MockCloudExecutor` (./__tests__/mock-cloud-executor.ts) that records calls
|
|
8
|
+
* and returns canned results — no live docker, ever, in a test run.
|
|
9
|
+
*
|
|
10
|
+
* The AWS-specific clients (CloudFormation, ECS, Lambda, EMR, CodeDeploy, SSM
|
|
11
|
+
* host, S3, CloudFront, snapshot, ECR) used to live here too. They now live in
|
|
12
|
+
* the aws lexicon (`@intentius/chant-lexicon-aws/components`), contributed
|
|
13
|
+
* through the capability-plugin seam — see docs/components/cloud-boundary. The
|
|
14
|
+
* `docker` client stays in core because it is genuinely cloud-agnostic and
|
|
15
|
+
* shared: `docker-build` (agnostic) uses it here, and the aws lexicon's
|
|
16
|
+
* `publish-image` reuses the exported `realDocker` rather than duplicating it.
|
|
17
|
+
*/
|
|
18
|
+
import { exec } from "node:child_process";
|
|
19
|
+
export declare const execFileAsync: typeof exec.__promisify__;
|
|
20
|
+
export interface DockerBuildArgs {
|
|
21
|
+
context: string;
|
|
22
|
+
dockerfile?: string;
|
|
23
|
+
buildArgs?: Record<string, string>;
|
|
24
|
+
target?: string;
|
|
25
|
+
/** Tag applied to the built image so it can be referenced by name (e.g. saved to a tarball). */
|
|
26
|
+
tag: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DockerSaveArgs {
|
|
29
|
+
/** Image reference to save (tag or digest). */
|
|
30
|
+
image: string;
|
|
31
|
+
/** Destination tarball path. */
|
|
32
|
+
outFile: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DockerLoadArgs {
|
|
35
|
+
/** Tarball path to load. */
|
|
36
|
+
inFile: string;
|
|
37
|
+
}
|
|
38
|
+
export interface DockerTagArgs {
|
|
39
|
+
source: string;
|
|
40
|
+
target: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DockerPushArgs {
|
|
43
|
+
/** Fully qualified image reference to push (registry/repo:tag). */
|
|
44
|
+
image: string;
|
|
45
|
+
}
|
|
46
|
+
export interface DockerClient {
|
|
47
|
+
/** Build an image from a Dockerfile; returns the built image's content digest. */
|
|
48
|
+
build(args: DockerBuildArgs): Promise<{
|
|
49
|
+
digest: string;
|
|
50
|
+
}>;
|
|
51
|
+
/** Save an image to an OCI/tarball archive on disk. */
|
|
52
|
+
save(args: DockerSaveArgs): Promise<void>;
|
|
53
|
+
/** Load an image tarball into the local docker store; returns the loaded image's digest. */
|
|
54
|
+
load(args: DockerLoadArgs): Promise<{
|
|
55
|
+
digest: string;
|
|
56
|
+
}>;
|
|
57
|
+
/** Tag a local image with an additional reference (e.g. before push). */
|
|
58
|
+
tag(args: DockerTagArgs): Promise<void>;
|
|
59
|
+
/** Push a tagged image to its registry; returns the pushed image's registry digest. */
|
|
60
|
+
push(args: DockerPushArgs): Promise<{
|
|
61
|
+
digest: string;
|
|
62
|
+
}>;
|
|
63
|
+
/** Inspect a remote image's manifest digest without pulling it (used to verify a promoted tag). */
|
|
64
|
+
remoteDigest(image: string): Promise<string>;
|
|
65
|
+
}
|
|
66
|
+
export interface Neo4jProbeArgs {
|
|
67
|
+
/** Cluster identifier — a comma-separated list of `host:port` bolt endpoints. */
|
|
68
|
+
cluster: string;
|
|
69
|
+
}
|
|
70
|
+
export interface Neo4jClusterClient {
|
|
71
|
+
/** Probe every member's bolt port; returns how many are reachable/healthy. */
|
|
72
|
+
probe(args: Neo4jProbeArgs): Promise<{
|
|
73
|
+
healthyCount: number;
|
|
74
|
+
total: number;
|
|
75
|
+
}>;
|
|
76
|
+
}
|
|
77
|
+
export interface CloudExecutor {
|
|
78
|
+
docker: DockerClient;
|
|
79
|
+
neo4j: Neo4jClusterClient;
|
|
80
|
+
}
|
|
81
|
+
export declare const realDocker: DockerClient;
|
|
82
|
+
/** Build a `CloudExecutor` that shells out to the real `docker` CLI and probes real bolt ports. Never used in tests. */
|
|
83
|
+
export declare function realCloudExecutor(): CloudExecutor;
|
|
84
|
+
/** The default `CloudExecutor` each capability factory falls back to when none is supplied. */
|
|
85
|
+
export declare function defaultCloudExecutor(): CloudExecutor;
|
|
86
|
+
/** Sleep for `ms`. Shared by every polling capability (`wait-*`) between attempts. */
|
|
87
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
88
|
+
//# sourceMappingURL=cloud-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-executor.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/cloud-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI1C,eAAO,MAAM,aAAa,2BAAkB,CAAC;AAI7C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,kFAAkF;IAClF,KAAK,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1D,uDAAuD;IACvD,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,4FAA4F;IAC5F,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,yEAAyE;IACzE,GAAG,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,uFAAuF;IACvF,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,mGAAmG;IACnG,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C;AAID,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,8EAA8E;IAC9E,KAAK,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/E;AAID,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAcD,eAAO,MAAM,UAAU,EAAE,YA+BxB,CAAC;AA6BF,wHAAwH;AACxH,wBAAgB,iBAAiB,IAAI,aAAa,CAEjD;AAKD,+FAA+F;AAC/F,wBAAgB,oBAAoB,IAAI,aAAa,CAGpD;AAED,sFAAsF;AACtF,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component-level BOM aggregation (#614, epic #551 follow-up to #613).
|
|
3
|
+
*
|
|
4
|
+
* A component may produce more than one leaf BOM: a software SBOM
|
|
5
|
+
* (./sbom.ts's `generate-sbom`, over an image/jar/zip/dir) for its built
|
|
6
|
+
* artifact, and/or an IaC config-BOM (./config-bom.ts's `extract-config-bom`)
|
|
7
|
+
* for its synthesized template. Each leaf BOM already validates as its own
|
|
8
|
+
* standalone SPDX/CycloneDX document (#613). This module composes every leaf
|
|
9
|
+
* BOM a component's build archive carries into **one** component-level BOM —
|
|
10
|
+
* a real assembly (CycloneDX `metadata.component` + nested `components` +
|
|
11
|
+
* `compositions` + `dependencies`, or SPDX `documentDescribes`-equivalent
|
|
12
|
+
* `CONTAINS`/`DEPENDS_ON` relationships), not a re-implementation of the
|
|
13
|
+
* writer: `aggregateComponentBom` below reads each leaf BOM's own structural
|
|
14
|
+
* inventory back out (it does not re-parse the leaf's serialized bytes) and
|
|
15
|
+
* hands the result to ./bom-writer.ts's `writeBom`, which gained
|
|
16
|
+
* `BomInput.subDocuments` support for exactly this purpose.
|
|
17
|
+
*
|
|
18
|
+
* **Why not just concatenate/parse the leaf documents' bytes.** The leaf BOM
|
|
19
|
+
* bytes are the source of truth for each artifact independently, but this
|
|
20
|
+
* module needs each leaf's package list as structured data to nest it
|
|
21
|
+
* correctly in the assembly — reparsing SPDX/CycloneDX JSON back into
|
|
22
|
+
* `BomPackage[]` would be a second, format-aware reader this codebase does
|
|
23
|
+
* not otherwise need. Callers therefore pass each leaf's already-known
|
|
24
|
+
* `BomPackage[]` (what `generate-sbom`/`extract-config-bom` built before
|
|
25
|
+
* calling `writeBom` themselves) plus the archive entry it produced — see
|
|
26
|
+
* `ComponentBomLeaf` below. A caller assembling a component's archive
|
|
27
|
+
* end-to-end has both on hand already; nothing here re-derives them from
|
|
28
|
+
* scratch.
|
|
29
|
+
*
|
|
30
|
+
* **Single-artifact = 1:1, multi-artifact = a real assembly.** A component
|
|
31
|
+
* with exactly one leaf BOM produces a component BOM whose only "assembly"
|
|
32
|
+
* is itself — see `aggregateComponentBom`'s single-leaf fast path, which
|
|
33
|
+
* still runs through the same writer and produces a valid document, just
|
|
34
|
+
* with an empty `subDocuments` composition (nothing to nest). A component
|
|
35
|
+
* with two or more leaves gets `subDocuments` populated, the real multi-leaf
|
|
36
|
+
* case #614 asks for.
|
|
37
|
+
*
|
|
38
|
+
* **Release-level rollup is out of scope here** (deferred per #614's note) —
|
|
39
|
+
* this module aggregates *within* one component's archive, never across
|
|
40
|
+
* components/releases.
|
|
41
|
+
*/
|
|
42
|
+
import type { BuildArchiveEntry, BuildArchiveManifest } from "./build-archive.js";
|
|
43
|
+
import { type BomPackage } from "./bom-writer.js";
|
|
44
|
+
import { type SbomDocument, type SbomFormat } from "./sbom-generator.js";
|
|
45
|
+
/**
|
|
46
|
+
* One leaf BOM a component produced, ready to fold into the component-level
|
|
47
|
+
* aggregate. `entry` is the `sbom`-kind `BuildArchiveEntry` `generate-sbom`/
|
|
48
|
+
* `extract-config-bom` already wrote into the manifest (carries `bomKind`,
|
|
49
|
+
* `subjectDigest`, `packageCount`, `generator`); `packages` is the same
|
|
50
|
+
* `BomPackage[]` that capability built before calling `writeBom` for its own
|
|
51
|
+
* standalone document.
|
|
52
|
+
*/
|
|
53
|
+
export interface ComponentBomLeaf {
|
|
54
|
+
/** The `sbom`-kind manifest entry this leaf corresponds to (see `findSbomForSubject`/`findConfigBomForSubject`, ./build-archive.ts). */
|
|
55
|
+
entry: BuildArchiveEntry;
|
|
56
|
+
/** The leaf's own enumerated packages/components/resources. */
|
|
57
|
+
packages: BomPackage[];
|
|
58
|
+
}
|
|
59
|
+
export interface AggregateComponentBomInput {
|
|
60
|
+
/** Component name — becomes the aggregate BOM's subject name. */
|
|
61
|
+
component: string;
|
|
62
|
+
/** The build archive manifest this component's leaves live in — used to derive a stable subject id from `manifestDigest` and to validate that every leaf's `entry` actually belongs to this manifest. */
|
|
63
|
+
manifest: BuildArchiveManifest;
|
|
64
|
+
/** Every leaf BOM to compose. Order is preserved in the resulting `subDocuments`/nested components. Must be non-empty — a component with no BOM to aggregate has nothing for this function to do (see module doc's "skips cleanly" convention elsewhere in this directory). */
|
|
65
|
+
leaves: ComponentBomLeaf[];
|
|
66
|
+
/** BOM format for the aggregate document. Defaults to `DEFAULT_SBOM_FORMAT` (SPDX), same precedence convention as every other BOM-producing capability in this directory. */
|
|
67
|
+
format?: SbomFormat;
|
|
68
|
+
/** Clock override for deterministic tests. */
|
|
69
|
+
now?: () => Date;
|
|
70
|
+
}
|
|
71
|
+
export interface AggregateComponentBomOutput {
|
|
72
|
+
/** The composed component-level BOM document. */
|
|
73
|
+
bom: SbomDocument;
|
|
74
|
+
/** Total package/component count across every leaf (the sum `chant components status` surfaces, see ../../lifecycle/build-ledger.ts). */
|
|
75
|
+
totalPackageCount: number;
|
|
76
|
+
/** How many leaf BOMs were composed — 1 for a single-artifact component (still a valid document, just with nothing to nest), 2+ for a real multi-artifact assembly. */
|
|
77
|
+
leafCount: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Compose a component's leaf BOMs (a software SBOM and/or an IaC config-BOM,
|
|
81
|
+
* per `input.leaves`) into one component-level BOM via ./bom-writer.ts's
|
|
82
|
+
* assembly support (`BomInput.subDocuments`). Pure — no I/O, no manifest
|
|
83
|
+
* mutation; the caller decides whether/where to write the result to disk
|
|
84
|
+
* (mirroring `extract-config-bom`'s `outDir` convention) and whether to fold
|
|
85
|
+
* it back into the archive as its own entry.
|
|
86
|
+
*
|
|
87
|
+
* Throws if `input.leaves` is empty — aggregation over zero leaves is a
|
|
88
|
+
* caller bug (compose only when at least one BOM exists), not a case this
|
|
89
|
+
* function silently no-ops on.
|
|
90
|
+
*/
|
|
91
|
+
export declare function aggregateComponentBom(input: AggregateComponentBomInput): AggregateComponentBomOutput;
|
|
92
|
+
/**
|
|
93
|
+
* Convenience for the common case: given a manifest that already carries
|
|
94
|
+
* `sbom`-kind entries (written by `generate-sbom`/`extract-config-bom`) and
|
|
95
|
+
* the `BomPackage[]` each one was built from (keyed by archive path, since
|
|
96
|
+
* that's the one stable identifier a caller has for "which leaf is this"),
|
|
97
|
+
* assemble the `ComponentBomLeaf[]` `aggregateComponentBom` expects. Kept
|
|
98
|
+
* separate from `aggregateComponentBom` itself so a caller that already has
|
|
99
|
+
* `ComponentBomLeaf[]` in hand (e.g. straight from the capabilities that just
|
|
100
|
+
* ran) can skip this lookup entirely.
|
|
101
|
+
*/
|
|
102
|
+
export declare function componentBomLeavesFromManifest(manifest: BuildArchiveManifest, packagesByPath: Map<string, BomPackage[]>): ComponentBomLeaf[];
|
|
103
|
+
//# sourceMappingURL=component-bom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-bom.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/component-bom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,OAAO,EAAY,KAAK,UAAU,EAAuB,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAuB,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI3F;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wIAAwI;IACxI,KAAK,EAAE,iBAAiB,CAAC;IACzB,+DAA+D;IAC/D,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B;IACzC,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,yMAAyM;IACzM,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,+QAA+Q;IAC/Q,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,6KAA6K;IAC7K,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,iDAAiD;IACjD,GAAG,EAAE,YAAY,CAAC;IAClB,yIAAyI;IACzI,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uKAAuK;IACvK,SAAS,EAAE,MAAM,CAAC;CACnB;AAKD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,2BAA2B,CA4DpG;AAUD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,oBAAoB,EAC9B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,GACxC,gBAAgB,EAAE,CAIpB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The starter verb set, grouped by family, per epic #551 and
|
|
3
|
+
* docs/components/capabilities.mdx. The pilot AWS leaves — `docker-build`,
|
|
4
|
+
* `publish-image`, `load-image-on-host`, `cfn-deploy`, `ecs-update-service`,
|
|
5
|
+
* `code-deploy`, `wait-for-stack`, `wait-steady-state`, `wait-cluster-healthy`
|
|
6
|
+
* — are real implementations over the injectable `CloudExecutor` (#557/#564,
|
|
7
|
+
* epic #551, see ./cloud-executor.ts); every other verb remains a typed stub
|
|
8
|
+
* (../capability.ts). `generate-sbom` (#606) is a real implementation over
|
|
9
|
+
* the injectable, artifact-type-keyed `SbomGenerator` (./sbom-generator.ts);
|
|
10
|
+
* `./lockfile-sbom-generator.ts` (#613) is a real, hermetic backend for it
|
|
11
|
+
* (lockfile/manifest parsing, no external tool), and `./tool-sbom-generator.ts`
|
|
12
|
+
* (#610) is a real, deep-scan backend for it (`syft`/`docker buildx --sbom`/
|
|
13
|
+
* `cyclonedx-maven`/`cdxgen`, shelling out through the injectable
|
|
14
|
+
* `ProcessRunner`, ./process-runner.ts). `extract-config-bom` (#613) parses a
|
|
15
|
+
* synthesized CloudFormation template, so it moved to the aws lexicon (#684);
|
|
16
|
+
* core keeps the agnostic SPDX/CycloneDX writer, ./bom-writer.ts, which both it
|
|
17
|
+
* and `generate-sbom` share. ./component-bom.ts
|
|
18
|
+
* (#614) composes a component's leaf BOMs into one component-level BOM over
|
|
19
|
+
* that same writer, and ./reproducibility.ts (#614) records per-artifact
|
|
20
|
+
* reproducibility + provenance on each `BuildArchiveEntry`. `publish-image`
|
|
21
|
+
* (#610) also gained a best-effort OCI-referrer attach step (`oras attach`,
|
|
22
|
+
* also via `ProcessRunner`) for a supplied SBOM/component BOM — see ./publish.ts.
|
|
23
|
+
* `sign`/`attest-provenance` (#622, ./sign.ts) are real implementations over
|
|
24
|
+
* the same injectable `ProcessRunner`: keyless-by-default `cosign sign`/
|
|
25
|
+
* `cosign attest` for signature + SLSA provenance, reusing #614's
|
|
26
|
+
* `ProvenanceLink` material. `verify` (#622, ./verify.ts) is the matching
|
|
27
|
+
* deploy-time gate — `cosign verify`/`verify-attestation` against a
|
|
28
|
+
* configured identity policy, mirroring ../../lint/policy.ts's `policyGate`.
|
|
29
|
+
*/
|
|
30
|
+
export * from "./build-archive.js";
|
|
31
|
+
export * from "./build.js";
|
|
32
|
+
export * from "./bom-writer.js";
|
|
33
|
+
export * from "./sbom-generator.js";
|
|
34
|
+
export * from "./sbom.js";
|
|
35
|
+
export * from "./lockfile-sbom-generator.js";
|
|
36
|
+
export * from "./tool-sbom-generator.js";
|
|
37
|
+
export * from "./component-bom.js";
|
|
38
|
+
export * from "./reproducibility.js";
|
|
39
|
+
export * from "./sign.js";
|
|
40
|
+
export * from "./verify.js";
|
|
41
|
+
export * from "./vuln-scan.js";
|
|
42
|
+
export * from "./vex.js";
|
|
43
|
+
export * from "./license-policy.js";
|
|
44
|
+
export * from "./vuln-gate.js";
|
|
45
|
+
export * from "./wait-verify.js";
|
|
46
|
+
export * from "./shell.js";
|
|
47
|
+
export * from "./cloud-executor.js";
|
|
48
|
+
export * from "./process-runner.js";
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/verbs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|