You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
agy: execute_bash strips CA bundle, spec.env, GIT_ASKPASS, and AX_METADATA_URL #35
agy/worker.go forwards SSL_CERT_FILE and the task's environment (with Gemini/Google API credentials removed) to gemini-api environments connect, so the Go worker itself trusts AX's egress CA bundle. However, bash commands run by the agent through execute_bash run in an allowlisted environment that drops everything outside baseline OS and locale variables.
internal/cli/custom/envruntime/shell.go defaults EnvPolicy to EnvPolicyAllowlist, which runs BuildAllowlistEnv and retains only PATH, HOME, USER, LOGNAME, SHELL, LANG, TERM, TMPDIR, LC_*, and Windows baseline variables.
Impact inside AX sandboxes
execute_bash commands fail TLS verification against any AX Gateway https: egress rule, because SSL_CERT_FILE, CURL_CA_BUNDLE, REQUESTS_CA_BUNDLE, NODE_EXTRA_CA_CERTS, and GIT_SSL_CAINFO are stripped and /run/ate/egress-trust-bundle/trust-bundle.pem is not in the Debian system trust store.
GIT_ASKPASS, GIT_TERMINAL_PROMPT, and AX_METADATA_URL are stripped, so git cannot use AX's askpass helper and bash tools cannot read AX_METADATA_URL.
Any variables passed in Task.spec.env are invisible inside execute_bash.
Reproduced live with ax-antigravity + gemini-api v0.5.0 by running printenv SSL_CERT_FILE AX_TEST_ENV_VAR AX_METADATA_URL GIT_ASKPASS; echo DONE via execute_bash with all four set in the harness environment; all four printed empty.
Fix direction
envruntime in gemini-api-cli already implements EnvPolicyScrubCredentials, which keeps the process environment minus Gemini/Google credential variables, but envruntime is an internal package and environments connect / environments serve do not expose an --env-policy flag yet. Expose an env-policy flag upstream in google-gemini/gemini-api-cli and pass it from agy/worker.go (preserving AX_CA_BUNDLE / CA bundle vars as well while still stripping API and environment keys).
Activity