@empire-builder-kit/nx 1.0.0-rc.30 → 1.0.0-rc.31

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 (261) hide show
  1. package/executors.json +8 -3
  2. package/package.json +10 -7
  3. package/src/aws/child-environment.d.ts +10 -0
  4. package/src/aws/child-environment.js +77 -0
  5. package/src/aws/child-environment.js.map +1 -0
  6. package/src/aws/identity.d.ts +13 -0
  7. package/src/aws/identity.js +41 -0
  8. package/src/aws/identity.js.map +1 -0
  9. package/src/aws-authority/index.d.ts +1 -0
  10. package/src/aws-authority/index.js +5 -0
  11. package/src/aws-authority/index.js.map +1 -0
  12. package/src/aws-authority/stage-authority.d.ts +238 -0
  13. package/src/aws-authority/stage-authority.js +2836 -0
  14. package/src/aws-authority/stage-authority.js.map +1 -0
  15. package/src/developer-agent/generator-planning.js +4 -4
  16. package/src/developer-agent/generator-planning.js.map +1 -1
  17. package/src/developer-agent/operation-registry.js +14 -6
  18. package/src/developer-agent/operation-registry.js.map +1 -1
  19. package/src/executors/deployment-plan/deployment-plan.js +1 -1
  20. package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
  21. package/src/executors/foundation-preflight/foundation-preflight.d.ts +0 -1
  22. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
  23. package/src/executors/foundation-preflight/schema.json +0 -5
  24. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +12 -3
  25. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +95 -32
  26. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
  27. package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +64 -0
  28. package/src/executors/foundation-profile-preflight/production-database-safeguard.js +221 -0
  29. package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +1 -0
  30. package/src/executors/foundation-profile-preflight/schema.json +1 -6
  31. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +11 -1
  32. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +44 -21
  33. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -1
  34. package/src/executors/foundation-remove-preflight/schema.json +6 -1
  35. package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +25 -369
  36. package/src/executors/infrastructure-plan/infrastructure-plan.js +222 -5472
  37. package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
  38. package/src/executors/infrastructure-plan/schema.json +8 -64
  39. package/src/executors/local-deploy/federated-credential-transport.d.ts +48 -0
  40. package/src/executors/local-deploy/federated-credential-transport.js +252 -0
  41. package/src/executors/local-deploy/federated-credential-transport.js.map +1 -0
  42. package/src/executors/local-deploy/local-approval.d.ts +4 -9
  43. package/src/executors/local-deploy/local-approval.js +3 -7
  44. package/src/executors/local-deploy/local-approval.js.map +1 -1
  45. package/src/executors/local-deploy/local-deploy.d.ts +58 -43
  46. package/src/executors/local-deploy/local-deploy.js +938 -804
  47. package/src/executors/local-deploy/local-deploy.js.map +1 -1
  48. package/src/executors/local-deploy/schema.json +3 -20
  49. package/src/executors/refresh/refresh.js +2 -2
  50. package/src/executors/refresh/refresh.js.map +1 -1
  51. package/src/executors/remove/remove.js +2 -2
  52. package/src/executors/remove/remove.js.map +1 -1
  53. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +25 -1
  54. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +905 -22
  55. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
  56. package/src/executors/router-waf-rehearsal/schema.json +17 -2
  57. package/src/executors/secret-initialize/schema.json +42 -0
  58. package/src/executors/secret-initialize/secret-initialize.d.ts +30 -0
  59. package/src/executors/secret-initialize/secret-initialize.js +229 -0
  60. package/src/executors/secret-initialize/secret-initialize.js.map +1 -0
  61. package/src/executors/secret-metadata/secret-metadata.d.ts +2 -1
  62. package/src/executors/secret-metadata/secret-metadata.js +62 -29
  63. package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
  64. package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +53 -0
  65. package/src/executors/sst-lifecycle/generated-secret-retirement.js +192 -0
  66. package/src/executors/sst-lifecycle/generated-secret-retirement.js.map +1 -0
  67. package/src/executors/sst-lifecycle/governed-native-operation.d.ts +46 -0
  68. package/src/executors/sst-lifecycle/governed-native-operation.js +153 -0
  69. package/src/executors/sst-lifecycle/governed-native-operation.js.map +1 -0
  70. package/src/executors/sst-lifecycle/run-sst-command.d.ts +25 -7
  71. package/src/executors/sst-lifecycle/run-sst-command.js +459 -89
  72. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
  73. package/src/executors/sst-lifecycle/schema.json +0 -5
  74. package/src/executors/sst-lifecycle/secret-preflight.d.ts +2 -0
  75. package/src/executors/sst-lifecycle/secret-preflight.js +13 -7
  76. package/src/executors/sst-lifecycle/secret-preflight.js.map +1 -1
  77. package/src/executors/unlock/unlock.js +2 -2
  78. package/src/executors/unlock/unlock.js.map +1 -1
  79. package/src/foundation/router-waf-rate-rehearsal.d.ts +97 -0
  80. package/src/foundation/router-waf-rate-rehearsal.js +210 -0
  81. package/src/foundation/router-waf-rate-rehearsal.js.map +1 -0
  82. package/src/foundation/router-waf.d.ts +59 -9
  83. package/src/foundation/router-waf.js +427 -32
  84. package/src/foundation/router-waf.js.map +1 -1
  85. package/src/foundation/stages.d.ts +1 -0
  86. package/src/foundation/stages.js +11 -0
  87. package/src/foundation/stages.js.map +1 -1
  88. package/src/generators/formatting.d.ts +8 -0
  89. package/src/generators/formatting.js +118 -0
  90. package/src/generators/formatting.js.map +1 -0
  91. package/src/generators/function/function.js +37 -17
  92. package/src/generators/function/function.js.map +1 -1
  93. package/src/generators/post-generation-install.js +2 -2
  94. package/src/generators/post-generation-install.js.map +1 -1
  95. package/src/generators/preset/generator.js +22 -7
  96. package/src/generators/preset/generator.js.map +1 -1
  97. package/src/generators/preset/workspace-files-developer-agent.js +15 -7
  98. package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
  99. package/src/generators/preset/workspace-files-ecr-inspector.d.ts +18 -0
  100. package/src/generators/preset/workspace-files-ecr-inspector.js +298 -0
  101. package/src/generators/preset/workspace-files-ecr-inspector.js.map +1 -0
  102. package/src/generators/preset/workspace-files-performance-cost.d.ts +2 -2
  103. package/src/generators/preset/workspace-files-performance-cost.js +8 -8
  104. package/src/generators/preset/workspace-files-performance-cost.js.map +1 -1
  105. package/src/generators/preset/workspace-files-performance-load.d.ts +1 -1
  106. package/src/generators/preset/workspace-files-performance-load.js +8 -12
  107. package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
  108. package/src/generators/preset/workspace-files-stage-authority.d.ts +4 -0
  109. package/src/generators/preset/workspace-files-stage-authority.js +275 -0
  110. package/src/generators/preset/workspace-files-stage-authority.js.map +1 -0
  111. package/src/generators/preset/workspace-files-thin-deploy.d.ts +35 -0
  112. package/src/generators/preset/workspace-files-thin-deploy.js +1434 -0
  113. package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -0
  114. package/src/generators/preset/workspace-files-thin-docs.d.ts +5 -0
  115. package/src/generators/preset/workspace-files-thin-docs.js +224 -0
  116. package/src/generators/preset/workspace-files-thin-docs.js.map +1 -0
  117. package/src/generators/preset/workspace-files-thin-release.d.ts +14 -0
  118. package/src/generators/preset/workspace-files-thin-release.js +26 -0
  119. package/src/generators/preset/workspace-files-thin-release.js.map +1 -0
  120. package/src/generators/preset/workspace-files.d.ts +1 -1
  121. package/src/generators/preset/workspace-files.js +373 -223
  122. package/src/generators/preset/workspace-files.js.map +1 -1
  123. package/src/generators/slice/built-in-plan-api-files.js +1 -0
  124. package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
  125. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +4 -0
  126. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
  127. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +5 -31
  128. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +1 -1
  129. package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
  130. package/src/generators/slice/built-in-plan-data-files.js +89 -30
  131. package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
  132. package/src/generators/slice/built-in-plan-foundation-files.js +3 -5
  133. package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
  134. package/src/generators/slice/built-in-plan-frontend-files.js +5 -1
  135. package/src/generators/slice/built-in-plan-frontend-files.js.map +1 -1
  136. package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
  137. package/src/generators/slice/built-in-plan-infrastructure-files.js +199 -188
  138. package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
  139. package/src/generators/slice/built-in-plan-metadata-files.js +13 -0
  140. package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
  141. package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +2 -0
  142. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +307 -0
  143. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js.map +1 -0
  144. package/src/generators/slice/built-in-plan-operations-files.js +43 -49
  145. package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
  146. package/src/generators/slice/built-in-plan-performance-files.js +37 -19
  147. package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
  148. package/src/generators/slice/built-in-plan-project-files.js +9 -68
  149. package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
  150. package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +1 -1
  151. package/src/generators/slice/built-in-plan-secret-runtime-files.js +74 -76
  152. package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -1
  153. package/src/generators/slice/built-in-plan-testing-files.js +74 -47
  154. package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
  155. package/src/generators/slice/built-in-plan-thin-release-files.d.ts +11 -0
  156. package/src/generators/slice/built-in-plan-thin-release-files.js +129 -0
  157. package/src/generators/slice/built-in-plan-thin-release-files.js.map +1 -0
  158. package/src/generators/slice/built-in-plan-verification-files.js +6 -2
  159. package/src/generators/slice/built-in-plan-verification-files.js.map +1 -1
  160. package/src/generators/slice/built-in-plan-web-files.js +4 -2
  161. package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
  162. package/src/generators/slice/built-in-plan-workload-role-files.js +26 -4
  163. package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
  164. package/src/generators/slice/built-in-plan.d.ts +1 -0
  165. package/src/generators/slice/built-in-plan.js +28 -11
  166. package/src/generators/slice/built-in-plan.js.map +1 -1
  167. package/src/generators/slice/slice.js +27 -29
  168. package/src/generators/slice/slice.js.map +1 -1
  169. package/src/generators/upgrade/upgrade.d.ts +1 -1
  170. package/src/generators/upgrade/upgrade.js +224 -69
  171. package/src/generators/upgrade/upgrade.js.map +1 -1
  172. package/src/generators/workload/performance-registration.d.ts +1 -0
  173. package/src/generators/workload/performance-registration.js +6 -4
  174. package/src/generators/workload/performance-registration.js.map +1 -1
  175. package/src/generators/workload/service-performance-files.d.ts +1 -0
  176. package/src/generators/workload/service-performance-files.js +27 -7
  177. package/src/generators/workload/service-performance-files.js.map +1 -1
  178. package/src/generators/workload/workload.d.ts +1 -1
  179. package/src/generators/workload/workload.js +55 -28
  180. package/src/generators/workload/workload.js.map +1 -1
  181. package/src/git-policy/github-bootstrap.d.ts +19 -6
  182. package/src/git-policy/github-bootstrap.js +103 -157
  183. package/src/git-policy/github-bootstrap.js.map +1 -1
  184. package/src/local-dev/private-state.d.ts +3 -0
  185. package/src/local-dev/private-state.js +17 -5
  186. package/src/local-dev/private-state.js.map +1 -1
  187. package/src/performance/cost-collection.d.ts +1 -1
  188. package/src/performance/cost-collection.js +4 -2
  189. package/src/performance/cost-collection.js.map +1 -1
  190. package/src/performance/cost-controls.d.ts +3 -1
  191. package/src/performance/cost-controls.js +9 -4
  192. package/src/performance/cost-controls.js.map +1 -1
  193. package/src/performance/evidence.d.ts +1 -1
  194. package/src/performance/evidence.js +5 -3
  195. package/src/performance/evidence.js.map +1 -1
  196. package/src/performance/load-safety.js +5 -3
  197. package/src/performance/load-safety.js.map +1 -1
  198. package/src/performance/model.d.ts +2 -2
  199. package/src/performance/model.js +4 -3
  200. package/src/performance/model.js.map +1 -1
  201. package/src/release/index.d.ts +0 -2
  202. package/src/release/index.js +0 -2
  203. package/src/release/index.js.map +1 -1
  204. package/src/release/source-authority.d.ts +4 -5
  205. package/src/release/source-authority.js +13 -123
  206. package/src/release/source-authority.js.map +1 -1
  207. package/src/repository-policy/aurora-preflight.d.ts +1 -1
  208. package/src/repository-policy/aurora-preflight.js +4 -1
  209. package/src/repository-policy/aurora-preflight.js.map +1 -1
  210. package/src/repository-policy/policy.d.ts +5 -1
  211. package/src/repository-policy/policy.js +64 -13
  212. package/src/repository-policy/policy.js.map +1 -1
  213. package/src/schemas/performance-policy-v1.json +3 -1
  214. package/src/secrets/adapters.d.ts +5 -1
  215. package/src/secrets/adapters.js +22 -1
  216. package/src/secrets/adapters.js.map +1 -1
  217. package/src/secrets/aws-control-plane.d.ts +10 -1
  218. package/src/secrets/aws-control-plane.js +67 -0
  219. package/src/secrets/aws-control-plane.js.map +1 -1
  220. package/src/secrets/generated-aws-control-plane.d.ts +23 -0
  221. package/src/secrets/generated-aws-control-plane.js +259 -0
  222. package/src/secrets/generated-aws-control-plane.js.map +1 -0
  223. package/src/secrets/metadata.js +38 -10
  224. package/src/secrets/metadata.js.map +1 -1
  225. package/src/secrets/model.d.ts +8 -1
  226. package/src/secrets/model.js +24 -3
  227. package/src/secrets/model.js.map +1 -1
  228. package/src/secrets/operator.d.ts +89 -3
  229. package/src/secrets/operator.js +422 -9
  230. package/src/secrets/operator.js.map +1 -1
  231. package/src/secrets/registry.d.ts +2 -1
  232. package/src/secrets/registry.js +18 -1
  233. package/src/secrets/registry.js.map +1 -1
  234. package/src/secrets/workload-access.js +10 -2
  235. package/src/secrets/workload-access.js.map +1 -1
  236. package/src/supply-chain/action-pins.js +61 -7
  237. package/src/supply-chain/action-pins.js.map +1 -1
  238. package/src/supply-chain/build-output-bounds.d.ts +2 -0
  239. package/src/supply-chain/build-output-bounds.js +12 -0
  240. package/src/supply-chain/build-output-bounds.js.map +1 -0
  241. package/src/supply-chain/build-output.js +2 -4
  242. package/src/supply-chain/build-output.js.map +1 -1
  243. package/src/supply-chain/ecr-scanning.d.ts +5 -3
  244. package/src/supply-chain/ecr-scanning.js +11 -7
  245. package/src/supply-chain/ecr-scanning.js.map +1 -1
  246. package/src/supply-chain/ecs-deployed-image.d.ts +5 -3
  247. package/src/supply-chain/ecs-deployed-image.js +6 -4
  248. package/src/supply-chain/ecs-deployed-image.js.map +1 -1
  249. package/src/supply-chain/generated-container-release-command.js +816 -34
  250. package/src/supply-chain/generated-container-release-command.js.map +1 -1
  251. package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -1
  252. package/src/supply-chain/generated-ecr-collector-command.js +188 -91
  253. package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
  254. package/src/supply-chain/generated-files.js +4 -3
  255. package/src/supply-chain/generated-files.js.map +1 -1
  256. package/src/supply-chain/index.d.ts +1 -1
  257. package/src/supply-chain/index.js +2 -1
  258. package/src/supply-chain/index.js.map +1 -1
  259. package/src/workload-roles/index.d.ts +10 -17
  260. package/src/workload-roles/index.js +5 -18
  261. package/src/workload-roles/index.js.map +1 -1
package/executors.json CHANGED
@@ -38,17 +38,17 @@
38
38
  "infrastructure-plan": {
39
39
  "implementation": "./src/executors/infrastructure-plan/infrastructure-plan",
40
40
  "schema": "./src/executors/infrastructure-plan/schema.json",
41
- "description": "Run a pinned SST resource diff and fail closed on unapproved, stale, locked, drifted, or unknown protected plans."
41
+ "description": "Stream one advisory native SST diff through the exact committed stage authority without retaining mutation authority."
42
42
  },
43
43
  "local-deploy": {
44
44
  "implementation": "./src/executors/local-deploy/local-deploy",
45
45
  "schema": "./src/executors/local-deploy/schema.json",
46
- "description": "Plan and deploy one complete stage locally with exact temporary AWS role, source, account, Region, and production confirmation authority."
46
+ "description": "Deploy one complete active stage through ordered native SST children, exact temporary AWS authority, migrations, smoke checks, and a bounded receipt."
47
47
  },
48
48
  "router-waf-rehearsal": {
49
49
  "implementation": "./src/executors/router-waf-rehearsal/router-waf-rehearsal",
50
50
  "schema": "./src/executors/router-waf-rehearsal/schema.json",
51
- "description": "Seal bounded staging Router WAF blocking evidence for the exact committed policy before production deployment."
51
+ "description": "Run the bounded Router WAF rate probe, correlate its exact BLOCK sample and metric, and seal the committed blocking evidence."
52
52
  },
53
53
  "work-markers": {
54
54
  "implementation": "./src/executors/work-markers/work-markers",
@@ -80,6 +80,11 @@
80
80
  "schema": "./src/executors/secret-metadata/schema.json",
81
81
  "description": "Report or explicitly apply value-blind operator-secret container metadata for one Product Slice."
82
82
  },
83
+ "secret-initialize": {
84
+ "implementation": "./src/executors/secret-initialize/secret-initialize",
85
+ "schema": "./src/executors/secret-initialize/schema.json",
86
+ "description": "Report or explicitly initialize one declared machine-generated secret without accepting or returning its value."
87
+ },
83
88
  "secret-guardrails": {
84
89
  "implementation": "./src/executors/secret-guardrails/secret-guardrails",
85
90
  "schema": "./src/executors/secret-guardrails/schema.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empire-builder-kit/nx",
3
- "version": "1.0.0-rc.30",
3
+ "version": "1.0.0-rc.31",
4
4
  "description": "Nx generators, executors, and Blueprint contracts for Empire Builder Kit",
5
5
  "keywords": [
6
6
  "aws",
@@ -39,6 +39,10 @@
39
39
  "types": "./src/authorization/index.d.ts",
40
40
  "default": "./src/authorization/index.js"
41
41
  },
42
+ "./aws-authority": {
43
+ "types": "./src/aws-authority/index.d.ts",
44
+ "default": "./src/aws-authority/index.js"
45
+ },
42
46
  "./database-retirement": {
43
47
  "types": "./src/database-retirement/index.d.ts",
44
48
  "default": "./src/database-retirement/index.js"
@@ -59,10 +63,6 @@
59
63
  "types": "./src/git-policy/index.d.ts",
60
64
  "default": "./src/git-policy/index.js"
61
65
  },
62
- "./infrastructure-change": {
63
- "types": "./src/infrastructure-change/index.d.ts",
64
- "default": "./src/infrastructure-change/index.js"
65
- },
66
66
  "./local-dev": {
67
67
  "types": "./src/local-dev/index.d.ts",
68
68
  "default": "./src/local-dev/index.js"
@@ -126,7 +126,9 @@
126
126
  "provenance": false
127
127
  },
128
128
  "dependencies": {
129
- "@empire-builder-kit/runtime": "1.0.0-rc.30",
129
+ "@empire-builder-kit/runtime": "1.0.0-rc.31",
130
+ "@aws-sdk/client-cloudfront": "^3.700.0",
131
+ "@aws-sdk/client-cloudwatch": "^3.700.0",
130
132
  "@aws-sdk/client-cloudwatch-logs": "^3.700.0",
131
133
  "@aws-sdk/client-iam": "^3.700.0",
132
134
  "@nx/devkit": "23.1.0",
@@ -135,6 +137,7 @@
135
137
  "@aws-sdk/client-secrets-manager": "^3.700.0",
136
138
  "@aws-sdk/client-ssm": "^3.700.0",
137
139
  "@aws-sdk/client-sts": "^3.700.0",
140
+ "@aws-sdk/client-wafv2": "^3.700.0",
138
141
  "@aws-sdk/credential-providers": "^3.700.0",
139
142
  "ajv": "8.20.0",
140
143
  "prettier": "^3.8.2",
@@ -154,5 +157,5 @@
154
157
  "engines": {
155
158
  "node": ">=22.13.0"
156
159
  },
157
- "gitHead": "8fa5d9e9867de1192111268210cc96c2ceb96119"
160
+ "gitHead": "829fe75d048a0166c4d8bd1af683c35d9b561bfa"
158
161
  }
@@ -0,0 +1,10 @@
1
+ export interface GovernedAwsChildEnvironmentOptions {
2
+ /** GitHub's configure-aws-credentials action replaces ambient AWS
3
+ * credentials with one exact temporary role session. That verified session
4
+ * is the only raw credential environment admitted to a protected child. */
5
+ preserveVerifiedGithubCredentials?: boolean;
6
+ }
7
+ /** Remove ambient authority inputs that could redirect AWS calls, replace
8
+ * trust roots, mint another OIDC credential, or select an unverified AWS
9
+ * principal. Normal non-secret GitHub provenance remains available. */
10
+ export declare function sanitizeGovernedAwsChildEnvironment(ambient: NodeJS.ProcessEnv, options?: GovernedAwsChildEnvironmentOptions): NodeJS.ProcessEnv;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sanitizeGovernedAwsChildEnvironment = sanitizeGovernedAwsChildEnvironment;
4
+ const RAW_AWS_CREDENTIAL_VARIABLES = new Set([
5
+ 'AWS_ACCESS_KEY_ID',
6
+ 'AWS_CONTAINER_AUTHORIZATION_TOKEN',
7
+ 'AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE',
8
+ 'AWS_CONTAINER_CREDENTIALS_FULL_URI',
9
+ 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI',
10
+ 'AWS_CREDENTIAL_EXPIRATION',
11
+ 'AWS_ROLE_ARN',
12
+ 'AWS_ROLE_SESSION_NAME',
13
+ 'AWS_SECRET_ACCESS_KEY',
14
+ 'AWS_SECURITY_TOKEN',
15
+ 'AWS_SESSION_TOKEN',
16
+ 'AWS_WEB_IDENTITY_TOKEN_FILE',
17
+ ]);
18
+ const VERIFIED_GITHUB_CREDENTIAL_VARIABLES = new Set([
19
+ 'AWS_ACCESS_KEY_ID',
20
+ 'AWS_CREDENTIAL_EXPIRATION',
21
+ 'AWS_SECRET_ACCESS_KEY',
22
+ 'AWS_SESSION_TOKEN',
23
+ ]);
24
+ const AUTHORITY_OVERRIDE_VARIABLES = new Set([
25
+ 'ACTIONS_ID_TOKEN_REQUEST_TOKEN',
26
+ 'ACTIONS_ID_TOKEN_REQUEST_URL',
27
+ 'ACTIONS_RESULTS_URL',
28
+ 'ACTIONS_RUNTIME_TOKEN',
29
+ 'ACTIONS_RUNTIME_URL',
30
+ 'ALL_PROXY',
31
+ 'AWS_CA_BUNDLE',
32
+ 'AWS_EC2_METADATA_SERVICE_ENDPOINT',
33
+ 'AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE',
34
+ 'AWS_USE_DUALSTACK_ENDPOINT',
35
+ 'AWS_USE_FIPS_ENDPOINT',
36
+ 'CURL_CA_BUNDLE',
37
+ 'GH_TOKEN',
38
+ 'GITHUB_TOKEN',
39
+ 'GIT_SSL_CAINFO',
40
+ 'GIT_SSL_NO_VERIFY',
41
+ 'GLOBAL_AGENT_HTTP_PROXY',
42
+ 'GLOBAL_AGENT_HTTPS_PROXY',
43
+ 'HTTPS_PROXY',
44
+ 'HTTP_PROXY',
45
+ 'NODE_EXTRA_CA_CERTS',
46
+ 'NODE_TLS_REJECT_UNAUTHORIZED',
47
+ 'NO_PROXY',
48
+ 'NPM_CONFIG_CAFILE',
49
+ 'NPM_CONFIG_HTTPS_PROXY',
50
+ 'NPM_CONFIG_PROXY',
51
+ 'REQUESTS_CA_BUNDLE',
52
+ 'SSL_CERT_DIR',
53
+ 'SSL_CERT_FILE',
54
+ ]);
55
+ /** Remove ambient authority inputs that could redirect AWS calls, replace
56
+ * trust roots, mint another OIDC credential, or select an unverified AWS
57
+ * principal. Normal non-secret GitHub provenance remains available. */
58
+ function sanitizeGovernedAwsChildEnvironment(ambient, options = {}) {
59
+ const environment = { ...ambient };
60
+ for (const name of Object.keys(environment)) {
61
+ const canonical = name.toUpperCase();
62
+ const endpointOverride = canonical === 'AWS_ENDPOINT_URL' ||
63
+ canonical.startsWith('AWS_ENDPOINT_URL_');
64
+ const authorityOverride = AUTHORITY_OVERRIDE_VARIABLES.has(canonical);
65
+ const rawCredential = RAW_AWS_CREDENTIAL_VARIABLES.has(canonical);
66
+ const exactGithubCredential = options.preserveVerifiedGithubCredentials === true &&
67
+ name === canonical &&
68
+ VERIFIED_GITHUB_CREDENTIAL_VARIABLES.has(canonical);
69
+ if (endpointOverride ||
70
+ authorityOverride ||
71
+ (rawCredential && !exactGithubCredential)) {
72
+ delete environment[name];
73
+ }
74
+ }
75
+ return environment;
76
+ }
77
+ //# sourceMappingURL=child-environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-environment.js","sourceRoot":"","sources":["../../../../../packages/nx/src/aws/child-environment.ts"],"names":[],"mappings":";;AAgEA,kFAyBC;AAzFD,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAC;IAC3C,mBAAmB;IACnB,mCAAmC;IACnC,wCAAwC;IACxC,oCAAoC;IACpC,wCAAwC;IACxC,2BAA2B;IAC3B,cAAc;IACd,uBAAuB;IACvB,uBAAuB;IACvB,oBAAoB;IACpB,mBAAmB;IACnB,6BAA6B;CAC9B,CAAC,CAAC;AAEH,MAAM,oCAAoC,GAAG,IAAI,GAAG,CAAC;IACnD,mBAAmB;IACnB,2BAA2B;IAC3B,uBAAuB;IACvB,mBAAmB;CACpB,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAC;IAC3C,gCAAgC;IAChC,8BAA8B;IAC9B,qBAAqB;IACrB,uBAAuB;IACvB,qBAAqB;IACrB,WAAW;IACX,eAAe;IACf,mCAAmC;IACnC,wCAAwC;IACxC,4BAA4B;IAC5B,uBAAuB;IACvB,gBAAgB;IAChB,UAAU;IACV,cAAc;IACd,gBAAgB;IAChB,mBAAmB;IACnB,yBAAyB;IACzB,0BAA0B;IAC1B,aAAa;IACb,YAAY;IACZ,qBAAqB;IACrB,8BAA8B;IAC9B,UAAU;IACV,mBAAmB;IACnB,wBAAwB;IACxB,kBAAkB;IAClB,oBAAoB;IACpB,cAAc;IACd,eAAe;CAChB,CAAC,CAAC;AASH;;uEAEuE;AACvE,SAAgB,mCAAmC,CACjD,OAA0B,EAC1B,UAA8C,EAAE;IAEhD,MAAM,WAAW,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;IACnC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,gBAAgB,GACpB,SAAS,KAAK,kBAAkB;YAChC,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QAC5C,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtE,MAAM,aAAa,GAAG,4BAA4B,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAClE,MAAM,qBAAqB,GACzB,OAAO,CAAC,iCAAiC,KAAK,IAAI;YAClD,IAAI,KAAK,SAAS;YAClB,oCAAoC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtD,IACE,gBAAgB;YAChB,iBAAiB;YACjB,CAAC,aAAa,IAAI,CAAC,qBAAqB,CAAC,EACzC,CAAC;YACD,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export type CanonicalAwsRegionalService = 'rds' | 'secretsmanager' | 'ssm' | 'sts';
2
+ /** Bind security-sensitive AWS SDK reads to the canonical regional service
3
+ * endpoint rather than an ambient or shared-config endpoint override. */
4
+ export declare function canonicalAwsRegionalEndpoint(service: CanonicalAwsRegionalService, region: string): string;
5
+ /** Bind identity verification to AWS's canonical regional STS service rather
6
+ * than an ambient or shared-config endpoint override. */
7
+ export declare function canonicalStsEndpoint(region: string): string;
8
+ /**
9
+ * AWS STS omits an IAM role path from an assumed-role ARN. Match the exact
10
+ * account, partition, and terminal role name while accepting that documented
11
+ * AWS representation difference.
12
+ */
13
+ export declare function matchesExpectedAssumedRoleArn(expectedAccount: string, callerArn: string, expectedRoleArn: string): boolean;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.canonicalAwsRegionalEndpoint = canonicalAwsRegionalEndpoint;
4
+ exports.canonicalStsEndpoint = canonicalStsEndpoint;
5
+ exports.matchesExpectedAssumedRoleArn = matchesExpectedAssumedRoleArn;
6
+ const IAM_ROLE_ARN = /^arn:([^:]+):iam::(\d{12}):role\/(.+)$/u;
7
+ const STS_ASSUMED_ROLE_ARN = /^arn:([^:]+):sts::(\d{12}):assumed-role\/(.+)\/([^/]+)$/u;
8
+ const AWS_REGION = /^[a-z]{2}(?:-gov)?-[a-z]+-\d$/u;
9
+ /** Bind security-sensitive AWS SDK reads to the canonical regional service
10
+ * endpoint rather than an ambient or shared-config endpoint override. */
11
+ function canonicalAwsRegionalEndpoint(service, region) {
12
+ if (!AWS_REGION.test(region)) {
13
+ throw new Error(`${service.toUpperCase()} verification requires an exact AWS Region.`);
14
+ }
15
+ return region.startsWith('cn-')
16
+ ? `https://${service}.${region}.amazonaws.com.cn`
17
+ : `https://${service}.${region}.amazonaws.com`;
18
+ }
19
+ /** Bind identity verification to AWS's canonical regional STS service rather
20
+ * than an ambient or shared-config endpoint override. */
21
+ function canonicalStsEndpoint(region) {
22
+ return canonicalAwsRegionalEndpoint('sts', region);
23
+ }
24
+ /**
25
+ * AWS STS omits an IAM role path from an assumed-role ARN. Match the exact
26
+ * account, partition, and terminal role name while accepting that documented
27
+ * AWS representation difference.
28
+ */
29
+ function matchesExpectedAssumedRoleArn(expectedAccount, callerArn, expectedRoleArn) {
30
+ const expected = IAM_ROLE_ARN.exec(expectedRoleArn);
31
+ const caller = STS_ASSUMED_ROLE_ARN.exec(callerArn);
32
+ if (!expected || !caller)
33
+ return false;
34
+ const expectedRoleName = expected[3]?.split('/').at(-1);
35
+ return (expected[1] === caller[1] &&
36
+ expected[2] === expectedAccount &&
37
+ caller[2] === expectedAccount &&
38
+ expectedRoleName !== undefined &&
39
+ expectedRoleName === caller[3]);
40
+ }
41
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../../packages/nx/src/aws/identity.ts"],"names":[],"mappings":";;AAUA,oEAYC;AAID,oDAEC;AAOD,sEAgBC;AAnDD,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAC/D,MAAM,oBAAoB,GACxB,0DAA0D,CAAC;AAC7D,MAAM,UAAU,GAAG,gCAAgC,CAAC;AAKpD;yEACyE;AACzE,SAAgB,4BAA4B,CAC1C,OAAoC,EACpC,MAAc;IAEd,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,GAAG,OAAO,CAAC,WAAW,EAAE,6CAA6C,CACtE,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;QAC7B,CAAC,CAAC,WAAW,OAAO,IAAI,MAAM,mBAAmB;QACjD,CAAC,CAAC,WAAW,OAAO,IAAI,MAAM,gBAAgB,CAAC;AACnD,CAAC;AAED;yDACyD;AACzD,SAAgB,oBAAoB,CAAC,MAAc;IACjD,OAAO,4BAA4B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAC3C,eAAuB,EACvB,SAAiB,EACjB,eAAuB;IAEvB,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACvC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,CACL,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;QACzB,QAAQ,CAAC,CAAC,CAAC,KAAK,eAAe;QAC/B,MAAM,CAAC,CAAC,CAAC,KAAK,eAAe;QAC7B,gBAAgB,KAAK,SAAS;QAC9B,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,CAC/B,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './stage-authority.js';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./stage-authority.js"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/nx/src/aws-authority/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC"}
@@ -0,0 +1,238 @@
1
+ export declare const STAGE_AUTHORITY_SCHEMA_VERSION: 1;
2
+ export declare const STAGE_AUTHORITY_STAGES: readonly ["development", "staging", "production"];
3
+ export declare const STAGE_AUTHORITY_PARTITIONS: readonly ["aws", "aws-cn", "aws-us-gov"];
4
+ export declare const STAGE_AUTHORITY_DEPLOYMENT_POLICY_KINDS: readonly ["read", "regional-mutation", "global-iam-mutation", "global-resource-mutation", "generated-resource-mutation", "stage-containment", "permission-guardrails", "guardrails"];
5
+ export declare const STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_LIMIT = 6144;
6
+ export declare const STAGE_AUTHORITY_MANAGED_POLICY_CHARACTER_HEADROOM = 200;
7
+ export declare const STAGE_AUTHORITY_TEMPLATE_BODY_BYTE_LIMIT = 51200;
8
+ export type StageAuthorityStage = (typeof STAGE_AUTHORITY_STAGES)[number];
9
+ export type StageAuthorityPartition = (typeof STAGE_AUTHORITY_PARTITIONS)[number];
10
+ export type StageAuthorityDeploymentPolicyKind = (typeof STAGE_AUTHORITY_DEPLOYMENT_POLICY_KINDS)[number];
11
+ type ConditionValue = string | readonly string[];
12
+ type ConditionEntries = Readonly<Record<string, ConditionValue>>;
13
+ export interface StageAuthorityPolicyStatement {
14
+ Action: readonly string[];
15
+ Condition?: Readonly<Record<string, ConditionEntries>>;
16
+ Effect: 'Allow' | 'Deny';
17
+ NotResource?: readonly string[];
18
+ Resource?: readonly string[];
19
+ Sid: string;
20
+ }
21
+ export interface StageAuthorityPolicyDocument {
22
+ Statement: readonly StageAuthorityPolicyStatement[];
23
+ Version: '2012-10-17';
24
+ }
25
+ export interface StageAuthorityGithubTrust {
26
+ oidcProviderArn: string;
27
+ subject: string;
28
+ }
29
+ export interface StageAuthorityInput {
30
+ accountId: string;
31
+ awsPrincipalArns?: readonly string[];
32
+ github?: StageAuthorityGithubTrust;
33
+ partition?: StageAuthorityPartition;
34
+ region: string;
35
+ stage: StageAuthorityStage;
36
+ }
37
+ export interface StageAuthorityIdentity {
38
+ boundaryArn: string;
39
+ boundaryName: string;
40
+ boundaryPath: string;
41
+ deploymentPolicyArns: readonly string[];
42
+ deploymentPolicyNames: readonly string[];
43
+ deploymentRoleArn: string;
44
+ deploymentRoleName: string;
45
+ deploymentRolePath: string;
46
+ stackName: string;
47
+ workloadInstanceProfileArnPattern: string;
48
+ workloadInstanceProfilePath: string;
49
+ workloadRoleArnPattern: string;
50
+ workloadRolePath: string;
51
+ }
52
+ export interface StageAuthorityDeploymentPolicy {
53
+ arn: string;
54
+ document: StageAuthorityPolicyDocument;
55
+ kind: StageAuthorityDeploymentPolicyKind;
56
+ logicalId: string;
57
+ name: string;
58
+ }
59
+ export interface StageAuthorityLimitations {
60
+ protectedDatabaseConfiguration: 'iam-cannot-inspect-rds-modify-request-fields-lifecycle-preflight-required';
61
+ resourcePolicyAttributes: 'sns-and-sqs-set-attributes-can-write-resource-policies-name-account-region-containment-applies';
62
+ sameAccountStageDeploymentIsolation: 'deployment-role-is-account-scoped-use-production-isolated-for-hard-production-boundary';
63
+ wafLoggingResourcePolicy: 'cloudwatch-logs-put-resource-policy-has-no-resource-or-action-condition-keys-reviewed-generated-source-is-control';
64
+ workloadTrust: 'iam-cannot-inspect-create-role-trust-reviewed-generated-source-is-control';
65
+ }
66
+ export interface StageAuthorityPlan {
67
+ deploymentPolicies: readonly StageAuthorityDeploymentPolicy[];
68
+ digest: string;
69
+ identity: StageAuthorityIdentity;
70
+ limitations: StageAuthorityLimitations;
71
+ runtimeBoundaryPolicy: StageAuthorityPolicyDocument;
72
+ schemaVersion: typeof STAGE_AUTHORITY_SCHEMA_VERSION;
73
+ template: Readonly<Record<string, unknown>>;
74
+ }
75
+ export interface StageIamBoundaryTransformContract {
76
+ boundaryArn: string;
77
+ instanceProfilePath: string;
78
+ rolePath: string;
79
+ }
80
+ export interface StageIamBoundaryTransformArgs {
81
+ path?: unknown;
82
+ permissionsBoundary?: unknown;
83
+ [key: string]: unknown;
84
+ }
85
+ export interface StageIamBoundaryTransformInput {
86
+ accountId: string;
87
+ instanceProfileResource: unknown;
88
+ partition?: StageAuthorityPartition;
89
+ registerTransform: (resource: unknown, transform: (args: StageIamBoundaryTransformArgs) => void) => void;
90
+ roleResource: unknown;
91
+ stage: StageAuthorityStage;
92
+ }
93
+ /** Native lifecycle required by the generated machine-authorization nested
94
+ * stack. Recovery-only and stack-policy mutation APIs remain ungranted. */
95
+ export declare const STAGE_AUTHORITY_CLOUDFORMATION_LIFECYCLE_ACTIONS: readonly string[];
96
+ /** EventBridge archives expose no request-tag or resource-tag IAM condition
97
+ * keys. Their lifecycle is contained by the exact canonical archive ARN and
98
+ * requested Region instead. */
99
+ export declare const STAGE_AUTHORITY_EVENT_ARCHIVE_CREATE_ACTIONS: readonly string[];
100
+ export declare const STAGE_AUTHORITY_EVENT_ARCHIVE_RESOURCE_ACTIONS: readonly string[];
101
+ export declare const STAGE_AUTHORITY_LAMBDA_DEPLOYMENT_INVOKE_ACTIONS: readonly string[];
102
+ export declare const STAGE_AUTHORITY_CLOUDFRONT_INVALIDATION_ACTIONS: readonly string[];
103
+ export declare const STAGE_AUTHORITY_WAF_LOGGING_ACTIONS: readonly string[];
104
+ /** SST's CloudFront-scope WAF logging component owns exactly one generated log
105
+ * group in the edge control Region. These resource-capable actions stay bound
106
+ * to that generated ARN below. */
107
+ export declare const STAGE_AUTHORITY_EDGE_WAF_LOG_GROUP_ACTIONS: readonly string[];
108
+ /** CloudWatch Logs exposes these WAF delivery mutations only at account scope.
109
+ * In particular, PutResourcePolicy supports neither resource ARNs nor
110
+ * action-specific condition keys. Requested Region and reviewed generated
111
+ * source are therefore the strongest honest controls for that one exception. */
112
+ export declare const STAGE_AUTHORITY_EDGE_WAF_LOG_DELIVERY_MUTATION_ACTIONS: readonly string[];
113
+ export declare const STAGE_AUTHORITY_BUDGET_MUTATION_ACTIONS: readonly string[];
114
+ export declare const STAGE_AUTHORITY_RDS_EVENT_SUBSCRIPTION_SOURCE_ACTIONS: readonly string[];
115
+ export declare const STAGE_AUTHORITY_KMS_ROTATION_ACTIONS: readonly string[];
116
+ /** Cost Explorer creation is account-global, while existing anomaly controls
117
+ * support account-bound ARNs. These exact verbs are admitted only to the
118
+ * production stage role below. */
119
+ export declare const STAGE_AUTHORITY_COST_ANOMALY_READ_ACTIONS: readonly string[];
120
+ export declare const STAGE_AUTHORITY_COST_ANOMALY_CREATE_ACTIONS: readonly string[];
121
+ export declare const STAGE_AUTHORITY_COST_ANOMALY_RESOURCE_WRITE_ACTIONS: readonly string[];
122
+ export declare const STAGE_AUTHORITY_COST_ANOMALY_WRITE_ACTIONS: readonly string[];
123
+ export declare const STAGE_AUTHORITY_REGIONAL_READ_ACTIONS: readonly string[];
124
+ export declare const STAGE_AUTHORITY_GLOBAL_READ_ACTIONS: readonly string[];
125
+ /** CloudFront-scope WAF publishes its observability signals through the edge
126
+ * control Region. Keep this read surface exact instead of broadening every
127
+ * regional read when the application Region differs from us-east-1. */
128
+ export declare const STAGE_AUTHORITY_EDGE_OBSERVABILITY_READ_ACTIONS: readonly string[];
129
+ /** A deployment role is a temporary infrastructure administrator, not a
130
+ * runtime workload identity. Routine regional services therefore use one
131
+ * stable service-family contract instead of a provider-call inventory. The
132
+ * families whose policy, protection, launch, or trust semantics need tighter
133
+ * treatment remain on the bounded action sets below. */
134
+ export declare const STAGE_AUTHORITY_BROAD_REGIONAL_SERVICE_ACTIONS: readonly string[];
135
+ export declare const STAGE_AUTHORITY_BACKUP_INFRASTRUCTURE_ACTIONS: readonly string[];
136
+ export declare const STAGE_AUTHORITY_EC2_INFRASTRUCTURE_ACTIONS: readonly string[];
137
+ export declare const STAGE_AUTHORITY_KMS_INFRASTRUCTURE_ACTIONS: readonly string[];
138
+ /** AddPermission, RemovePermission, and InvokeFunction remain in exact
139
+ * statements so the family allow cannot bypass Lambda resource-policy and
140
+ * deployment-smoke constraints. */
141
+ export declare const STAGE_AUTHORITY_LAMBDA_INFRASTRUCTURE_ACTIONS: readonly string[];
142
+ export declare const STAGE_AUTHORITY_REGIONAL_WRITE_ACTIONS: readonly string[];
143
+ export declare const STAGE_AUTHORITY_UNSCOPED_CLOUDFRONT_CREATE_ACTIONS: readonly string[];
144
+ export declare const STAGE_AUTHORITY_S3_REGIONAL_MUTATION_ACTIONS: readonly string[];
145
+ export declare const STAGE_AUTHORITY_WAF_EDGE_MUTATION_ACTIONS: readonly string[];
146
+ /** These APIs establish unsupported replicas, global resources, alternate
147
+ * database topologies, integrations, or cross-Region copies. The generated
148
+ * architecture does not use them. */
149
+ export declare const STAGE_AUTHORITY_UNSUPPORTED_REPLICATION_AND_TOPOLOGY_ACTIONS: readonly string[];
150
+ export declare const STAGE_AUTHORITY_GLOBAL_WRITE_ACTIONS: readonly string[];
151
+ export declare const STAGE_AUTHORITY_ACCOUNT_SCOPED_GLOBAL_WRITE_ACTIONS: readonly string[];
152
+ export declare const STAGE_RUNTIME_REGIONAL_ACTIONS: readonly string[];
153
+ export declare const STAGE_RUNTIME_GLOBAL_ACTIONS: readonly string[];
154
+ export declare const STAGE_AUTHORITY_REGIONAL_MUTATION_FAMILIES: readonly string[];
155
+ /** Logs application resources live in the deployment Region, while native WAF
156
+ * delivery resources live in the CloudFront edge control Region. The allow
157
+ * statements remain separate; this family exists only to deny mutations in a
158
+ * third Region. */
159
+ export declare const STAGE_AUTHORITY_LOGS_MUTATION_FAMILIES: readonly string[];
160
+ export declare const STAGE_RUNTIME_REGIONAL_SERVICE_FAMILIES: readonly string[];
161
+ export declare const STAGE_AUTHORITY_APPROVED_AWS_MANAGED_POLICIES: readonly string[];
162
+ export declare const STAGE_AUTHORITY_WORKLOAD_IDENTITY_POLICY_ACTIONS: readonly string[];
163
+ /** Compact service-family scope guards keep mutation outside the selected AWS
164
+ * account/Region closed. They intentionally do not claim same-account stage
165
+ * isolation, because native SST owns account-shared bootstrap resources. */
166
+ export declare const STAGE_AUTHORITY_SCOPE_GUARD_MUTATION_FAMILIES: readonly string[];
167
+ /** SST 4.17.1 resolves the generated nonproduction VPC's EC2 NAT image from
168
+ * this commercial-partition fck-nat publisher. The generated development
169
+ * bastion reuses that NAT instance, while production uses managed NAT. No
170
+ * publisher is admitted in partitions where the pinned source is unproven. */
171
+ export declare const STAGE_AUTHORITY_SST_417_EXTERNAL_AMI_OWNERS_BY_PARTITION: Readonly<{
172
+ aws: readonly string[];
173
+ 'aws-cn': readonly any[];
174
+ 'aws-us-gov': readonly any[];
175
+ }>;
176
+ /** Preserve the generic cross-account guard for ordinary EC2 mutations while
177
+ * routing RunInstances through its resource-aware statements below. A service
178
+ * family wildcard would otherwise reject SST's deliberately external AMI. */
179
+ export declare const STAGE_AUTHORITY_CROSS_ACCOUNT_EC2_MUTATION_ACTIONS: readonly string[];
180
+ export declare const STAGE_AUTHORITY_CROSS_ACCOUNT_MUTATION_ACTIONS: readonly string[];
181
+ /** A deliberately narrow destructive set for same-account stage defense in
182
+ * depth. It protects named/tagged production resources without pretending the
183
+ * deployment roles form a complete IAM boundary. */
184
+ export declare const STAGE_AUTHORITY_CROSS_STAGE_DESTRUCTIVE_ACTIONS: readonly string[];
185
+ /** Existing-resource mutations must either retain the exact stage tag or use a
186
+ * generated stage/SST shared resource identity. Initial create/tag calls are
187
+ * governed by their request-tag or exact-resource statements instead. */
188
+ export declare const STAGE_AUTHORITY_UNTAGGED_DESTRUCTIVE_ACTIONS: readonly string[];
189
+ /** Operations whose target already exposes a stage tag may use the broader
190
+ * deployer contract. A known different-stage tag must still win as an explicit
191
+ * deny, including for provider calls that are not destructive by name. */
192
+ export declare const STAGE_AUTHORITY_KNOWN_STAGE_MUTATION_ACTIONS: readonly string[];
193
+ export declare const STAGE_AUTHORITY_S3_BUCKET_POLICY_MUTATION_ACTIONS: readonly string[];
194
+ /** Permission-management actions that the generated lifecycle must call. Each
195
+ * exception is named exactly here and remains subject to the resource and
196
+ * condition containment statements below. */
197
+ export declare const STAGE_AUTHORITY_REVIEWED_PERMISSION_MANAGEMENT_ACTIONS: readonly string[];
198
+ /** Compact deny patterns covering permission-management actions admitted by
199
+ * wildcard lifecycle grants but not named as reviewed exceptions. The focused
200
+ * oracle derives every wildcard service family from the policy and proves each
201
+ * currently admitted permission-management action is reviewed or denied, and
202
+ * that no compact pattern also captures a retained read-only action. */
203
+ export declare const STAGE_AUTHORITY_UNREVIEWED_PERMISSION_MANAGEMENT_ACTION_PATTERNS: readonly string[];
204
+ /** Stable exclusions from the temporary infrastructure-administrator role.
205
+ * These are account administration, direct application data/user mutation,
206
+ * message handling, or export paths rather than native stack reconciliation.
207
+ * The generated deployed smoke retains only its four exact Cognito admin calls. */
208
+ export declare const STAGE_AUTHORITY_NON_DEPLOYMENT_ACCOUNT_AND_DATA_ACTIONS: readonly string[];
209
+ export declare const STAGE_AUTHORITY_UNSUPPORTED_WORKFLOW_EXECUTION_ACTIONS: readonly string[];
210
+ export declare const STAGE_AUTHORITY_SERVICE_LINKED_ROLES: readonly (Readonly<{
211
+ path: "ecs.amazonaws.com/AWSServiceRoleForECS";
212
+ serviceName: "ecs.amazonaws.com";
213
+ }> | Readonly<{
214
+ path: "ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService";
215
+ serviceName: "ecs.application-autoscaling.amazonaws.com";
216
+ }> | Readonly<{
217
+ path: "rds.amazonaws.com/AWSServiceRoleForRDS";
218
+ serviceName: "rds.amazonaws.com";
219
+ }> | Readonly<{
220
+ path: "rds.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_RDSCluster";
221
+ serviceName: "rds.application-autoscaling.amazonaws.com";
222
+ }> | Readonly<{
223
+ path: "wafv2.amazonaws.com/AWSServiceRoleForWAFV2Logging";
224
+ serviceName: "wafv2.amazonaws.com";
225
+ }>)[];
226
+ export declare function createStageAuthorityIdentity(input: Pick<StageAuthorityInput, 'accountId' | 'partition' | 'region' | 'stage'>): StageAuthorityIdentity;
227
+ export declare function canonicalStageAuthorityTemplate(template: Readonly<Record<string, unknown>>): string;
228
+ export declare function digestStageAuthorityTemplate(template: Readonly<Record<string, unknown>>): string;
229
+ export declare function createStageAuthorityPlan(input: StageAuthorityInput): StageAuthorityPlan;
230
+ export declare function createStageIamBoundaryTransformContract(input: Pick<StageAuthorityInput, 'accountId' | 'partition' | 'stage'>): StageIamBoundaryTransformContract;
231
+ /**
232
+ * Installs ordinary Pulumi resource transforms before generated SST components
233
+ * are constructed. SST remains responsible for creating its roles and NAT
234
+ * instance profiles; this helper contributes only the stable stage path and
235
+ * permissions boundary.
236
+ */
237
+ export declare function installStageIamBoundaryTransforms(input: StageIamBoundaryTransformInput): StageIamBoundaryTransformContract;
238
+ export {};