cdk-local 0.168.1 → 0.168.2

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.
@@ -16,7 +16,7 @@ import { GetParameterCommand, GetParametersCommand, SSMClient } from "@aws-sdk/c
16
16
  import { unzipSync } from "fflate";
17
17
  import { MultiSelectPrompt } from "@clack/core";
18
18
  import { S_BAR, S_BAR_END, S_BAR_START, S_CHECKBOX_ACTIVE, S_CHECKBOX_INACTIVE, S_CHECKBOX_SELECTED, confirm, isCancel, multiselect, select, spinner, text } from "@clack/prompts";
19
- import { CloudFormationClient, DescribeStacksCommand, ListExportsCommand, ListStackResourcesCommand } from "@aws-sdk/client-cloudformation";
19
+ import { CloudFormationClient, DescribeStacksCommand, GetTemplateCommand, ListExportsCommand, ListStackResourcesCommand } from "@aws-sdk/client-cloudformation";
20
20
  import { GetFunctionConfigurationCommand, LambdaClient } from "@aws-sdk/client-lambda";
21
21
  import { BedrockAgentCoreControlClient, GetAgentRuntimeCommand } from "@aws-sdk/client-bedrock-agentcore-control";
22
22
  import { mkdir, mkdtemp, readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -5449,6 +5449,319 @@ async function resolveSsmParameters(client, refs, label) {
5449
5449
  return out;
5450
5450
  }
5451
5451
 
5452
+ // src/local/secret-attributes.ts
5453
+ const SECRET_ATTRIBUTE_NAME = /secret|password|credential/i;
5454
+ const NON_SECRET_ATTRIBUTE_SUFFIX = /(arn|id|name|url|alias|status)$/i;
5455
+ const SECRET_VALUED_ATTRIBUTES = /* @__PURE__ */ new Map([
5456
+ ["AWS::AppSync::ApiKey", ["ApiKey", "ApiKeyId"]],
5457
+ ["AWS::EC2::IpamExternalResourceVerificationToken", ["TokenValue"]],
5458
+ ["AWS::IVS::StreamKey", ["Value"]]
5459
+ ]);
5460
+ function isSecretAttributeName(attribute) {
5461
+ return SECRET_ATTRIBUTE_NAME.test(attribute) && !NON_SECRET_ATTRIBUTE_SUFFIX.test(attribute);
5462
+ }
5463
+ function isSecretValuedAttribute(resourceType, attribute) {
5464
+ if (typeof resourceType !== "string") return false;
5465
+ return SECRET_VALUED_ATTRIBUTES.get(resourceType)?.includes(attribute) === true;
5466
+ }
5467
+ function isCustomResourceType(resourceType) {
5468
+ return typeof resourceType === "string" && (resourceType.startsWith("Custom::") || resourceType === "AWS::CloudFormation::CustomResource");
5469
+ }
5470
+
5471
+ // src/local/cfn-producer-secrets.ts
5472
+ const SEGMENT_SUBSTRING_FLOOR = 4;
5473
+ const NAMED_LEAF_EXACT_FLOOR = 8;
5474
+ const NAMED_LEAF_FLOOR = 16;
5475
+ const MAX_DEPTH = 32;
5476
+ const MAX_STACKS = 256;
5477
+ const APPSYNC_ARN = /^arn:[^:]+:appsync:[^:]*:[^:]*:(.+)$/;
5478
+ const APPSYNC_APIKEY_PATH = /^apis\/([^/|]+)\/apikeys?\/([^/|]+)$/;
5479
+ function secretPhysicalIdSegment(resourceType, physicalId) {
5480
+ if (resourceType !== "AWS::AppSync::ApiKey") return void 0;
5481
+ if (typeof physicalId !== "string" || physicalId === "") return void 0;
5482
+ const parts = physicalId.split("|");
5483
+ if (parts.length === 2 && parts[0] !== "" && parts[1] !== "") return parts[1];
5484
+ const arn = APPSYNC_ARN.exec(physicalId);
5485
+ const path = arn ? APPSYNC_APIKEY_PATH.exec(arn[1]) : null;
5486
+ return path ? path[2] : physicalId;
5487
+ }
5488
+ function holds(value, needle, floor) {
5489
+ return value === needle || needle.length >= floor && value.includes(needle);
5490
+ }
5491
+ const isPlaintext = (v) => v !== "" && v !== "***" && !v.includes("{{resolve:");
5492
+ const isRecord = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
5493
+ var CfnProducerSecretJudge = class CfnProducerSecretJudge {
5494
+ client;
5495
+ listResources;
5496
+ exports;
5497
+ label;
5498
+ resourceReads = /* @__PURE__ */ new Map();
5499
+ outputReads = /* @__PURE__ */ new Map();
5500
+ templateReads = /* @__PURE__ */ new Map();
5501
+ summaries = /* @__PURE__ */ new Map();
5502
+ constructor(client, exports, label, listResources) {
5503
+ this.client = client;
5504
+ this.listResources = listResources;
5505
+ this.exports = exports;
5506
+ this.label = label;
5507
+ }
5508
+ async judgeExport(exportName, served) {
5509
+ let summary = this.summaries.get(exportName);
5510
+ if (summary === void 0) {
5511
+ summary = this.summarize(exportName);
5512
+ this.summaries.set(exportName, summary);
5513
+ }
5514
+ return verdictOf(await summary, served);
5515
+ }
5516
+ async summarize(exportName) {
5517
+ const walk = {
5518
+ summary: {
5519
+ segments: /* @__PURE__ */ new Set(),
5520
+ typed: /* @__PURE__ */ new Set(),
5521
+ named: /* @__PURE__ */ new Set(),
5522
+ opaque: void 0,
5523
+ stale: false
5524
+ },
5525
+ stacks: /* @__PURE__ */ new Set(),
5526
+ exports: /* @__PURE__ */ new Set()
5527
+ };
5528
+ await this.addExport(exportName, walk, 0, true);
5529
+ return walk.summary;
5530
+ }
5531
+ static opaque(walk, why) {
5532
+ walk.summary.opaque ??= why;
5533
+ }
5534
+ async addExport(name, walk, depth, top) {
5535
+ if (walk.exports.has(name)) return;
5536
+ walk.exports.add(name);
5537
+ const shownExport = displayUntrustedValue(name);
5538
+ if (depth > MAX_DEPTH) {
5539
+ CfnProducerSecretJudge.opaque(walk, `the re-exports go past the ${MAX_DEPTH}-level bound`);
5540
+ return;
5541
+ }
5542
+ const entry = (await this.exports())?.get(name);
5543
+ if (entry === void 0) {
5544
+ CfnProducerSecretJudge.opaque(walk, `the producer re-exports ${shownExport}, which ListExports does not list`);
5545
+ return;
5546
+ }
5547
+ const stackId = entry.exportingStackId;
5548
+ if (stackId === void 0 || stackId === "") {
5549
+ CfnProducerSecretJudge.opaque(walk, `ListExports names no exporting stack for ${shownExport}`);
5550
+ return;
5551
+ }
5552
+ const shownStack = displayUntrustedValue(stackId);
5553
+ await this.addTree(stackId, walk, depth);
5554
+ const outputs = await this.readOutputs(stackId);
5555
+ if ("error" in outputs) {
5556
+ CfnProducerSecretJudge.opaque(walk, outputs.error);
5557
+ return;
5558
+ }
5559
+ const output = outputs.ok.find((o) => o.ExportName === name);
5560
+ if (output?.OutputKey === void 0 || output.OutputValue !== entry.value) {
5561
+ if (top) walk.summary.stale = true;
5562
+ else CfnProducerSecretJudge.opaque(walk, `the producer re-exports ${shownExport}, which ${shownStack} no longer declares`);
5563
+ return;
5564
+ }
5565
+ const template = await this.readTemplate(stackId);
5566
+ if ("error" in template) {
5567
+ CfnProducerSecretJudge.opaque(walk, template.error);
5568
+ return;
5569
+ }
5570
+ await this.traceOutput({
5571
+ stackId,
5572
+ template: template.ok
5573
+ }, output.OutputKey, output.OutputValue, walk, depth);
5574
+ }
5575
+ async addTree(stackId, walk, depth) {
5576
+ if (walk.stacks.has(stackId)) return;
5577
+ if (walk.stacks.size >= MAX_STACKS) {
5578
+ CfnProducerSecretJudge.opaque(walk, `the producer tree goes past ${MAX_STACKS} stacks`);
5579
+ return;
5580
+ }
5581
+ walk.stacks.add(stackId);
5582
+ const resources = await this.readResources(stackId);
5583
+ if ("error" in resources) {
5584
+ CfnProducerSecretJudge.opaque(walk, resources.error);
5585
+ return;
5586
+ }
5587
+ for (const r of resources.ok) {
5588
+ const segment = secretPhysicalIdSegment(r.ResourceType, r.PhysicalResourceId);
5589
+ if (segment !== void 0 && isPlaintext(segment)) walk.summary.segments.add(segment);
5590
+ if (r.ResourceType === "AWS::CloudFormation::Stack" && r.PhysicalResourceId) {
5591
+ if (depth + 1 > MAX_DEPTH) {
5592
+ CfnProducerSecretJudge.opaque(walk, `the nested stacks go past the ${MAX_DEPTH}-level bound`);
5593
+ continue;
5594
+ }
5595
+ await this.addTree(r.PhysicalResourceId, walk, depth + 1);
5596
+ }
5597
+ }
5598
+ }
5599
+ async traceOutput(stack, key, value, walk, depth) {
5600
+ const outputs = stack.template["Outputs"];
5601
+ const def = isRecord(outputs) && Object.hasOwn(outputs, key) ? outputs[key] : void 0;
5602
+ if (!isRecord(def) || !Object.hasOwn(def, "Value")) {
5603
+ CfnProducerSecretJudge.opaque(walk, `the template of ${displayUntrustedValue(stack.stackId)} declares no output ${displayUntrustedValue(key)}`);
5604
+ return;
5605
+ }
5606
+ await this.trace(def["Value"], stack, value, walk, depth, /* @__PURE__ */ new Set());
5607
+ }
5608
+ async trace(node, stack, value, walk, depth, shadowed) {
5609
+ if (Array.isArray(node)) {
5610
+ for (const item of node) await this.trace(item, stack, value, walk, depth, shadowed);
5611
+ return;
5612
+ }
5613
+ if (!isRecord(node)) return;
5614
+ for (const [key, child] of Object.entries(node)) {
5615
+ if (key === "Ref" && typeof child === "string") await this.readRef(child, stack, value, walk, depth);
5616
+ else if (key === "Fn::GetAtt") {
5617
+ const att = getAttOf(child);
5618
+ if (att === void 0) CfnProducerSecretJudge.opaque(walk, "an exported Fn::GetAtt is computed");
5619
+ else await this.readGetAtt(att[0], att[1], stack, value, walk, depth);
5620
+ } else if (key === "Fn::Sub") {
5621
+ const template = Array.isArray(child) ? child[0] : child;
5622
+ const vars = Array.isArray(child) && isRecord(child[1]) ? child[1] : {};
5623
+ const inScope = /* @__PURE__ */ new Set([...shadowed, ...Object.keys(vars)]);
5624
+ if (typeof template === "string") for (const m of template.matchAll(/\$\{([^}!][^}]*)\}/g)) {
5625
+ const ref = m[1].trim();
5626
+ if (inScope.has(ref) || ref.startsWith("AWS::")) continue;
5627
+ const dot = ref.indexOf(".");
5628
+ if (dot > 0) await this.readGetAtt(ref.slice(0, dot), ref.slice(dot + 1), stack, value, walk, depth);
5629
+ else await this.readRef(ref, stack, value, walk, depth);
5630
+ }
5631
+ else await this.trace(template, stack, value, walk, depth, shadowed);
5632
+ for (const v of Object.values(vars)) await this.trace(v, stack, value, walk, depth, shadowed);
5633
+ continue;
5634
+ } else if (key === "Fn::ImportValue") {
5635
+ if (typeof child === "string") await this.addExport(child, walk, depth + 1, false);
5636
+ else CfnProducerSecretJudge.opaque(walk, "the producer re-exports an Fn::ImportValue whose name is computed");
5637
+ continue;
5638
+ }
5639
+ await this.trace(child, stack, value, walk, depth, shadowed);
5640
+ }
5641
+ }
5642
+ async readRef(name, stack, value, walk, depth) {
5643
+ const params = stack.template["Parameters"];
5644
+ const param = isRecord(params) && Object.hasOwn(params, name) ? params[name] : void 0;
5645
+ if (!isRecord(param)) return;
5646
+ const noEcho = param["NoEcho"];
5647
+ if ((noEcho === true || noEcho === "true") && isPlaintext(value)) {
5648
+ walk.summary.typed.add(value);
5649
+ return;
5650
+ }
5651
+ const parent = stack.parent;
5652
+ if (parent !== void 0 && Object.hasOwn(parent.bindings, name)) await this.trace(parent.bindings[name], parent.stack, value, walk, depth, /* @__PURE__ */ new Set());
5653
+ }
5654
+ async readGetAtt(logicalId, attribute, stack, value, walk, depth) {
5655
+ const resources = stack.template["Resources"];
5656
+ const res = isRecord(resources) && Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
5657
+ const type = isRecord(res) ? res["Type"] : void 0;
5658
+ if (type === "AWS::CloudFormation::Stack" && attribute.startsWith("Outputs.")) {
5659
+ await this.traceNestedOutput(stack, logicalId, attribute.slice(8), walk, depth);
5660
+ return;
5661
+ }
5662
+ if (!isPlaintext(value)) return;
5663
+ if (isSecretValuedAttribute(type, attribute) || isCustomResourceType(type)) walk.summary.typed.add(value);
5664
+ else if (isSecretAttributeName(attribute) && value.length >= NAMED_LEAF_EXACT_FLOOR) walk.summary.named.add(value);
5665
+ }
5666
+ async traceNestedOutput(stack, logicalId, key, walk, depth) {
5667
+ const shownParent = displayUntrustedValue(stack.stackId);
5668
+ if (depth + 1 > MAX_DEPTH) {
5669
+ CfnProducerSecretJudge.opaque(walk, `the nested stacks go past the ${MAX_DEPTH}-level bound`);
5670
+ return;
5671
+ }
5672
+ const resources = await this.readResources(stack.stackId);
5673
+ if ("error" in resources) {
5674
+ CfnProducerSecretJudge.opaque(walk, resources.error);
5675
+ return;
5676
+ }
5677
+ const nestedId = resources.ok.find((r) => r.LogicalResourceId === logicalId)?.PhysicalResourceId;
5678
+ if (!nestedId) {
5679
+ CfnProducerSecretJudge.opaque(walk, `${shownParent} lists no nested stack ${displayUntrustedValue(logicalId)}`);
5680
+ return;
5681
+ }
5682
+ const outputs = await this.readOutputs(nestedId);
5683
+ if ("error" in outputs) {
5684
+ CfnProducerSecretJudge.opaque(walk, outputs.error);
5685
+ return;
5686
+ }
5687
+ const output = outputs.ok.find((o) => o.OutputKey === key);
5688
+ const template = await this.readTemplate(nestedId);
5689
+ if ("error" in template) {
5690
+ CfnProducerSecretJudge.opaque(walk, template.error);
5691
+ return;
5692
+ }
5693
+ if (output?.OutputValue === void 0) {
5694
+ CfnProducerSecretJudge.opaque(walk, `the nested stack ${displayUntrustedValue(nestedId)} has no output ${displayUntrustedValue(key)}`);
5695
+ return;
5696
+ }
5697
+ const nestedRes = stack.template["Resources"]?.[logicalId];
5698
+ const props = isRecord(nestedRes) ? nestedRes["Properties"] : void 0;
5699
+ const bindings = isRecord(props) && isRecord(props["Parameters"]) ? props["Parameters"] : {};
5700
+ await this.traceOutput({
5701
+ stackId: nestedId,
5702
+ template: template.ok,
5703
+ parent: {
5704
+ stack,
5705
+ bindings
5706
+ }
5707
+ }, key, output.OutputValue, walk, depth + 1);
5708
+ }
5709
+ memo(cache, stackId, operation, read) {
5710
+ let got = cache.get(stackId);
5711
+ if (got === void 0) {
5712
+ got = Promise.resolve().then(read).then((ok) => ({ ok }), (err) => {
5713
+ const why = err instanceof UnjudgeableStackError ? err.message : describeAwsFailureForWarn(err, `${this.label}: CloudFormation ${operation}(${displayUntrustedValue(stackId)})`);
5714
+ return { error: `${operation} of ${displayUntrustedValue(stackId)} failed: ${why}` };
5715
+ });
5716
+ cache.set(stackId, got);
5717
+ }
5718
+ return got;
5719
+ }
5720
+ readResources(stackId) {
5721
+ return this.memo(this.resourceReads, stackId, "ListStackResources", async () => {
5722
+ return this.listResources(this.client, stackId);
5723
+ });
5724
+ }
5725
+ readOutputs(stackId) {
5726
+ return this.memo(this.outputReads, stackId, "DescribeStacks", async () => {
5727
+ const stack = (await this.client.send(new DescribeStacksCommand({ StackName: stackId }))).Stacks?.[0];
5728
+ if (!stack) throw new UnjudgeableStackError("it returned no stack");
5729
+ return stack.Outputs ?? [];
5730
+ });
5731
+ }
5732
+ readTemplate(stackId) {
5733
+ return this.memo(this.templateReads, stackId, "GetTemplate", async () => {
5734
+ const body = (await this.client.send(new GetTemplateCommand({ StackName: stackId }))).TemplateBody;
5735
+ let parsed;
5736
+ try {
5737
+ parsed = typeof body === "string" ? JSON.parse(body) : void 0;
5738
+ } catch {
5739
+ parsed = void 0;
5740
+ }
5741
+ if (!isRecord(parsed)) throw new UnjudgeableStackError("the template is not a JSON object");
5742
+ return parsed;
5743
+ });
5744
+ }
5745
+ };
5746
+ var UnjudgeableStackError = class extends Error {};
5747
+ function getAttOf(node) {
5748
+ if (Array.isArray(node) && typeof node[0] === "string" && typeof node[1] === "string") return [node[0], node[1]];
5749
+ if (typeof node === "string") {
5750
+ const dot = node.indexOf(".");
5751
+ if (dot > 0) return [node.slice(0, dot), node.slice(dot + 1)];
5752
+ }
5753
+ }
5754
+ function verdictOf(summary, served) {
5755
+ for (const s of summary.segments) if (holds(served, s, SEGMENT_SUBSTRING_FLOOR)) return { verdict: "secret" };
5756
+ for (const t of summary.typed) if (holds(served, t, SEGMENT_SUBSTRING_FLOOR)) return { verdict: "secret" };
5757
+ for (const n of summary.named) if (holds(served, n, NAMED_LEAF_FLOOR)) return { verdict: "secret" };
5758
+ if (summary.opaque !== void 0) return {
5759
+ verdict: "unreadable",
5760
+ detail: summary.opaque
5761
+ };
5762
+ if (summary.stale) return { verdict: "stale" };
5763
+ }
5764
+
5452
5765
  // src/local/cfn-local-state-provider.ts
5453
5766
  var CfnLocalStateProvider = class {
5454
5767
  label;
@@ -5614,20 +5927,33 @@ var CfnLocalStateProvider = class {
5614
5927
  let exportsPromise;
5615
5928
  const ensureExports = () => {
5616
5929
  if (exportsPromise) return exportsPromise;
5617
- exportsPromise = fetchAllExports(client).catch((err) => {
5930
+ exportsPromise = fetchAllExportEntries(client).catch((err) => {
5618
5931
  logger.warn(`${label}: ListExports (${region}) failed: ${formatAwsErrorForWarn(err, "CloudFormation ListExports")}. Fn::ImportValue intrinsics will warn-and-drop.`);
5619
5932
  });
5620
5933
  return exportsPromise;
5621
5934
  };
5935
+ const judge = new CfnProducerSecretJudge(client, ensureExports, label, fetchAllStackResources);
5936
+ const resolveImport = async (exportName) => {
5937
+ const map = await ensureExports();
5938
+ if (!map) return void 0;
5939
+ return map.get(exportName)?.value;
5940
+ };
5941
+ const resolveGetStackOutput = async (producerStack, producerRegion, outputName) => {
5942
+ logger.warn(`${label}: Fn::GetStackOutput ${displayUntrustedValue(producerStack)}.${displayUntrustedValue(outputName)} (${displayUntrustedValue(producerRegion)}) has no CloudFormation equivalent and cannot be resolved when reading state from a CloudFormation stack. Use Fn::ImportValue against an exported output instead.`);
5943
+ };
5622
5944
  return {
5623
- async resolveImport(exportName) {
5624
- const map = await ensureExports();
5625
- if (!map) return void 0;
5626
- return map.get(exportName);
5945
+ resolveImport,
5946
+ resolveGetStackOutput,
5947
+ async resolveImportJudged(exportName) {
5948
+ const value = await resolveImport(exportName);
5949
+ if (value === void 0) return { value };
5950
+ const judgement = await judge.judgeExport(exportName, value);
5951
+ return judgement === void 0 ? { value } : {
5952
+ value,
5953
+ ...judgement
5954
+ };
5627
5955
  },
5628
- async resolveGetStackOutput(producerStack, producerRegion, outputName) {
5629
- logger.warn(`${label}: Fn::GetStackOutput ${displayUntrustedValue(producerStack)}.${displayUntrustedValue(outputName)} (${displayUntrustedValue(producerRegion)}) has no CloudFormation equivalent and cannot be resolved when reading state from a CloudFormation stack. Use Fn::ImportValue against an exported output instead.`);
5630
- }
5956
+ resolveGetStackOutputJudged: async (producerStack, producerRegion, outputName) => ({ value: await resolveGetStackOutput(producerStack, producerRegion, outputName) })
5631
5957
  };
5632
5958
  }
5633
5959
  dispose() {
@@ -5688,7 +6014,7 @@ async function fetchAllStackResources(client, stackName) {
5688
6014
  } while (nextToken !== void 0 && nextToken !== "");
5689
6015
  return out;
5690
6016
  }
5691
- async function fetchAllExports(client) {
6017
+ async function fetchAllExportEntries(client) {
5692
6018
  const out = /* @__PURE__ */ new Map();
5693
6019
  let nextToken;
5694
6020
  let pages = 0;
@@ -5696,7 +6022,10 @@ async function fetchAllExports(client) {
5696
6022
  const resp = await client.send(new ListExportsCommand({ ...nextToken !== void 0 && { NextToken: nextToken } }));
5697
6023
  for (const exp of resp.Exports ?? []) {
5698
6024
  if (exp.Name === void 0 || exp.Value === void 0) continue;
5699
- out.set(exp.Name, exp.Value);
6025
+ out.set(exp.Name, {
6026
+ value: exp.Value,
6027
+ exportingStackId: exp.ExportingStackId
6028
+ });
5700
6029
  }
5701
6030
  nextToken = resp.NextToken;
5702
6031
  pages += 1;
@@ -6036,6 +6365,78 @@ function looksLikeAccessDenied(err) {
6036
6365
  return name === "AccessDeniedException" || code === "AccessDeniedException" || /access denied/i.test(message) || /not authorized/i.test(message);
6037
6366
  }
6038
6367
 
6368
+ // src/local/cross-stack-secret-check.ts
6369
+ const SECRET_MASK = "***";
6370
+ function crossStackSecretCheckOf(resolver) {
6371
+ if (resolver === void 0 || typeof resolver.resolveImportJudged !== "function" || typeof resolver.resolveGetStackOutputJudged !== "function") return;
6372
+ const r = resolver;
6373
+ return {
6374
+ resolveImportJudged: (exportName) => r.resolveImportJudged(exportName),
6375
+ resolveGetStackOutputJudged: (stack, region, output) => r.resolveGetStackOutputJudged(stack, region, output)
6376
+ };
6377
+ }
6378
+ function strongerJudgement(a, b) {
6379
+ if (a === void 0) return b;
6380
+ if (b === void 0) return a;
6381
+ if (b.verdict === "secret" && a.verdict !== "secret") return b;
6382
+ return a;
6383
+ }
6384
+ function judgementOf(judged) {
6385
+ const { verdict, detail } = judged;
6386
+ if (verdict === void 0) return void 0;
6387
+ if (verdict === "secret") return { verdict };
6388
+ const known = verdict === "unreadable" || verdict === "stale" ? verdict : "unreadable";
6389
+ return typeof detail === "string" ? {
6390
+ verdict: known,
6391
+ detail
6392
+ } : { verdict: known };
6393
+ }
6394
+ function judgedClause(judgement) {
6395
+ const bin = getEmbedConfig().binaryName;
6396
+ if (judgement.verdict === "secret") return "holding a secret of the producer stack";
6397
+ if (judgement.verdict === "stale") return `the producer stack no longer exports, so ${bin} could not check it for secrets`;
6398
+ return judgement.detail !== void 0 ? `${bin} could not check for secrets (${judgement.detail})` : `whose producer stack ${bin} could not read to check it for secrets`;
6399
+ }
6400
+ function crossStackSecretArgvReason(judgement) {
6401
+ return `resolved a cross-stack value ${judgedClause(judgement)}, which ${getEmbedConfig().binaryName} will not put on the docker run command line; pass the value through Environment instead`;
6402
+ }
6403
+ function crossStackSecretValueFromReason(judgement) {
6404
+ if (judgement.verdict === "secret") return "ValueFrom resolved a cross-stack value holding a secret of the producer stack, rather than naming a Secrets Manager secret or an SSM parameter";
6405
+ return `ValueFrom resolved a cross-stack value ${judgedClause(judgement)}`;
6406
+ }
6407
+ function watchResolved(context, secrets) {
6408
+ const seen = {
6409
+ masked: false,
6410
+ producerSecret: void 0
6411
+ };
6412
+ const inner = context.crossStackResolver;
6413
+ if (!inner) return {
6414
+ context,
6415
+ seen
6416
+ };
6417
+ const watch = (judged) => {
6418
+ const { value } = judged;
6419
+ if (value === void 0) return value;
6420
+ if (value === SECRET_MASK) seen.masked = true;
6421
+ seen.producerSecret = strongerJudgement(seen.producerSecret, judgementOf(judged));
6422
+ return value;
6423
+ };
6424
+ const resolver = secrets ? {
6425
+ resolveImport: async (exportName) => watch(await secrets.resolveImportJudged(exportName)),
6426
+ resolveGetStackOutput: async (stack, region, output) => watch(await secrets.resolveGetStackOutputJudged(stack, region, output))
6427
+ } : {
6428
+ resolveImport: async (exportName) => watch({ value: await inner.resolveImport(exportName) }),
6429
+ resolveGetStackOutput: async (stack, region, output) => watch({ value: await inner.resolveGetStackOutput(stack, region, output) })
6430
+ };
6431
+ return {
6432
+ context: {
6433
+ ...context,
6434
+ crossStackResolver: resolver
6435
+ },
6436
+ seen
6437
+ };
6438
+ }
6439
+
6039
6440
  // src/local/state-resolver.ts
6040
6441
  function substituteAgainstState(value, contextOrResources) {
6041
6442
  const context = isContext(contextOrResources) ? contextOrResources : { resources: contextOrResources };
@@ -6641,16 +7042,18 @@ async function substituteEnvVarsFromStateAsync(templateEnv, contextOrResources)
6641
7042
  audit
6642
7043
  };
6643
7044
  const context = isContext(contextOrResources) ? contextOrResources : { resources: contextOrResources };
7045
+ const producerSecrets = crossStackSecretCheckOf(context.crossStackResolver);
6644
7046
  for (const [key, value] of Object.entries(templateEnv)) {
6645
7047
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
6646
7048
  defineOwnKey(env, key, value);
6647
7049
  continue;
6648
7050
  }
6649
- const { result, consumedSensitive } = await resolveWithSensitivityAsync(value, context);
7051
+ const watched = watchResolved(context, producerSecrets);
7052
+ const { result, consumedSensitive } = await resolveWithSensitivityAsync(value, watched.context);
6650
7053
  if (result.kind === "literal") {
6651
7054
  defineOwnKey(env, key, result.value);
6652
7055
  audit.resolvedKeys.push(key);
6653
- if (consumedSensitive) audit.sensitiveKeys.push(key);
7056
+ if (consumedSensitive || watched.seen.producerSecret !== void 0) audit.sensitiveKeys.push(key);
6654
7057
  } else audit.unresolved.push({
6655
7058
  key,
6656
7059
  reason: result.reason
@@ -7294,21 +7697,13 @@ function resolveArgvArray(raw, field, subContext, context, unresolved) {
7294
7697
  });
7295
7698
  }
7296
7699
  const STATE_SECRET_MASK = "***";
7297
- const SECRET_ATTRIBUTE_NAME = /secret|password|credential/i;
7298
- const NON_SECRET_ATTRIBUTE_SUFFIX = /(arn|id|name|url|alias|status)$/i;
7299
- const SECRET_VALUED_ATTRIBUTES = /* @__PURE__ */ new Map([
7300
- ["AWS::AppSync::ApiKey", ["ApiKey"]],
7301
- ["AWS::EC2::IpamExternalResourceVerificationToken", ["TokenValue"]],
7302
- ["AWS::IVS::StreamKey", ["Value"]]
7303
- ]);
7304
7700
  function secretAttributeRead(element, stateResources) {
7305
7701
  for (const [logicalId, attribute] of getAttReads(element)) {
7306
7702
  const record = Object.hasOwn(stateResources, logicalId) ? stateResources[logicalId] : void 0;
7307
7703
  const recorded = record?.attributes;
7308
7704
  const stored = recorded && Object.hasOwn(recorded, attribute) ? recorded[attribute] : void 0;
7309
7705
  const type = typeof record?.resourceType === "string" ? record.resourceType : "";
7310
- const typed = SECRET_VALUED_ATTRIBUTES.get(type);
7311
- if (SECRET_ATTRIBUTE_NAME.test(attribute) && !NON_SECRET_ATTRIBUTE_SUFFIX.test(attribute) || typed?.includes(attribute) === true || type.startsWith("Custom::") || type === "AWS::CloudFormation::CustomResource" || type === "AWS::CloudFormation::Stack" && attribute.startsWith("Outputs.") || stored === STATE_SECRET_MASK) return `reads ${displayIdent(logicalId)}.${displayIdent(attribute)}, an attribute that is or may be a secret, which ${getEmbedConfig().binaryName} will not put on the docker run command line; pass the value through Environment or Secrets instead`;
7706
+ if (isSecretAttributeName(attribute) || isSecretValuedAttribute(type, attribute) || isCustomResourceType(type) || type === "AWS::CloudFormation::Stack" && attribute.startsWith("Outputs.") || stored === STATE_SECRET_MASK) return `reads ${displayIdent(logicalId)}.${displayIdent(attribute)}, an attribute that is or may be a secret, which ${getEmbedConfig().binaryName} will not put on the docker run command line; pass the value through Environment or Secrets instead`;
7312
7707
  }
7313
7708
  }
7314
7709
  function getAttReads(node, out = []) {
@@ -7354,20 +7749,17 @@ function computedAttributeRead(node) {
7354
7749
  if (r !== void 0) return r;
7355
7750
  }
7356
7751
  }
7357
- function withMaskWatch(context, masked) {
7358
- const inner = context.crossStackResolver;
7359
- if (!inner) return context;
7360
- const watch = (v) => {
7361
- if (v === STATE_SECRET_MASK) masked.hit = true;
7362
- return v;
7363
- };
7364
- return {
7365
- ...context,
7366
- crossStackResolver: {
7367
- resolveImport: async (exportName) => watch(await inner.resolveImport(exportName)),
7368
- resolveGetStackOutput: async (stack, region, output) => watch(await inner.resolveGetStackOutput(stack, region, output))
7369
- }
7370
- };
7752
+ const SECRET_POINTER_ARN = /^arn:aws(?:-[a-z]+)*:(?:secretsmanager:[a-z0-9-]+:\d{12}:secret:[A-Za-z0-9/_+=.@!-]+(?::[A-Za-z0-9/_+=.@-]*:[A-Za-z0-9/_+=.@-]*:[A-Za-z0-9/_+=.@-]*)?|ssm:[a-z0-9-]+:\d{12}:parameter\/[A-Za-z0-9/_.-]+)$/;
7753
+ function isSecretPointerArn(value) {
7754
+ return SECRET_POINTER_ARN.test(value);
7755
+ }
7756
+ function redropSecret(task, container, containerName, name, reason) {
7757
+ const own = `Secret ${displayIdent(name)} dropped:`;
7758
+ const line = `${own} ${reason}`;
7759
+ container.warnings = [...container.warnings.filter((w) => !w.startsWith(own)), line];
7760
+ const taskOwn = `Container ${displayIdent(containerName)}: ${own}`;
7761
+ task.warnings = [...task.warnings.filter((w) => !w.startsWith(taskOwn)), `Container ${displayIdent(containerName)}: ${line}`];
7762
+ if (!container.droppedSecretNames?.includes(name)) container.droppedSecretNames = [...container.droppedSecretNames ?? [], name];
7371
7763
  }
7372
7764
  const CROSS_STACK_ARGV_REASON = "a cross-stack reference (Fn::ImportValue / Fn::GetStackOutput): it resolves only from a state source with the producer stack deployed";
7373
7765
  function argvValue(sub, consumedSensitive) {
@@ -7724,6 +8116,7 @@ function withContainerState(context, state) {
7724
8116
  async function applyCrossStackResolverToTask(task, context, containerState) {
7725
8117
  if (!context.crossStackResolver) return;
7726
8118
  const { resolveDynamicReferences: _envOnly, ...secretContext } = context;
8119
+ const producerSecrets = crossStackSecretCheckOf(context.crossStackResolver);
7727
8120
  const rawContainers = (task.resource.Properties ?? {})["ContainerDefinitions"];
7728
8121
  if (!Array.isArray(rawContainers)) return;
7729
8122
  for (let idx = 0; idx < task.containers.length; idx += 1) {
@@ -7750,11 +8143,12 @@ async function applyCrossStackResolverToTask(task, context, containerState) {
7750
8143
  if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") continue;
7751
8144
  if (Object.hasOwn(container.environment, key)) continue;
7752
8145
  if (!isCrossStackIntrinsic(value)) continue;
7753
- const { result: sub, consumedSensitive } = await resolveWithSensitivityAsync(value, containerContext);
8146
+ const watched = watchResolved(containerContext, producerSecrets);
8147
+ const { result: sub, consumedSensitive } = await resolveWithSensitivityAsync(value, watched.context);
7754
8148
  if (sub.kind === "literal") {
7755
8149
  defineOwnKey(container.environment, key, String(sub.value));
7756
8150
  resolvedEnvKeys.add(key);
7757
- if (consumedSensitive && !container.sensitiveEnvKeys.includes(key)) container.sensitiveEnvKeys.push(key);
8151
+ if ((consumedSensitive || watched.seen.producerSecret !== void 0) && !container.sensitiveEnvKeys.includes(key)) container.sensitiveEnvKeys.push(key);
7758
8152
  }
7759
8153
  }
7760
8154
  if (Array.isArray(c["Secrets"])) for (const entry of c["Secrets"]) {
@@ -7766,7 +8160,12 @@ async function applyCrossStackResolverToTask(task, context, containerState) {
7766
8160
  if (typeof valueFromRaw === "string" && valueFromRaw.length > 0) continue;
7767
8161
  if (container.secrets.some((s) => s.name === sName)) continue;
7768
8162
  if (!isCrossStackIntrinsic(valueFromRaw)) continue;
7769
- const sub = await substituteAgainstStateAsync(valueFromRaw, ownState ? withContainerState(secretContext, ownState) : secretContext);
8163
+ const watched = watchResolved(ownState ? withContainerState(secretContext, ownState) : secretContext, producerSecrets);
8164
+ const sub = await substituteAgainstStateAsync(valueFromRaw, watched.context);
8165
+ if (watched.seen.producerSecret !== void 0 && !(watched.seen.producerSecret.verdict !== "secret" && sub.kind === "literal" && typeof sub.value === "string" && isSecretPointerArn(sub.value))) {
8166
+ redropSecret(task, container, containerName, sName, crossStackSecretValueFromReason(watched.seen.producerSecret));
8167
+ continue;
8168
+ }
7770
8169
  if (sub.kind === "literal" && typeof sub.value === "string" && sub.value.length > 0) {
7771
8170
  container.secrets.push({
7772
8171
  name: sName,
@@ -7793,9 +8192,9 @@ async function applyCrossStackResolverToTask(task, context, containerState) {
7793
8192
  });
7794
8193
  continue;
7795
8194
  }
7796
- const masked = { hit: false };
7797
- const { result: sub, consumedSensitive } = await resolveWithSensitivityAsync(rawElement, withMaskWatch(argvContext, masked));
7798
- const arg = masked.hit ? { reason: `resolved a cross-stack value recorded as the secret mask (${STATE_SECRET_MASK}), not the deployed value` } : argvValue(sub, consumedSensitive);
8195
+ const watched = watchResolved(argvContext, producerSecrets);
8196
+ const { result: sub, consumedSensitive } = await resolveWithSensitivityAsync(rawElement, watched.context);
8197
+ const arg = watched.seen.masked ? { reason: `resolved a cross-stack value recorded as the secret mask (${STATE_SECRET_MASK}), not the deployed value` } : watched.seen.producerSecret !== void 0 ? { reason: crossStackSecretArgvReason(watched.seen.producerSecret) } : argvValue(sub, consumedSensitive);
7799
8198
  if ("value" in arg) {
7800
8199
  target[u.index] = arg.value;
7801
8200
  continue;
@@ -17949,7 +18348,7 @@ function computeCodeImageTag(sourceDir, runtime, entryPoint, dockerfile) {
17949
18348
 
17950
18349
  // src/local/agentcore-s3-bundle.ts
17951
18350
  async function downloadAndExtractS3Bundle(location, options = {}) {
17952
- const ref = formatRef(location);
18351
+ const ref = formatRef(location, options.redactBucket);
17953
18352
  getLogger().info(`Downloading fromS3 code bundle ${ref}...`);
17954
18353
  const bytes = await (options.fetchObject ?? defaultFetchObject$1(options))(location);
17955
18354
  let files;
@@ -17984,9 +18383,9 @@ async function downloadAndExtractS3Bundle(location, options = {}) {
17984
18383
  }).then(() => void 0)
17985
18384
  };
17986
18385
  }
17987
- function formatRef(location) {
18386
+ function formatRef(location, redactBucket = false) {
17988
18387
  const version = location.versionId ? `?versionId=${flattenToOneLine(location.versionId)}` : "";
17989
- return `s3://${flattenToOneLine(location.bucket)}/${flattenToOneLine(location.key)}${version}`;
18388
+ return `s3://${redactBucket ? "<cross-stack value withheld>" : flattenToOneLine(location.bucket)}/${flattenToOneLine(location.key)}${version}`;
17990
18389
  }
17991
18390
  function resolveSafeEntryPath(root, entry) {
17992
18391
  const dest = normalize(join(root, entry));
@@ -18018,11 +18417,11 @@ function defaultFetchObject$1(options) {
18018
18417
  Key: location.key,
18019
18418
  ...location.versionId && { VersionId: location.versionId }
18020
18419
  }));
18021
- if (!res.Body) throw new CdkLocalError(`S3 GetObject for ${formatRef(location)} returned an empty body.`, "LOCAL_INVOKE_AGENTCORE_S3_BUNDLE_EMPTY_BODY");
18420
+ if (!res.Body) throw new CdkLocalError(`S3 GetObject for ${formatRef(location, options.redactBucket)} returned an empty body.`, "LOCAL_INVOKE_AGENTCORE_S3_BUNDLE_EMPTY_BODY");
18022
18421
  return await res.Body.transformToByteArray();
18023
18422
  } catch (err) {
18024
18423
  if (err instanceof CdkLocalError) throw err;
18025
- throw new CdkLocalError(`S3 GetObject for ${formatRef(location)} failed: ${describeAwsFailureForWarn(err, "S3 GetObject (fromS3 bundle)")}`, "LOCAL_INVOKE_AGENTCORE_S3_BUNDLE_FETCH_FAILED");
18424
+ throw new CdkLocalError(`S3 GetObject for ${formatRef(location, options.redactBucket)} failed: ${describeAwsFailureForWarn(err, "S3 GetObject (fromS3 bundle)")}`, "LOCAL_INVOKE_AGENTCORE_S3_BUNDLE_FETCH_FAILED");
18026
18425
  } finally {
18027
18426
  client.destroy();
18028
18427
  }
@@ -19003,7 +19402,8 @@ async function resolveAgentCoreCodeImageFromS3(resolved, code, s3Source, options
19003
19402
  workload: {
19004
19403
  logicalId: resolved.logicalId,
19005
19404
  cdkPath: readCdkPathOrUndefined(resolved.resource)
19006
- }
19405
+ },
19406
+ ...s3Source.bucketWithheld === true && { redactBucket: true }
19007
19407
  });
19008
19408
  try {
19009
19409
  return await buildAgentCoreCodeImage({
@@ -19119,11 +19519,14 @@ async function resolveFromS3BucketIntrinsic(resolved, stateProvider, loaded, ima
19119
19519
  };
19120
19520
  const crossStackResolver = await stateProvider.buildCrossStackResolver(loaded.region);
19121
19521
  if (crossStackResolver) subContext.crossStackResolver = crossStackResolver;
19122
- const result = await substituteAgainstStateAsync(s3Source.bucketIntrinsic, subContext);
19522
+ const watched = watchResolved(subContext, crossStackSecretCheckOf(subContext.crossStackResolver));
19523
+ const result = await substituteAgainstStateAsync(s3Source.bucketIntrinsic, watched.context);
19123
19524
  if (result.kind !== "literal") throw new CdkLocalError(`Could not resolve AgentCore Runtime ${displayIdent(resolved.logicalId)} fromS3 Code.S3.Bucket intrinsic (${displayUntrustedValue(describeIntrinsic(s3Source.bucketIntrinsic))}) against the --from-cfn-stack state: ${result.reason}. Confirm the referenced resource / export exists in the deployed stack.`, "LOCAL_INVOKE_AGENTCORE_FROMS3_BUCKET_INTRINSIC_UNRESOLVED");
19124
19525
  if (typeof result.value !== "string" || result.value.length === 0) throw new CdkLocalError(`AgentCore Runtime ${displayIdent(resolved.logicalId)} fromS3 Code.S3.Bucket intrinsic resolved to a ${typeof result.value} value, not a bucket name string. (${displayUntrustedValue(describeIntrinsic(s3Source.bucketIntrinsic))})`, "LOCAL_INVOKE_AGENTCORE_FROMS3_BUCKET_INTRINSIC_NOT_STRING");
19125
19526
  s3Source.bucket = result.value;
19126
- getLogger().info(`Resolved fromS3 Code.S3.Bucket from state: ${describeIntrinsic(s3Source.bucketIntrinsic)} -> ${result.value}`);
19527
+ const withheld = watched.seen.producerSecret !== void 0 || watched.seen.masked;
19528
+ if (withheld) s3Source.bucketWithheld = true;
19529
+ getLogger().info(withheld ? `Resolved fromS3 Code.S3.Bucket from state: ${describeIntrinsic(s3Source.bucketIntrinsic)} (value not shown: a cross-stack value its producer stack says may be a secret)` : `Resolved fromS3 Code.S3.Bucket from state: ${describeIntrinsic(s3Source.bucketIntrinsic)} -> ${result.value}`);
19127
19530
  }
19128
19531
  function describeIntrinsic(value) {
19129
19532
  if (!value || typeof value !== "object") return String(value);
@@ -37316,4 +37719,4 @@ function addStudioSpecificOptions(cmd) {
37316
37719
  }
37317
37720
 
37318
37721
  export { postHook as $, AGENTCORE_A2A_PROTOCOL as $a, probeHostGatewaySupport as $i, addImageOverrideOptions as $n, loopbackForwarderPlan as $o, resolveApiTargetSubset as $r, classifyS3Error as $t, microvmFidelityWarnings as A, createLocalStateProvider as Aa, translateLambdaResponse as Ai, stripCloudFrontImport as An, readEnvCallerCredentials as Ao, A2A_CONTAINER_PORT as Ar, readContainerLogTail as At, MICROVM_WS_BASE_PROTOCOL as B, resolveWatchConfig as Ba, ConnectionRegistry as Bi, createLocalStartAlbCommand as Bn, HOST_DEFAULT_CREDENTIALS_MISS_TTL_MS as Bo, AGENTCORE_SESSION_ID_HEADER as Br, parseWebFunctionBuildConfig as Bt, addListSpecificOptions as C, substituteAgainstState as Ca, attachAuthorizers as Ci, WEB_FUNCTION_REVISION_TYPE as Cn, resolveDynamicReferencesInEnv as Co, setShadowReadyTimeoutMs as Cr, parseKvsFileOverrides as Ct, buildMicrovmLambdaView as D, materializeLayerFromArn as Da, isFunctionUrlOacFronted as Di, compileCloudFrontFunction as Dn, SECOND_ASSUME_MESSAGE as Do, createLocalInvokeAgentCoreCommand as Dr, WEB_FUNCTION_CONTAINER_PORT as Dt, addStartMicrovmSpecificOptions as E, substituteEnvVarsFromStateAsync as Ea, buildCorsConfigFromCloudFrontChain as Ei, resolveWebFunctionTarget as En, awsEndpointOptions as Eo, addInvokeAgentCoreSpecificOptions as Er, RecentOutput as Et, microvmImageTag as F, resolveCfnRegion as Fa, pickResponseTemplate as Fi, findFileAssetForObjectKey as Fn, AUTH_OFF_PLACEHOLDER_CREDENTIALS as Fo, MCP_PROTOCOL_VERSION as Fr, buildNodeEntryFileStart as Ft, startMicrovmFrontDoor as G, discoverWebSocketApis as Ga, buildDisconnectEvent as Gi, addStartServiceSpecificOptions as Gn, collectHostEndpointOverrides as Go, SUPPORTED_CODE_RUNTIMES as Gr, readWebFunctionServiceConfig as Gt, PROXY_PORT_HEADER as H, countTargets as Ha, handleConnectionsRequest as Hi, resolveAlbTarget as Hn, applyWorkloadAwsWiringToEnv as Ho, waitForAgentCoreHttpReady as Hr, WEB_FUNCTION_HTTP_ENDPOINT_ENV as Ht, planMicrovmPorts as I, resolveCfnStackName as Ia, selectIntegrationResponse as Ii, isBucketDeploymentResource as In, CA_TRUST_ENV_KEYS as Io, mcpInvokeOnce as Ir, defaultWebFunctionPlatform as It, MICROVM_HOOK_PATH_PREFIX as J, parseSelectionExpressionPath as Ja, createFileWatcher as Ji, addRunTaskSpecificOptions as Jn, getActiveWorkloadAwsWiring as Jo, renderCodeDockerfile as Jr, idFromArn as Jt, stripMicrovmProxyHeaders as K, discoverWebSocketApisOrThrow as Ka, buildMessageEvent as Ki, createLocalStartServiceCommand as Kn, displayEndpointValue as Ko, buildAgentCoreCodeImage as Kr, webFunctionAssumeRole as Kt, readExposedPorts as L, CfnLocalStateProvider as La, tryParseStatus as Li, resolveBucketDeploymentObjectKey as Ln, DEFAULT_AWS_EMULATOR_URL as Lo, parseSseForJsonRpc as Lr, resolveWebFunctionRuntime as Lt, DEFAULT_TERMINATE_HOOK_TIMEOUT_MS as M, isCfnFlagPresent as Ma, buildHttpApiV2Event as Mi, createLocalFileKvsDataSource as Mn, resetWorkloadIdentity as Mo, a2aInvokeOnce as Mr, waitForWebFunctionReady as Mt, LocalMicrovm as N, rejectExplicitCfnStackWithMultipleStacks as Na, buildRestV1Event as Ni, createUnboundCloudFrontModule as Nn, workloadClientConfig as No, MCP_CONTAINER_PORT as Nr, watchContainerExit as Nt, createLocalStartMicrovmCommand as O, LocalStateSourceError as Oa, matchPreflight as Oi, runViewerRequest as On, assumedRoleRecorded as Oo, bridgeAgentCoreWs as Or, containerFailure as Ot, buildMicrovmImage as P, resolveCfnFallbackRegion as Pa, evaluateResponseParameters as Pi, bucketDeploymentSourceObjectKeys as Pn, workloadStsClientConfig as Po, MCP_PATH as Pr, WEB_FUNCTION_RUNTIMES as Pt, pollBuildHook as Q, resolveLambdaArnIntrinsic as Qa, HOST_GATEWAY_MIN_VERSION as Qi, addEcsAssumeRoleOptions as Qn, logMixedModeForWorkload as Qo, createWatchPredicates as Qr, resolveDeployedOriginBucket as Qt, setContainerPaused as R, collectSsmParameterRefs as Ra, VtlEvaluationError as Ri, addAlbSpecificOptions as Rn, EMULATOR_SCRUBBED_ENV_KEYS as Ro, AGENTCORE_SIGV4_SERVICE as Rr, supportedWebFunctionRuntimes as Rt, StudioEventBus as S, containsCrossStackIntrinsic as Sa, invokeTokenAuthorizer as Si, WEB_FUNCTION_ENDPOINT_TYPE as Sn, parseDynamicReference as So, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as Sr, normalizeKvsFileKeys as St, formatTargetListing as T, substituteEnvVarsFromState as Ta, buildCorsConfigByApiId as Ti, WebFunctionResolutionError as Tn, addAwsEndpointOptions as To, attachContainerLogStreamer as Tr, resolveCloudFrontTarget as Tt, rewriteUpgradeResponseHead as U, listTargets as Ua, parseConnectionsPath as Ui, isApplicationLoadBalancer as Un, awsEmulatorEnvName as Uo, waitForAgentCorePing as Ur, buildWebFunctionLambdaView as Ut, MicrovmStateError as V, resolveSingleTarget as Va, buildMgmtEndpointEnvUrl as Vi, parseLbPortOverrides as Vn, activateWorkloadAwsWiring as Vo, invokeAgentCore as Vr, resolveWebFunctionArtifact as Vt, selectTargetPort as W, availableWebSocketApiIdentifiers as Wa, buildConnectEvent as Wi, resolveAlbFrontDoor as Wn, awsEmulatorSqsHostBlocks as Wo, downloadAndExtractS3Bundle as Wr, finalizeWebFunctionEnv as Wt, callRuntimeHook as X, discoverRoutes as Xa, createLocalInvokeCommand as Xi, MAX_TASKS_SUBNET_RANGE_CAP as Xn, getContainerJavaTruststorePath as Xo, addStartApiSpecificOptions as Xr, createDeployedKvsDataSource as Xt, MicrovmHookError as Y, webSocketApiMatchesIdentifier as Ya, addInvokeSpecificOptions as Yi, createLocalRunTaskCommand as Yn, getContainerCaBundlePath as Yo, toCmdArgv as Yr, resolveKvsModulesForDistribution as Yt, generateMicrovmId as Z, pickRefLogicalId as Za, HOST_DOCKER_INTERNAL_GATEWAY as Zi, addCommonEcsServiceOptions as Zn, javaTruststoreToolOptions as Zo, createLocalStartApiCommand as Zr, resolveDeployedKvsArnByName as Zt, filterStudioTargetGroups as _, resolveRuntimeFileExtension as _a, verifyJwtViaDiscovery as _i, pickKvsLogicalIdFromArn as _n, containsDynamicReference as _o, isLocalCdkAssetImage as _r, sqsEmulatorOriginOf as _s, attachAgentCoreWsBridge as _t, createLocalStudioCommand as a, buildLoopbackForwarderDockerArgs as aa, filterRoutesByApiIdentifiers as ai, serveLambdaUrlOrigin as an, pickAgentCoreCandidateStack as ao, resolveSharedSidecarCredentials as ar, resolveAwsEmulatorOption as as, disposeMicrovmCodeArtifact as at, renderStudioHtml as b, assertEcsTaskCommandsResolved as ba, evaluateCachedLambdaPolicy as bi, pickWebFunctionEndpointLogicalIdFromOrigin as bn, keysNotFromTemplate as bo, CloudMapRegistry as br, buildStsClientConfig as bs, addStartCloudFrontSpecificOptions as bt, startStudioProxy as c, ensureForwarderImage as ca, startApiServer as ci, buildEdgeRequestEvent as cn, formatStateRemedy as co, buildImageOverrideTag as cr, setActiveWorkloadAwsWiring as cs, resolveMicrovmImageTarget as ct, createStudioDispatcher as d, buildContainerImage as da, defaultCredentialsLoader as di, httpHeadersToEdge as dn, LocalInvokeBuildError as do, mergeForService as dr, MIXED_MODE_RESIGN_BODY_CAP_BYTES as ds, createLocalStartWebFunctionCommand as dt, resolveHostGatewayExtraHosts as ea, createAuthorizerCache as ei, createS3OriginReader as en, AGENTCORE_AGUI_PROTOCOL as eo, buildEcsImageResolutionContext$1 as er, mergeJavaToolOptions as es, runHookBody as et, filterStudioCustomResources as f, dockerRegistryEnv as fa, buildCognitoJwksUrl as fi, CLOUDFRONT_DISTRIBUTION_TYPE as fn, ambientDefaultRegion as fo, parseImageOverrideFlags as fr, REAL_SQS_QUEUE_URL as fs, addStartAgentCoreSpecificOptions as ft, annotatePinnedEcsTargets as g, resolveRuntimeCodeMountPath as ga, verifyJwtAuthorizer as gi, pickFunctionUrlLogicalIdFromOrigin as gn, DynamicReferenceResolver as go, imageOverrideKeyAliases as gr, rewriteSqsQueueUrlsInEnv as gs, startAgentCoreHttpServer as gt, annotateEcsTaskPinnedTargets as h, stripEcrCredentials as ha, verifyCognitoJwt as hi, isCloudFrontDistribution as hn, DynamicReferenceResolutionError as ho, describePinnedImageUri as hr, repointLocalSqsQueueUrlsInEnv as hs, selectServeInboundAuth as ht, coerceStopRequest as i, awaitLoopbackForwarderStatus as ia, filterRoutesByApiIdentifier as ii, serveFromStaticOrigin as in, AgentCoreResolutionError as io, resolveEcsAssumeRoleOption as ir, readProfileEndpointSettings as is, MicrovmResolutionError as it, readRunHookPayload as j, groupWorkloadsRoutedApart as ja, applyAuthorizerOverlay as ji, createCloudFrontModule as jn, recordAssumedRole as jo, A2A_PATH as jr, startWebFunctionContainer as jt, finalizeMicrovmEnv as k, UNNAMED_WORKLOAD as ka, matchRoute as ki, runViewerResponse as kn, deployAccountStsClientConfig as ko, invokeAgentCoreWs as kr, planWebFunctionContainer as kt, relayServeRequest as l, startLoopbackForwarder as la, resolveSelectionExpression as li, buildEdgeResponseEvent as ln, substituteImagePlaceholders as lo, canonicalizeImageOverrideKeys as lr, takeAwsEmulatorStateSourceHint as ls, s3KeyOfUri as lt, annotateAlbPinnedBackingServices as m, noImplicitEcrPullArgs as ma, createJwksCache as mi, extractKvsAssociations as mn, setAmbientDefaultRegion as mo, runImageOverrideBuilds as mr, realSqsHostnames as ms, buildAgentCoreServeAuthCheck as mt, coerceRunRequest as n, withWorkloadAwsWiring as na, buildStageMap as ni, startCloudFrontServer as nn, AGENTCORE_MCP_PROTOCOL as no, parseMaxTasks as nr, probeAwsEmulatorHealth as ns, MICROVM_DEFAULT_INGRESS_PORT as nt, resolveServeBaseUrl as o, buildNamespaceOwnerForwarderDockerArgs as oa, groupRoutesByServer as oi, applyEdgeRequestResult as on, resolveAgentCoreTarget as oo, runEcsServiceEmulator as or, resolveHostDefaultCredentials as os, readMicrovmImageConfig as ot, isCustomResourceLambdaTarget as p, isEcrRegistryConfigKey as pa, buildJwksUrlFromIssuer as pi, describeS3OriginDomain as pn, namedEnvAwsRegion as po, resolveImageOverrides as pr, isRealAwsHost as ps, createLocalStartAgentCoreCommand as pt, MAX_RUN_HOOK_PAYLOAD_BYTES as q, filterWebSocketApisByIdentifiers as qa, classifySourceChange as qi, serviceStrategy as qn, effectiveLoopbackPorts as qo, computeCodeImageTag as qr, webFunctionFidelityWarnings as qt, coerceServeRequest as r, LOOPBACK_FORWARDER_IMAGE as ra, availableApiIdentifiers as ri, resolveErrorResponseCandidates as rn, AGENTCORE_RUNTIME_TYPE as ro, parseRestartPolicy as rr, readEmulatorRunFiles as rs, MICROVM_IMAGE_TYPE as rt, createStudioServeManager as s, describeForwarderFailure as sa, readMtlsMaterialsFromDisk as si, applyEdgeResponseResult as sn, derivePseudoParametersFromRegion as so, ImageOverrideError as sr, resolveWorkloadAwsWiring as ss, resolveMicrovmCodeArtifact as st, addStudioSpecificOptions as t, attachLoopbackForwarder as ta, attachStageContext as ti, matchBehavior as tn, AGENTCORE_HTTP_PROTOCOL as to, ecsClusterOption as tr, parseAwsEndpoint as ts, waitForAppAnswer as tt, reinvoke as u, architectureToPlatform as ua, resolveServiceIntegrationParameters as ui, edgeHeadersToHttp as un, tryResolveImageFnJoin as uo, enforceImageOverrideOrphans as ur, writeCaBundleFile as us, addStartWebFunctionSpecificOptions as ut, startStudioServer as v, resolveRuntimeImage as va, buildMethodArn as vi, pickLambdaEdgeFunctionLogicalId as vn, deployedFillMayBeSecret as vo, listPinnedTargets as vr, buildJavaTrustStore as vs, startAgentCoreWsBridge as vt, createLocalListCommand as w, substituteAgainstStateAsync as wa, applyCorsResponseHeaders as wi, WEB_FUNCTION_TYPE as wn, withoutKeys as wo, getContainerNetworkIp as wr, parseOriginOverrides as wt, createStudioStore as x, assertEcsTaskImagesResolvable as xa, invokeRequestAuthorizer as xi, resolveCloudFrontDistribution as xn, keysOverriddenBy as xo, DEFAULT_SHADOW_READY_TIMEOUT_MS as xr, resolveProfileCredentials as xs, createLocalStartCloudFrontCommand as xt, toStudioTargetGroups as y, EcsTaskResolutionError as ya, computeRequestIdentityHash as yi, pickTargetFunctionLogicalId as yn, firstUsableRegion as yo, buildCloudMapIndex as yr, createMixedModeTlsMaterials as ys, LocalStartCloudFrontError as yt, MICROVM_CONTROL_PATH as z, resolveSsmParameters as za, bufferToBody as zi, albStrategy as zn, HOST_CA_TRUST_ENV_KEYS as zo, signAgentCoreInvocation as zr, disposeWebFunctionArtifact as zt };
37319
- //# sourceMappingURL=local-studio-QpEYP98G.js.map
37722
+ //# sourceMappingURL=local-studio-D_aFesGK.js.map