Repository navigation
fix(bicep): emit sandbox egress parameters from the PowerShell assembler - #374
Open
jlinenkohl wants to merge 1 commit into
Open
jlinenkohl wants to merge 1 commit into
jlinenkohl wants to merge 1 commit into
Conversation
bicep/assemble-agent.sh passes seven egress parameters to the template -- egressMode, allowedHosts, allowedRegistries, allowedCodeRepositories, allowHttpMcpServerNetworkAccess, usePrivateDnsResolution and vnetSubnetId -- reading each from .networkConfiguration in agent.json. bicep/Assemble-Agent.ps1 emits none of them. A clone taken through the PowerShell path therefore cannot inherit its source's egress configuration at all: whatever the export contains, the deployment falls back to the template default. Cloning an agent running Limited behind a 13-host allowlist produced parameters of egressMode null with an empty host list. This is the mirror of the two bash-side divergences fixed earlier in this series. Each implementation is ahead of the other in different places, so the fix in both directions is to adopt what the other already does. Properties are probed rather than dereferenced because the script runs under StrictMode and an export predating the networkConfiguration key would otherwise throw. Verified against an export of an agent running Limited: the assembled parameters now carry egressMode Limited, 13 allowed hosts, 4 registries and 3 code-repository kinds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bicep/assemble-agent.sh passes seven egress parameters to the template -- egressMode, allowedHosts, allowedRegistries, allowedCodeRepositories, allowHttpMcpServerNetworkAccess, usePrivateDnsResolution and vnetSubnetId -- reading each from .networkConfiguration in agent.json.
bicep/Assemble-Agent.ps1 emits none of them. A clone taken through the PowerShell path therefore cannot inherit its source's egress configuration at all: whatever the export contains, the deployment falls back to the template default. Cloning an agent running Limited behind a 13-host allowlist produced parameters of egressMode null with an empty host list.
This is the mirror of the two bash-side divergences fixed earlier in this series. Each implementation is ahead of the other in different places, so the fix in both directions is to adopt what the other already does.
Properties are probed rather than dereferenced because the script runs under StrictMode and an export predating the networkConfiguration key would otherwise throw.
Verified against an export of an agent running Limited: the assembled parameters now carry egressMode Limited, 13 allowed hosts, 4 registries and 3 code-repository kinds.