@empire-builder-kit/nx 1.0.0-rc.13 → 1.0.0-rc.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/executors.json +10 -0
  2. package/package.json +3 -3
  3. package/src/cli/output.js +1 -1
  4. package/src/developer-agent/model.js +4 -4
  5. package/src/developer-agent/model.js.map +1 -1
  6. package/src/developer-agent/operation-registry.js +53 -8
  7. package/src/developer-agent/operation-registry.js.map +1 -1
  8. package/src/developer-agent/planning.js +7 -9
  9. package/src/developer-agent/planning.js.map +1 -1
  10. package/src/developer-agent/workspace-inspection.js +12 -0
  11. package/src/developer-agent/workspace-inspection.js.map +1 -1
  12. package/src/executors/deployment-plan/deployment-plan.js +5 -0
  13. package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
  14. package/src/executors/foundation-preflight/foundation-preflight.d.ts +2 -0
  15. package/src/executors/foundation-preflight/foundation-preflight.js +6 -2
  16. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
  17. package/src/executors/foundation-preflight/schema.json +10 -0
  18. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +2 -0
  19. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +2 -1
  20. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
  21. package/src/executors/foundation-profile-preflight/schema.json +19 -3
  22. package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
  23. package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
  24. package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +229 -5
  25. package/src/executors/infrastructure-plan/infrastructure-plan.js +2298 -175
  26. package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
  27. package/src/executors/infrastructure-plan/schema.json +16 -0
  28. package/src/executors/local-deploy/fixtures/local-deploy-state-machine.mjs +53 -0
  29. package/src/executors/local-deploy/local-approval.d.ts +23 -0
  30. package/src/executors/local-deploy/local-approval.js +43 -0
  31. package/src/executors/local-deploy/local-approval.js.map +1 -0
  32. package/src/executors/local-deploy/local-deploy.d.ts +69 -0
  33. package/src/executors/local-deploy/local-deploy.js +911 -0
  34. package/src/executors/local-deploy/local-deploy.js.map +1 -0
  35. package/src/executors/local-deploy/schema.json +42 -0
  36. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +3 -0
  37. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +94 -0
  38. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -0
  39. package/src/executors/router-waf-rehearsal/schema.json +9 -0
  40. package/src/executors/secret-metadata/schema.json +5 -0
  41. package/src/executors/secret-metadata/secret-metadata.d.ts +12 -1
  42. package/src/executors/secret-metadata/secret-metadata.js +68 -16
  43. package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
  44. package/src/executors/sst-lifecycle/logging-preflight.d.ts +5 -0
  45. package/src/executors/sst-lifecycle/logging-preflight.js +23 -13
  46. package/src/executors/sst-lifecycle/logging-preflight.js.map +1 -1
  47. package/src/executors/sst-lifecycle/run-sst-command.d.ts +8 -1
  48. package/src/executors/sst-lifecycle/run-sst-command.js +144 -12
  49. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
  50. package/src/executors/sst-lifecycle/schema.json +13 -1
  51. package/src/executors/sst-lifecycle/sst-environment-source.d.ts +25 -0
  52. package/src/executors/sst-lifecycle/sst-environment-source.js +213 -0
  53. package/src/executors/sst-lifecycle/sst-environment-source.js.map +1 -0
  54. package/src/foundation/index.d.ts +2 -0
  55. package/src/foundation/index.js +2 -0
  56. package/src/foundation/index.js.map +1 -1
  57. package/src/foundation/logging-preflight.js +1 -1
  58. package/src/foundation/logging-preflight.js.map +1 -1
  59. package/src/foundation/logging.d.ts +3 -1
  60. package/src/foundation/logging.js +1 -1
  61. package/src/foundation/logging.js.map +1 -1
  62. package/src/foundation/partial-state.d.ts +10 -0
  63. package/src/foundation/partial-state.js +21 -0
  64. package/src/foundation/partial-state.js.map +1 -0
  65. package/src/foundation/router-waf.d.ts +98 -0
  66. package/src/foundation/router-waf.js +401 -0
  67. package/src/foundation/router-waf.js.map +1 -0
  68. package/src/generators/function/function.js +2 -1
  69. package/src/generators/function/function.js.map +1 -1
  70. package/src/generators/preset/generator.js +23 -3
  71. package/src/generators/preset/generator.js.map +1 -1
  72. package/src/generators/preset/schema.d.ts +7 -0
  73. package/src/generators/preset/schema.json +47 -0
  74. package/src/generators/preset/workspace-files-ci-acceptance.js +176 -36
  75. package/src/generators/preset/workspace-files-ci-acceptance.js.map +1 -1
  76. package/src/generators/preset/workspace-files-developer-agent.d.ts +2 -0
  77. package/src/generators/preset/workspace-files-developer-agent.js +25 -11
  78. package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
  79. package/src/generators/preset/workspace-files-foundation-workload-roles.js +5 -2
  80. package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +1 -1
  81. package/src/generators/preset/workspace-files-workload-role-baseline.js +254 -42
  82. package/src/generators/preset/workspace-files-workload-role-baseline.js.map +1 -1
  83. package/src/generators/preset/workspace-files.d.ts +5 -1
  84. package/src/generators/preset/workspace-files.js +788 -49
  85. package/src/generators/preset/workspace-files.js.map +1 -1
  86. package/src/generators/repository-policy/repository-policy.js +65 -3
  87. package/src/generators/repository-policy/repository-policy.js.map +1 -1
  88. package/src/generators/repository-policy/schema.d.ts +6 -0
  89. package/src/generators/repository-policy/schema.json +46 -0
  90. package/src/generators/slice/built-in-plan-api-files.js +2 -1
  91. package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
  92. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +18 -0
  93. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
  94. package/src/generators/slice/built-in-plan-data-files.js +16 -5
  95. package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
  96. package/src/generators/slice/built-in-plan-data-retention-job-files.js +6 -3
  97. package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +1 -1
  98. package/src/generators/slice/built-in-plan-database-lifecycle-files.js +21 -7
  99. package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -1
  100. package/src/generators/slice/built-in-plan-foundation-files.js +2 -3
  101. package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
  102. package/src/generators/slice/built-in-plan-infrastructure-files.js +359 -27
  103. package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
  104. package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +67 -11
  105. package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +1 -1
  106. package/src/generators/slice/built-in-plan-metadata-files.js +1 -0
  107. package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
  108. package/src/generators/slice/built-in-plan-operations-files.js +442 -5
  109. package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
  110. package/src/generators/slice/built-in-plan-performance-files.d.ts +2 -1
  111. package/src/generators/slice/built-in-plan-performance-files.js +34 -47
  112. package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
  113. package/src/generators/slice/built-in-plan-project-files.js +14 -2
  114. package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
  115. package/src/generators/slice/built-in-plan-release-files.js +119 -30
  116. package/src/generators/slice/built-in-plan-release-files.js.map +1 -1
  117. package/src/generators/slice/built-in-plan-web-files.js +13 -0
  118. package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
  119. package/src/generators/slice/built-in-plan-workload-role-files.js +5 -2
  120. package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
  121. package/src/generators/slice/built-in-plan.d.ts +2 -1
  122. package/src/generators/slice/built-in-plan.js +8 -5
  123. package/src/generators/slice/built-in-plan.js.map +1 -1
  124. package/src/generators/slice/slice.js +11 -3
  125. package/src/generators/slice/slice.js.map +1 -1
  126. package/src/generators/upgrade/upgrade.js +35 -0
  127. package/src/generators/upgrade/upgrade.js.map +1 -1
  128. package/src/generators/workload/workload.js +2 -2
  129. package/src/generators/workload/workload.js.map +1 -1
  130. package/src/git-policy/github-bootstrap.d.ts +3 -1
  131. package/src/git-policy/github-bootstrap.js +22 -5
  132. package/src/git-policy/github-bootstrap.js.map +1 -1
  133. package/src/infrastructure-change/local-capability.d.ts +73 -0
  134. package/src/infrastructure-change/local-capability.js +114 -0
  135. package/src/infrastructure-change/local-capability.js.map +1 -0
  136. package/src/infrastructure-change/model.d.ts +25 -4
  137. package/src/infrastructure-change/model.js +1 -0
  138. package/src/infrastructure-change/model.js.map +1 -1
  139. package/src/infrastructure-change/normalize.d.ts +4 -0
  140. package/src/infrastructure-change/normalize.js +47 -7
  141. package/src/infrastructure-change/normalize.js.map +1 -1
  142. package/src/infrastructure-change/plan.d.ts +30 -3
  143. package/src/infrastructure-change/plan.js +323 -13
  144. package/src/infrastructure-change/plan.js.map +1 -1
  145. package/src/infrastructure-change/risk.d.ts +3 -1
  146. package/src/infrastructure-change/risk.js +96 -16
  147. package/src/infrastructure-change/risk.js.map +1 -1
  148. package/src/local-dev/private-state.d.ts +2 -0
  149. package/src/local-dev/private-state.js +3 -1
  150. package/src/local-dev/private-state.js.map +1 -1
  151. package/src/performance/cost-controls.d.ts +5 -3
  152. package/src/performance/cost-controls.js +30 -24
  153. package/src/performance/cost-controls.js.map +1 -1
  154. package/src/performance/model.d.ts +1 -1
  155. package/src/performance/model.js +0 -2
  156. package/src/performance/model.js.map +1 -1
  157. package/src/performance/test-fixtures.js +0 -2
  158. package/src/performance/test-fixtures.js.map +1 -1
  159. package/src/release/source-authority.d.ts +1 -0
  160. package/src/release/source-authority.js +136 -9
  161. package/src/release/source-authority.js.map +1 -1
  162. package/src/repository-policy/deployment-plan.d.ts +4 -1
  163. package/src/repository-policy/deployment-plan.js +8 -0
  164. package/src/repository-policy/deployment-plan.js.map +1 -1
  165. package/src/repository-policy/foundation-profile.js +1 -2
  166. package/src/repository-policy/foundation-profile.js.map +1 -1
  167. package/src/repository-policy/policy.d.ts +25 -1
  168. package/src/repository-policy/policy.js +145 -4
  169. package/src/repository-policy/policy.js.map +1 -1
  170. package/src/schemas/performance-policy-v1.json +0 -2
  171. package/src/schemas/repository-policy-v1.json +41 -0
  172. package/src/secrets/operator.js +22 -4
  173. package/src/secrets/operator.js.map +1 -1
  174. package/src/secrets/verification.js +9 -1
  175. package/src/secrets/verification.js.map +1 -1
  176. package/src/sst-environment-source-format.d.ts +3 -0
  177. package/src/sst-environment-source-format.js +179 -0
  178. package/src/sst-environment-source-format.js.map +1 -0
  179. package/src/supply-chain/blueprint-verification-authority.js +55 -3
  180. package/src/supply-chain/blueprint-verification-authority.js.map +1 -1
  181. package/src/supply-chain/generated-command.js +1 -0
  182. package/src/supply-chain/generated-command.js.map +1 -1
  183. package/src/supply-chain/generated-container-release-command.js +187 -38
  184. package/src/supply-chain/generated-container-release-command.js.map +1 -1
  185. package/src/supply-chain/generated-ecr-collector-command.js +12 -2
  186. package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
  187. package/src/supply-chain/generated-scanner-command.js +1 -0
  188. package/src/supply-chain/generated-scanner-command.js.map +1 -1
  189. package/src/supply-chain/sbom.d.ts +1 -1
  190. package/src/supply-chain/sbom.js +30 -5
  191. package/src/supply-chain/sbom.js.map +1 -1
  192. package/src/workload-roles/account-baseline.d.ts +11 -0
  193. package/src/workload-roles/account-baseline.js +253 -16
  194. package/src/workload-roles/account-baseline.js.map +1 -1
  195. package/src/workload-roles/authority.d.ts +3 -1
  196. package/src/workload-roles/authority.js +48 -2
  197. package/src/workload-roles/authority.js.map +1 -1
  198. package/src/workload-roles/aws-s3-state.js +27 -0
  199. package/src/workload-roles/aws-s3-state.js.map +1 -1
  200. package/src/workload-roles/boundary.d.ts +2 -1
  201. package/src/workload-roles/boundary.js +9 -2
  202. package/src/workload-roles/boundary.js.map +1 -1
  203. package/src/workload-roles/handler.js +52 -24
  204. package/src/workload-roles/handler.js.map +1 -1
  205. package/src/workload-roles/injection.js +1 -1
  206. package/src/workload-roles/injection.js.map +1 -1
  207. package/src/workload-roles/provisioner.js +12 -4
  208. package/src/workload-roles/provisioner.js.map +1 -1
  209. package/src/workload-roles/registration.d.ts +1 -0
  210. package/src/workload-roles/registration.js +5 -0
  211. package/src/workload-roles/registration.js.map +1 -1
  212. package/src/workload-roles/stage-boundary.js +1 -1
  213. package/src/workload-roles/stage-boundary.js.map +1 -1
  214. package/src/workload-roles/standard-slice.js +1 -0
  215. package/src/workload-roles/standard-slice.js.map +1 -1
@@ -6,6 +6,16 @@ const generated_ecr_collector_command_js_1 = require("./generated-ecr-collector-
6
6
  const safe_reference_1 = require("@empire-builder-kit/runtime/safe-reference");
7
7
  exports.CRANE_VERSION = '0.21.7';
8
8
  exports.CRANE_RELEASES = Object.freeze({
9
+ 'darwin-arm64': {
10
+ archiveFormat: 'tar-gzip',
11
+ sha256: '1858c55dcd6053fe869bcb0c4ec20666383ddce445ad0f7e15e1e506b1f7fe52',
12
+ source: 'https://github.com/google/go-containerregistry/releases/download/v0.21.7/go-containerregistry_Darwin_arm64.tar.gz',
13
+ },
14
+ 'darwin-x64': {
15
+ archiveFormat: 'tar-gzip',
16
+ sha256: '63a7dd15168d4dcac37933c7f6745438f2943d5898a1cf7896ad3341d8519bf2',
17
+ source: 'https://github.com/google/go-containerregistry/releases/download/v0.21.7/go-containerregistry_Darwin_x86_64.tar.gz',
18
+ },
9
19
  'linux-arm64': {
10
20
  archiveFormat: 'tar-gzip',
11
21
  sha256: 'b6ee979d9411dfb05ce35ab9e156fe5de7def11a230764a7856ffa2eb971fa88',
@@ -19,7 +29,7 @@ exports.CRANE_RELEASES = Object.freeze({
19
29
  });
20
30
  function validatedReleases(releases) {
21
31
  if (Object.keys(releases).length === 0 ||
22
- Object.entries(releases).some(([platform, release]) => !/^linux-(?:arm64|x64)$/.test(platform) ||
32
+ Object.entries(releases).some(([platform, release]) => !/^(?:darwin|linux)-(?:arm64|x64)$/.test(platform) ||
23
33
  !['binary', 'tar-gzip'].includes(release.archiveFormat) ||
24
34
  !/^[a-f0-9]{64}$/.test(release.sha256) ||
25
35
  !/^https:\/\/github\.com\/anchore\/syft\/releases\/download\/v\d+\.\d+\.\d+\/[A-Za-z0-9._-]+$/.test(release.source))) {
@@ -29,10 +39,10 @@ function validatedReleases(releases) {
29
39
  }
30
40
  function validatedCraneReleases(releases) {
31
41
  if (Object.keys(releases).length === 0 ||
32
- Object.entries(releases).some(([platform, release]) => !/^linux-(?:arm64|x64)$/.test(platform) ||
42
+ Object.entries(releases).some(([platform, release]) => !/^(?:darwin|linux)-(?:arm64|x64)$/.test(platform) ||
33
43
  release.archiveFormat !== 'tar-gzip' ||
34
44
  !/^[a-f0-9]{64}$/.test(release.sha256) ||
35
- !/^https:\/\/github\.com\/google\/go-containerregistry\/releases\/download\/v\d+\.\d+\.\d+\/go-containerregistry_Linux_(?:arm64|x86_64)\.tar\.gz$/.test(release.source))) {
45
+ !/^https:\/\/github\.com\/google\/go-containerregistry\/releases\/download\/v\d+\.\d+\.\d+\/go-containerregistry_(?:Darwin|Linux)_(?:arm64|x86_64)\.tar\.gz$/.test(release.source))) {
36
46
  throw new Error('Container-release Crane assets must be exact official integrity-bound releases.');
37
47
  }
38
48
  return releases;
@@ -129,23 +139,82 @@ const sourceCommit =
129
139
  const stage = process.env.EBK_STAGE?.trim() ?? '';
130
140
  const accountId = process.env.AWS_EXPECTED_ACCOUNT_ID?.trim() ?? '';
131
141
  const region = process.env.AWS_REGION?.trim() ?? '';
132
- const runId = process.env.GITHUB_RUN_ID?.trim() ?? '';
133
- const runAttempt = process.env.GITHUB_RUN_ATTEMPT?.trim() ?? '';
134
- const workflow = process.env.GITHUB_WORKFLOW_REF?.trim() ?? '';
142
+ const packageRegistryInput =
143
+ process.env.EBK_CONTAINER_PACKAGE_REGISTRY?.trim() ?? '';
144
+ const localFederated =
145
+ process.env.GITHUB_ACTIONS !== 'true' &&
146
+ process.env.EBK_LOCAL_DEPLOYMENT_MODE === 'federated';
147
+ if (localFederated) {
148
+ const policy = JSON.parse(
149
+ readFileSync(join(repositoryRoot, 'ebk.repository-policy.json'), 'utf8'),
150
+ );
151
+ if (
152
+ policy.deploymentProfile !== 'starter' ||
153
+ stage === 'production' ||
154
+ policy.deploymentAccounts?.[stage] !== accountId ||
155
+ policy.deploymentRegion !== region
156
+ ) {
157
+ throw new Error(
158
+ 'Local container release requires a locally admitted exact starter deployment target; production requires protected GitHub authority.',
159
+ );
160
+ }
161
+ }
162
+ const runId = localFederated
163
+ ? (BigInt('0x' + sourceCommit.slice(0, 15)) + 1n).toString()
164
+ : process.env.GITHUB_RUN_ID?.trim() ?? '';
165
+ const runAttempt = localFederated
166
+ ? '1'
167
+ : process.env.GITHUB_RUN_ATTEMPT?.trim() ?? '';
168
+ const workflow = localFederated
169
+ ? 'local-federated/' + stage + '/' + accountId + '/' + region
170
+ : process.env.GITHUB_WORKFLOW_REF?.trim() ?? '';
135
171
  if (
136
172
  !COMMIT.test(deploymentSourceCommit) ||
137
173
  !COMMIT.test(sourceCommit) ||
138
174
  !['development', 'staging', 'production'].includes(stage) ||
139
175
  !/^\\d{12}$/.test(accountId) ||
140
176
  !AWS_REGION_NAME.test(region) ||
177
+ (!localFederated && process.env.GITHUB_ACTIONS !== 'true') ||
141
178
  !/^[1-9]\\d*$/.test(runId) ||
142
179
  !/^[1-9]\\d*$/.test(runAttempt) ||
143
180
  !REFERENCE.test(workflow)
144
181
  ) {
145
182
  throw new Error(
146
- 'Container release requires one exact protected source, run, account, Region, and stage.',
183
+ 'Container release requires one exact GitHub or local-federated source, run, account, Region, and stage.',
147
184
  );
148
185
  }
186
+ const packageRegistry = (() => {
187
+ if (packageRegistryInput === '') return undefined;
188
+ if (packageRegistryInput.length > 2_048) {
189
+ throw new Error('Container package registry authority is invalid.');
190
+ }
191
+ let parsed;
192
+ try {
193
+ parsed = new URL(packageRegistryInput);
194
+ } catch {
195
+ throw new Error('Container package registry authority is invalid.');
196
+ }
197
+ const normalized = parsed.href;
198
+ const canonicalInput =
199
+ packageRegistryInput === normalized ||
200
+ packageRegistryInput + '/' === normalized;
201
+ const localPlaintext =
202
+ parsed.protocol === 'http:' &&
203
+ ['127.0.0.1', 'localhost', 'host.docker.internal', '[::1]'].includes(
204
+ parsed.hostname,
205
+ );
206
+ if (
207
+ !canonicalInput ||
208
+ (parsed.protocol !== 'https:' && !localPlaintext) ||
209
+ parsed.username !== '' ||
210
+ parsed.password !== '' ||
211
+ parsed.search !== '' ||
212
+ parsed.hash !== ''
213
+ ) {
214
+ throw new Error('Container package registry authority is invalid.');
215
+ }
216
+ return normalized.endsWith('/') ? normalized.slice(0, -1) : normalized;
217
+ })();
149
218
  const requireReviewedCheckout = () => {
150
219
  validateReviewedReleaseCheckout({
151
220
  deploymentSourceCommit,
@@ -332,11 +401,12 @@ const describeRepository = (repositoryName) => {
332
401
  throw new Error('ECR repository lookup returned invalid JSON.');
333
402
  }
334
403
  }
335
- const error = String(result.stderr ?? '');
404
+ const error = String(result.stderr ?? '').trimStart();
405
+ const notFound =
406
+ 'An error occurred (RepositoryNotFoundException) when calling the DescribeRepositories operation:';
336
407
  if (
337
- !error.startsWith(
338
- 'An error occurred (RepositoryNotFoundException) when calling the DescribeRepositories operation:',
339
- )
408
+ !error.startsWith(notFound) &&
409
+ !error.startsWith('aws: [ERROR]: ' + notFound)
340
410
  ) {
341
411
  throw new Error('ECR repository lookup failed outside the create-if-absent path.');
342
412
  }
@@ -792,7 +862,7 @@ const acquireCrane = async () => {
792
862
  const parseCycloneDx = (value, label) => {
793
863
  if (
794
864
  value?.bomFormat !== 'CycloneDX' ||
795
- value.specVersion !== '1.6' ||
865
+ value.specVersion !== '1.7' ||
796
866
  value.version !== 1 ||
797
867
  !/^urn:uuid:[a-fA-F0-9-]{36}$/.test(value.serialNumber ?? '') ||
798
868
  !Array.isArray(value.components) ||
@@ -801,17 +871,30 @@ const parseCycloneDx = (value, label) => {
801
871
  !value.metadata ||
802
872
  typeof value.metadata !== 'object'
803
873
  ) {
804
- throw new Error(label + ' is not complete CycloneDX 1.6.');
874
+ throw new Error(label + ' is not complete CycloneDX 1.7.');
805
875
  }
806
876
  return value;
807
877
  };
878
+ const isVersionlessSyftFileComponent = (component) =>
879
+ component?.type === 'file' &&
880
+ component.version === undefined &&
881
+ component.purl === undefined &&
882
+ typeof component.name === 'string' &&
883
+ component.name.startsWith('/') &&
884
+ component.name.length <= 4_096 &&
885
+ Array.isArray(component.hashes) &&
886
+ component.hashes.length === 2 &&
887
+ component.hashes[0]?.alg === 'SHA-1' &&
888
+ /^[a-f0-9]{40}$/.test(component.hashes[0]?.content ?? '') &&
889
+ component.hashes[1]?.alg === 'SHA-256' &&
890
+ /^[a-f0-9]{64}$/.test(component.hashes[1]?.content ?? '');
808
891
  const componentSetFor = (sbom) =>
809
892
  sbom.components
810
893
  .map((component) => ({
811
894
  name: component?.name,
812
895
  purl: component?.purl ?? '',
813
896
  type: component?.type,
814
- version: component?.version,
897
+ version: component?.version ?? '',
815
898
  }))
816
899
  .sort((left, right) =>
817
900
  JSON.stringify(left) < JSON.stringify(right)
@@ -881,8 +964,12 @@ const deriveExpectedProductionClosure = (syft, input) => {
881
964
  execute(
882
965
  'pnpm',
883
966
  [
967
+ '--config.store-dir=' +
968
+ safePath('.ebk/cache/pnpm-store', 'Workspace pnpm store'),
969
+ '--config.inject-workspace-packages=true',
884
970
  '--filter',
885
971
  input.packageName,
972
+ '--trust-lockfile',
886
973
  'deploy',
887
974
  '--prod',
888
975
  '--offline',
@@ -906,18 +993,51 @@ const deriveExpectedProductionClosure = (syft, input) => {
906
993
  } catch {
907
994
  throw new Error('Independent production closure inventory is invalid JSON.');
908
995
  }
996
+ const sourceManifest = readJson(
997
+ input.packageManifestPath,
998
+ 'Container package manifest',
999
+ );
1000
+ const deployedManifest = readJson(
1001
+ join(deployed, 'package.json'),
1002
+ 'Deployed container package manifest',
1003
+ );
1004
+ if (
1005
+ sourceManifest.name !== input.packageName ||
1006
+ typeof sourceManifest.version !== 'string' ||
1007
+ sourceManifest.version.length === 0 ||
1008
+ sourceManifest.version.length > 128 ||
1009
+ deployedManifest.name !== sourceManifest.name ||
1010
+ deployedManifest.version !== sourceManifest.version
1011
+ ) {
1012
+ throw new Error(
1013
+ 'Independent production closure changed the workload package identity.',
1014
+ );
1015
+ }
909
1016
  const packages = npmClosureFor(inventory);
910
1017
  if (
911
- !packages.some(
1018
+ packages.some(
912
1019
  ({ name, version }) =>
913
- name === input.packageName &&
914
- version === readJson(
915
- input.packageManifestPath,
916
- 'Container package manifest',
917
- ).version,
1020
+ name === sourceManifest.name && version !== sourceManifest.version,
918
1021
  )
919
1022
  ) {
920
- throw new Error('Independent production closure omits the workload package.');
1023
+ throw new Error(
1024
+ 'Independent production closure contains a conflicting workload package identity.',
1025
+ );
1026
+ }
1027
+ if (!packages.some(({ name }) => name === sourceManifest.name)) {
1028
+ packages.push({
1029
+ name: sourceManifest.name,
1030
+ version: sourceManifest.version,
1031
+ });
1032
+ packages.sort(
1033
+ (left, right) =>
1034
+ (left.name < right.name ? -1 : left.name > right.name ? 1 : 0) ||
1035
+ (left.version < right.version
1036
+ ? -1
1037
+ : left.version > right.version
1038
+ ? 1
1039
+ : 0),
1040
+ );
921
1041
  }
922
1042
  return { digest: supplyChainDigest(packages), packages };
923
1043
  } finally {
@@ -1210,13 +1330,26 @@ if (stage === 'development') {
1210
1330
  process.env.EBK_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID?.trim() ?? '';
1211
1331
  const expectedSourceRegion =
1212
1332
  process.env.EBK_STAGING_PROMOTION_REGION?.trim() ?? '';
1333
+ const deploymentProfile = process.env.EBK_DEPLOYMENT_PROFILE?.trim() ?? '';
1334
+ if (
1335
+ deploymentProfile !== 'starter' &&
1336
+ deploymentProfile !== 'production-isolated' &&
1337
+ deploymentProfile !== 'fully-isolated'
1338
+ ) {
1339
+ throw new Error('Container promotion requires one exact deployment profile.');
1340
+ }
1341
+ const sameAccountPromotion = deploymentProfile === 'starter';
1213
1342
  if (
1214
1343
  !/^\\d{12}$/.test(expectedSourceAccountId) ||
1215
1344
  !AWS_REGION_NAME.test(expectedSourceRegion) ||
1216
- expectedSourceAccountId === accountId
1345
+ (sameAccountPromotion
1346
+ ? expectedSourceAccountId !== accountId || expectedSourceRegion !== region
1347
+ : expectedSourceAccountId === accountId)
1217
1348
  ) {
1218
1349
  throw new Error(
1219
- 'Development retirement promotion requires one independent staging account and Region.',
1350
+ sameAccountPromotion
1351
+ ? 'Starter promotion requires the exact shared account and Region.'
1352
+ : 'Isolated promotion requires one independent staging account and exact Region.',
1220
1353
  );
1221
1354
  }
1222
1355
  const sourceBindingPath = safePath(
@@ -1310,13 +1443,26 @@ if (mode === 'promote') {
1310
1443
  process.env.EBK_STAGING_PROMOTION_EXPECTED_ACCOUNT_ID?.trim() ?? '';
1311
1444
  const expectedSourceRegion =
1312
1445
  process.env.EBK_STAGING_PROMOTION_REGION?.trim() ?? '';
1446
+ const deploymentProfile = process.env.EBK_DEPLOYMENT_PROFILE?.trim() ?? '';
1447
+ if (
1448
+ deploymentProfile !== 'starter' &&
1449
+ deploymentProfile !== 'production-isolated' &&
1450
+ deploymentProfile !== 'fully-isolated'
1451
+ ) {
1452
+ throw new Error('OCI promotion requires one exact deployment profile.');
1453
+ }
1454
+ const sameAccountPromotion = deploymentProfile === 'starter';
1313
1455
  if (
1314
1456
  !/^\\d{12}$/.test(expectedSourceAccountId) ||
1315
1457
  !AWS_REGION_NAME.test(expectedSourceRegion) ||
1316
- expectedSourceAccountId === accountId
1458
+ (sameAccountPromotion
1459
+ ? expectedSourceAccountId !== accountId || expectedSourceRegion !== region
1460
+ : expectedSourceAccountId === accountId)
1317
1461
  ) {
1318
1462
  throw new Error(
1319
- 'OCI promotion requires one bounded independent staging account and Region.',
1463
+ sameAccountPromotion
1464
+ ? 'Starter OCI promotion requires the exact shared account and Region.'
1465
+ : 'Isolated OCI promotion requires one bounded independent staging account and exact Region.',
1320
1466
  );
1321
1467
  }
1322
1468
  const sourceBindingInput =
@@ -1591,15 +1737,6 @@ if (mode === 'promote') {
1591
1737
  }
1592
1738
 
1593
1739
  if (mode === 'platform') {
1594
- const nativeArchitecture = process.arch === 'x64' ? 'amd64' : process.arch;
1595
- if (
1596
- process.platform !== 'linux' ||
1597
- requestedPlatform !== 'linux/' + nativeArchitecture
1598
- ) {
1599
- throw new Error(
1600
- 'Platform evidence must run on the matching native Linux architecture.',
1601
- );
1602
- }
1603
1740
  const syft = await acquireSyft();
1604
1741
  const crane = stage === 'development' ? await acquireCrane() : undefined;
1605
1742
  try {
@@ -1656,6 +1793,12 @@ if (mode === 'platform') {
1656
1793
  [
1657
1794
  'buildx',
1658
1795
  'build',
1796
+ ...(packageRegistry
1797
+ ? [
1798
+ '--build-arg',
1799
+ 'NPM_CONFIG_REGISTRY=' + packageRegistry,
1800
+ ]
1801
+ : []),
1659
1802
  '--file',
1660
1803
  relative(repositoryRoot, input.dockerfile),
1661
1804
  '--label',
@@ -1796,14 +1939,20 @@ if (mode === 'platform') {
1796
1939
  }
1797
1940
  const componentSet = componentSetFor(sbom);
1798
1941
  if (
1799
- componentSet.some(
1942
+ sbom.components.some(
1800
1943
  (component) =>
1801
- typeof component.name !== 'string' ||
1944
+ typeof component?.name !== 'string' ||
1945
+ component.name.length === 0 ||
1802
1946
  typeof component.type !== 'string' ||
1803
- typeof component.version !== 'string',
1947
+ component.type.length === 0 ||
1948
+ !(
1949
+ (typeof component.version === 'string' &&
1950
+ component.version.length > 0) ||
1951
+ isVersionlessSyftFileComponent(component)
1952
+ ),
1804
1953
  )
1805
1954
  ) {
1806
- throw new Error('Platform SBOM contains invalid or development components.');
1955
+ throw new Error('Platform SBOM contains an invalid component identity.');
1807
1956
  }
1808
1957
  const serializedSbom = JSON.stringify(sbom, null, 2) + '\\n';
1809
1958
  const relativeSbomPath =
@@ -1 +1 @@
1
- {"version":3,"file":"generated-container-release-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-container-release-command.ts"],"names":[],"mappings":";;;AA8EA,sEAihEC;AA/lED,6FAI8C;AAC9C,+EAAwF;AAE3E,QAAA,aAAa,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA08D1E,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"generated-container-release-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-container-release-command.ts"],"names":[],"mappings":";;;AA4FA,sEA4pEC;AAxvED,6FAI8C;AAC9C,+EAAwF;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqlE1E,CAAC;AACF,CAAC"}
@@ -6,6 +6,16 @@ const common_js_1 = require("./common.js");
6
6
  const safe_reference_1 = require("@empire-builder-kit/runtime/safe-reference");
7
7
  exports.SYFT_VERSION = '1.50.0';
8
8
  exports.SYFT_COLLECTOR_RELEASES = Object.freeze({
9
+ 'darwin-arm64': {
10
+ archiveFormat: 'tar-gzip',
11
+ sha256: 'e32fdb9d47823fa633748a1efca2528fd77c37469ea93c9e40ab835da44e4cce',
12
+ source: 'https://github.com/anchore/syft/releases/download/v1.50.0/syft_1.50.0_darwin_arm64.tar.gz',
13
+ },
14
+ 'darwin-x64': {
15
+ archiveFormat: 'tar-gzip',
16
+ sha256: 'd11a8c7bc27114853bd7c1e1b2f3be3ddda3a1de17aee585329f04c369341c75',
17
+ source: 'https://github.com/anchore/syft/releases/download/v1.50.0/syft_1.50.0_darwin_amd64.tar.gz',
18
+ },
9
19
  'linux-arm64': {
10
20
  archiveFormat: 'tar-gzip',
11
21
  sha256: '887c57cbcc2d0e8c5c110a4571a3fc7150058b24d74f993ee4663516e5c8ce86',
@@ -934,7 +944,7 @@ try {
934
944
  }
935
945
  if (
936
946
  sbom?.bomFormat !== 'CycloneDX' ||
937
- sbom.specVersion !== '1.6' ||
947
+ sbom.specVersion !== '1.7' ||
938
948
  sbom.version !== 1 ||
939
949
  typeof sbom.serialNumber !== 'string' ||
940
950
  !/^urn:uuid:[a-fA-F0-9-]{36}$/.test(sbom.serialNumber) ||
@@ -945,7 +955,7 @@ try {
945
955
  typeof sbom.metadata !== 'object'
946
956
  ) {
947
957
  throw new Error(
948
- 'Syft output is not complete CycloneDX 1.6 evidence for ' +
958
+ 'Syft output is not complete CycloneDX 1.7 evidence for ' +
949
959
  platform.platform + '.',
950
960
  );
951
961
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generated-ecr-collector-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-ecr-collector-command.ts"],"names":[],"mappings":";;;AA0DA,gFAuyCC;AAj2CD,2CAAkD;AAClD,+EAAwF;AAE3E,QAAA,YAAY,GAAG,QAAiB,CAAC;AAQjC,QAAA,uBAAuB,GAEhC,MAAM,CAAC,MAAM,CAAC;IAChB,aAAa,EAAE;QACb,aAAa,EAAE,UAAU;QACzB,MAAM,EAAE,kEAAkE;QAC1E,MAAM,EACJ,0FAA0F;KAC7F;IACD,WAAW,EAAE;QACX,aAAa,EAAE,UAAU;QACzB,MAAM,EAAE,kEAAkE;QAC1E,MAAM,EACJ,0FAA0F;KAC7F;CACF,CAAC,CAAC;AAEH,SAAS,iBAAiB,CACxB,QAAwD;IAExD,IACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC;QAClC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAC3B,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE,CACtB,CAAC,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC3C,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC;YACvD,CAAC,+BAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACzC,CAAC,6FAA6F,CAAC,IAAI,CACjG,OAAO,CAAC,MAAM,CACf,CACJ,EACD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,kCAAkC,CAChD,UAKI,EAAE;IAEN,MAAM,eAAe,GACnB,OAAO,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyuCF,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"generated-ecr-collector-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-ecr-collector-command.ts"],"names":[],"mappings":";;;AAsEA,gFAuyCC;AA72CD,2CAAkD;AAClD,+EAAwF;AAE3E,QAAA,YAAY,GAAG,QAAiB,CAAC;AAQjC,QAAA,uBAAuB,GA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyuCF,CAAC;AACF,CAAC"}
@@ -271,6 +271,7 @@ const ignoredDirectories = new Set([
271
271
  '.nx',
272
272
  '.open-next',
273
273
  '.sst',
274
+ '.venv',
274
275
  'coverage',
275
276
  'dist',
276
277
  'node_modules',
@@ -1 +1 @@
1
- {"version":3,"file":"generated-scanner-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-scanner-command.ts"],"names":[],"mappings":";;AAAA,0EAowBC;AApwBD,SAAgB,+BAA+B;IAC7C,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkwBlB,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"generated-scanner-command.js","sourceRoot":"","sources":["../../../../../packages/nx/src/supply-chain/generated-scanner-command.ts"],"names":[],"mappings":";;AAAA,0EAqwBC;AArwBD,SAAgB,+BAA+B;IAC7C,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmwBlB,CAAC;AACF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { SupplyChainInventory } from './inventory.js';
2
- export declare const CYCLONEDX_SPEC_VERSION: "1.6";
2
+ export declare const CYCLONEDX_SPEC_VERSION: "1.7";
3
3
  export declare const SUPPLY_CHAIN_SBOM_SCHEMA_VERSION: 1;
4
4
  export declare const SUPPLY_CHAIN_RELEASE_BINDING_KIND: "ebk-supply-chain-release-binding";
5
5
  export declare const CYCLONEDX_INVENTORY_SCOPES: readonly ["source-build-inputs", "build-output-contents", "deployable-bundle-contents", "final-oci-contents"];
@@ -12,7 +12,7 @@ const validation_js_1 = require("../validation.js");
12
12
  const common_js_1 = require("./common.js");
13
13
  const errors_js_1 = require("./errors.js");
14
14
  const license_expression_js_1 = require("./license-expression.js");
15
- exports.CYCLONEDX_SPEC_VERSION = '1.6';
15
+ exports.CYCLONEDX_SPEC_VERSION = '1.7';
16
16
  exports.SUPPLY_CHAIN_SBOM_SCHEMA_VERSION = 1;
17
17
  exports.SUPPLY_CHAIN_RELEASE_BINDING_KIND = 'ebk-supply-chain-release-binding';
18
18
  exports.CYCLONEDX_INVENTORY_SCOPES = [
@@ -181,6 +181,29 @@ function uuidFromDigest(digest) {
181
181
  function canonicalClone(value) {
182
182
  return JSON.parse((0, common_js_1.canonicalizeSupplyChainValue)(value));
183
183
  }
184
+ function isVersionlessSyftFileComponent(candidate) {
185
+ const hashes = candidate.hashes;
186
+ if (candidate.type !== 'file' ||
187
+ candidate.version !== undefined ||
188
+ candidate.purl !== undefined ||
189
+ typeof candidate.name !== 'string' ||
190
+ !candidate.name.startsWith('/') ||
191
+ candidate.name.length > 4_096 ||
192
+ !Array.isArray(hashes) ||
193
+ hashes.length !== 2) {
194
+ return false;
195
+ }
196
+ const sha1 = hashes[0];
197
+ const sha256 = hashes[1];
198
+ return ((0, validation_js_1.isRecord)(sha1) &&
199
+ sha1.alg === 'SHA-1' &&
200
+ typeof sha1.content === 'string' &&
201
+ /^[a-f0-9]{40}$/.test(sha1.content) &&
202
+ (0, validation_js_1.isRecord)(sha256) &&
203
+ sha256.alg === 'SHA-256' &&
204
+ typeof sha256.content === 'string' &&
205
+ common_js_1.SUPPLY_CHAIN_SHA256.test(sha256.content));
206
+ }
184
207
  /**
185
208
  * Create one deterministic CycloneDX inventory for a multi-architecture OCI
186
209
  * index from the independently scanned child manifests.
@@ -244,7 +267,7 @@ function createCycloneDxPlatformSbomUnion(input) {
244
267
  sbom.components.length === 0 ||
245
268
  !Array.isArray(sbom.dependencies) ||
246
269
  !(0, validation_js_1.isRecord)(sbom.metadata)) {
247
- throw new errors_js_1.SupplyChainError('supply-chain-sbom-invalid', path, 'must be complete CycloneDX 1.6 child-manifest evidence');
270
+ throw new errors_js_1.SupplyChainError('supply-chain-sbom-invalid', path, 'must be complete CycloneDX 1.7 child-manifest evidence');
248
271
  }
249
272
  const seenChildRefs = new Set();
250
273
  const npmComponents = [];
@@ -263,8 +286,9 @@ function createCycloneDxPlatformSbomUnion(input) {
263
286
  candidate.name.length === 0 ||
264
287
  typeof candidate.type !== 'string' ||
265
288
  candidate.type.length === 0 ||
266
- typeof candidate.version !== 'string' ||
267
- candidate.version.length === 0) {
289
+ !((typeof candidate.version === 'string' &&
290
+ candidate.version.length > 0) ||
291
+ isVersionlessSyftFileComponent(candidate))) {
268
292
  throw new errors_js_1.SupplyChainError('supply-chain-sbom-invalid', `${path}.components[${componentIndex}]`, 'must have one unique bounded component identity');
269
293
  }
270
294
  seenChildRefs.add(ref);
@@ -277,7 +301,8 @@ function createCycloneDxPlatformSbomUnion(input) {
277
301
  }
278
302
  componentByRef.set(ref, component);
279
303
  if (typeof candidate.purl === 'string' &&
280
- candidate.purl.startsWith('pkg:npm/')) {
304
+ candidate.purl.startsWith('pkg:npm/') &&
305
+ typeof candidate.version === 'string') {
281
306
  npmComponents.push({
282
307
  name: candidate.name,
283
308
  purl: candidate.purl,