Repository navigation
fix(#3373)!: block credential-class env.sandbox names; case-fold runner-secret refusal - #8496
Conversation
E2E tests did not runE2E tests run automatically for pull requests authored by users with write access or higher. For other contributors, a maintainer with write access must add the See E2E testing guide for details. |
PR Summary by QodoBlock credential-class environment keys from env.sandbox
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Site previewPreview: https://7240d86b-site.fullsend-ai.workers.dev Commit: |
Code Review by Qodo
1.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Address review comments on PR fullsend-ai#8496 without changing the deny-list or export-filtering behavior. Remove the stale claim that OpenShell injects HTTPS_PROXY and retain only the conditional pi compatibility warning. The pinned OpenShell version strips ambient proxy variables before child execution. Replace the generic .env.d and nonexistent-field migration advice with a link to deployment-aware guidance. Corporate proxy settings belong with the OpenShell gateway operator; the documented chaining covers policy-approved TLS CONNECT, not every application proxy use. Extra CA configuration must preserve OpenShell trust and account for the supervisor's separate upstream verification. Define OIDC and TLS, explain the ASCII identifier rule, number the conditional lock-check steps, and qualify the guide as selected-name filtering rather than complete protection against every equivalent. Add regression assertions for the migration warning. Focused CLI and sandbox tests pass with -race -count=1, staged lint passes, and approximate branch patch coverage is 40/40 changed instrumented lines. This validates the code and source-backed guidance, not live gateway connectivity. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Address review comments on PR fullsend-ai#8496 without changing the deny-list or export-filtering behavior. Remove the stale claim that OpenShell injects HTTPS_PROXY and retain only the conditional pi compatibility warning. The pinned OpenShell version strips ambient proxy variables before child execution. Replace the generic .env.d and nonexistent-field migration advice with a link to deployment-aware guidance. Corporate proxy settings belong with the OpenShell gateway operator; the documented chaining covers policy-approved TLS CONNECT, not every application proxy use. Extra CA configuration must preserve OpenShell trust and account for the supervisor's separate upstream verification. Define OIDC and TLS, explain the ASCII identifier rule, number the conditional lock-check steps, and qualify the guide as selected-name filtering rather than complete protection against every equivalent. Add regression assertions for the migration warning. Focused CLI and sandbox tests pass with -race -count=1, staged lint passes, and approximate branch patch coverage is 40/40 changed instrumented lines. This validates the code and source-backed guidance, not live gateway connectivity. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
waynesun09
left a comment
There was a problem hiding this comment.
One new finding after the rebase, on the version of the OpenShell docs the guide links (inline).
waynesun09
left a comment
There was a problem hiding this comment.
Three new findings at head 5e2a752 (inline): the BREAKING CHANGE trailer, the .env.d sourcing claim, and the ADR 0136 note.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 9:06 AM UTC · Completed 9:26 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $4.14 |
|
<!-- fullsend:risk-assessment --> DetailsElevated risk due to a breaking security hardening change modifying existing sandbox behavior without a feature flag, coupled with high recent churn and multi-author contention across core CLI runner files. |
ReviewFindingsMedium
Low
Labels: PR hardens sandbox environment handling in the Go harness runner with security impact. |
…andbox Fixes fullsend-ai#3373 Align env.sandbox filtering with the credential-key deny-list used for URL-sourced provider definitions. Of its 32 names, 25 were previously exportable through env.sandbox; the other seven were already reserved. The existing trusted-local-provider exception is unchanged. Expose a sorted copy through sandbox.ReservedCredentialKeys() and merge it into the CLI's existing blocklist at init, retaining the runner, OIDC and provider-only restrictions. Match reserved names case-insensitively so lowercase and mixed-case spellings cannot bypass the merged list. The export gate and diagnostics use the same reserved-name predicate and validate identifiers before matching them. Include load-time diagnostics with this behavior change so operators can identify settings that will no longer be exported. fullsend run and fullsend lock name reserved keys when they load the composed harness; the existing per-key stderr warnings remain at environment generation. Current lock entries still skip composition and dependency resolution. They report that diagnostics were skipped and point to --update, which re-resolves dependencies and may modify the lock file. Keep the runner-secret bundle check on its own name set. The merged credential names are dangerous inside the sandbox child but legitimate as host-side runner-secret keys (proxy, TLS trust and Git settings for pre_script and post_script), and reading the widened map at that door would refuse them and stop every run carrying such a bundle. The runner-secret refusal keeps the runner infrastructure names, the OIDC and provider-only keys and the runner-owned prefixes (now including DYLD_), and matches case-insensitively like the env.sandbox gate so a lowercase key such as path cannot slip past. Drift tests pin both doors: credential-only names stay allowed as runner-secret keys, and every non-credential sandbox-reserved name stays refused. Accepted ADR 0136 gains a clarifying note that its refused-name rule covers the runner-infrastructure names. The reproduction test follows the live accessor so additions remain covered. NotEmpty rejects an empty result; separate accessor-contract and explicit-name tests detect omissions and policy shrinkage. Tests also cover copy isolation, ordering, case variants, invalid identifiers, allowed exports and the real run/lock call sites. Cache-hit regressions cover single-agent and --all use without rewriting the lock, and an --update regression checks reserved keys from both a base and child. Later commits in fullsend-ai#8496 check the deny-list beside the blocklist instead of merging it, let the runner-secret refusal read the blocklist again, drop the lock cache-hit notice, and record the name-set split in ADR 0145. Focused regressions passed with -race -count=1. Lint and commit hooks passed. Approximate patch coverage is 41/41 changed instrumented lines. BREAKING CHANGE: env.sandbox no longer exports the additional reserved proxy, TLS trust, Git, interpreter, loader and shell-behavior names. Matching is now case-insensitive for all reserved names. Audit harness YAML, shared bases and per-agent overrides before upgrading. Affected entries are skipped with warnings rather than rejecting the entire harness; tools may subsequently fail without the requested settings. Migrate proxy and certificate settings to the operator-managed OpenShell gateway configuration: the upstream proxy settings and proxy_ca_bundle. The migration guide's Migrating proxy and certificate settings section covers this. fullsend's own GitHub Action writes gateway.toml from a fixed template and has no proxy or CA input yet; fullsend-ai#8505 tracks adding one. .env.d is not a migration path for proxy or certificate settings. For Git settings, use supported tool configuration or trusted host_files. Every launch and the runner's in-sandbox probes read .env.d as data: only assignment lines are taken, and LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, every PYTHON* variable, BASH_ENV, ENV and IFS are never taken from it, so moving a loader or shell export there does not preserve it. Direct/raw runner-credential exports remain restricted; supported provider-only GH_WORKFLOW_TOKEN use is unchanged and supplies a placeholder inside the sandbox. Runner-secret bundle keys and env.runner keys receiving a runner secret are now matched case-insensitively against the refused names and DYLD_* is a refused family, so a bundle key such as path or github_token now fails validation. Credential-class names such as HTTPS_PROXY stay accepted as runner-secret keys. The name-set split between the sandbox gate and the runner-secret refusal is recorded in ADR 0145, added later in fullsend-ai#8496, which amends ADR 0136's refused-name rule. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Address review comments on PR fullsend-ai#8496 without changing the deny-list or export-filtering behavior. Remove the stale claim that OpenShell injects HTTPS_PROXY and retain only the conditional pi compatibility warning. The pinned OpenShell version strips ambient proxy variables before child execution. Replace the generic .env.d and nonexistent-field migration advice with a link to deployment-aware guidance. Corporate proxy settings belong with the OpenShell gateway operator; the documented chaining covers policy-approved TLS CONNECT, not every application proxy use. Extra CA configuration must preserve OpenShell trust and account for the supervisor's separate upstream verification. Define OIDC and TLS, explain the ASCII identifier rule, number the conditional lock-check steps, and qualify the guide as selected-name filtering rather than complete protection against every equivalent. Add regression assertions for the migration warning. Focused CLI and sandbox tests pass with -race -count=1, staged lint passes, and approximate branch patch coverage is 40/40 changed instrumented lines. This validates the code and source-backed guidance, not live gateway connectivity. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
….sandbox gate Fold the review follow-ups on PR fullsend-ai#8496 into one commit. Check the credential deny-list in isReservedSandboxKey through a new sandbox.IsReservedCredentialKey instead of merging it into reservedSandboxKeys at init. The merge had forced runnerSecretNameRefused onto its own copy of the runner-infrastructure names, with keep-in-sync notes in two files and a drift test guarding the copy. With the merge gone, runnerSecretNameRefused reads reservedSandboxKeys again, as on main; relative to main its refused set still gains only the case fold and the DYLD_ family. Tests that read the merged map now call isReservedSandboxKey or enumerate both lists, and the per-name sweep that re-proved the shared predicate is dropped. Drop the lock cache-hit diagnostics notice. It printed a warning for every up-to-date agent on every `fullsend lock` run, whether or not the harness had an env.sandbox block, which made the normal result of `lock --all` on a current repo a list of warnings. `fullsend run` reports reserved keys when the harness loads, and `lock --update` composes the harness and reports them; the guide says a current entry is not composed and points to --update. Because `lock` composes without event context, the guide, the CLI reference and the command table now say that a key added by an event-guarded overlay is reported only by `fullsend run`. Record the decision in a new ADR 0145 instead of a note on accepted ADR 0136: the credential deny-list stays out of the runner-secret refusal, which keeps reading the sandbox environment blocklist, matches case-insensitively and refuses the DYLD_ family. The ADR carries an Amends line for 0136, ADR 0136 gets the italic Amended-by paragraph under its Status that every other amended ADR carries, and docs/architecture.md lists the decision next to the 0136 paragraph. Drop the guide's claim that .env.d is sourced as shell. Since main's fullsend-ai#8498 and fullsend-ai#8574, every launch and the runner's in-sandbox probes read .env.d as data and take only assignment lines; .env itself stays valid shell an agent may source. The guide says so and links the harness reference entry that carries the per-runtime rules. Document the load-time and per-key warnings in docs/cli/run.md and note the lock behavior in docs/cli/README.md; the CLI reference pages are maintained by hand and mentioned none of it. Give the harness reference an env.sandbox field-details entry beside env.runner's, cross-link the local-run guide's Lock files section to the reserved-keys section, and extend the migration section with the Git and interpreter-name classes the deny-list also drops. Fold the pass-through delivery check into TestGuideNamesMatchTheGate's carve-out branch, so every name the guide promises is delivered is also exported in practice, and drop the separate test that repeated it. Use sandbox.IsReservedCredentialKey in the provider doors instead of their inline copies of its body, and drop the zsh rationale for the runner-secret case fold: zsh does not import a lowercase path from the environment, so consistency with the env.sandbox gate is the reason. Name the runner-secret bundle, its staging path and the GitLab trigger account token in the guide's reserved-name note; they were reserved but unlisted. Give that note its own heading so the CLI reference and the harness reference link to the list rather than to the PATH section, and say in the accessor's doc comment that it exists for cross-package tests. Describe the runner's own FULLSEND_* exports in the guide's reserved-name note as a family instead of listing them, and send its .env.d sentence to the harness reference's entry instead of repeating the dropped names, so the note does not go stale when the runner gains an export or the loader's drop set changes; the guide test's floor follows the shorter list. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
|
On the review at
A re-run of |
… blocklist Reproduction test for fullsend-ai#3373 (reproduced). Evidence: TestReservedSandboxKeys_CoversReservedCredentialKeys: 25/32 subtests fail — reservedSandboxKeys omits HTTP_PROXY HTTPS_PROXY NODE_OPTIONS PYTHONPATH PROMPT_COMMAND IFS CDPATH LD_AUDIT DYLD_INSERT_LIBRARIES SSL_CERT_FILE/DIR CURL_CA_BUNDLE NODE_EXTRA_CA_CERTS HOSTALIASES GIT_SSH_COMMAND GIT_ASKPASS GIT_CONFIG_GLOBAL GIT_EXEC_PATH GIT_TEMPLATE_DIR JAVA_TOOL_OPTIONS RUBYOPT PERL5OPT PYTHONSTARTUP NO_PROXY ALL_PROXY; buildSandboxEnvLines emits e.g. export GIT_SSH_COMMAND='/tmp/evil'. 7 original infra keys (PATH HOME SHELL LD_PRELOAD LD_LIBRARY_PATH BASH_ENV ENV) pass. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…andbox Fixes fullsend-ai#3373 Align env.sandbox filtering with the credential-key deny-list used for URL-sourced provider definitions. Of its 32 names, 25 were previously exportable through env.sandbox; the other seven were already reserved. The existing trusted-local-provider exception is unchanged. Expose a sorted copy through sandbox.ReservedCredentialKeys() and merge it into the CLI's existing blocklist at init, retaining the runner, OIDC and provider-only restrictions. Match reserved names case-insensitively so lowercase and mixed-case spellings cannot bypass the merged list. The export gate and diagnostics use the same reserved-name predicate and validate identifiers before matching them. Include load-time diagnostics with this behavior change so operators can identify settings that will no longer be exported. fullsend run and fullsend lock name reserved keys when they load the composed harness; the existing per-key stderr warnings remain at environment generation. Current lock entries still skip composition and dependency resolution. They report that diagnostics were skipped and point to --update, which re-resolves dependencies and may modify the lock file. Keep the runner-secret bundle check on its own name set. The merged credential names are dangerous inside the sandbox child but legitimate as host-side runner-secret keys (proxy, TLS trust and Git settings for pre_script and post_script), and reading the widened map at that door would refuse them and stop every run carrying such a bundle. The runner-secret refusal keeps the runner infrastructure names, the OIDC and provider-only keys and the runner-owned prefixes (now including DYLD_), and matches case-insensitively like the env.sandbox gate so a lowercase key such as path cannot slip past. Drift tests pin both doors: credential-only names stay allowed as runner-secret keys, and every non-credential sandbox-reserved name stays refused. Accepted ADR 0136 gains a clarifying note that its refused-name rule covers the runner-infrastructure names. The reproduction test follows the live accessor so additions remain covered. NotEmpty rejects an empty result; separate accessor-contract and explicit-name tests detect omissions and policy shrinkage. Tests also cover copy isolation, ordering, case variants, invalid identifiers, allowed exports and the real run/lock call sites. Cache-hit regressions cover single-agent and --all use without rewriting the lock, and an --update regression checks reserved keys from both a base and child. Later commits in fullsend-ai#8496 check the deny-list beside the blocklist instead of merging it, let the runner-secret refusal read the blocklist again, drop the lock cache-hit notice, and record the name-set split in ADR 0145. Focused regressions passed with -race -count=1. Lint and commit hooks passed. Approximate patch coverage is 41/41 changed instrumented lines. BREAKING CHANGE: env.sandbox no longer exports the additional reserved proxy, TLS trust, Git, interpreter, loader and shell-behavior names. Matching is now case-insensitive for all reserved names. Audit harness YAML, shared bases and per-agent overrides before upgrading. Affected entries are skipped with warnings rather than rejecting the entire harness; tools may subsequently fail without the requested settings. Migrate proxy and certificate settings to the operator-managed OpenShell gateway configuration: the upstream proxy settings and proxy_ca_bundle. The migration guide's Migrating proxy and certificate settings section covers this. fullsend's own GitHub Action writes gateway.toml from a fixed template and has no proxy or CA input yet; fullsend-ai#8505 tracks adding one. .env.d is not a migration path for proxy or certificate settings. For Git settings, use supported tool configuration or trusted host_files. Every launch and the runner's in-sandbox probes read .env.d as data: only assignment lines are taken, and LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, every PYTHON* variable, BASH_ENV, ENV and IFS are never taken from it, so moving a loader or shell export there does not preserve it. Direct/raw runner-credential exports remain restricted; supported provider-only GH_WORKFLOW_TOKEN use is unchanged and supplies a placeholder inside the sandbox. Runner-secret bundle keys and env.runner keys receiving a runner secret are now matched case-insensitively against the refused names and DYLD_* is a refused family, so a bundle key such as path or github_token now fails validation. Credential-class names such as HTTPS_PROXY stay accepted as runner-secret keys. The name-set split between the sandbox gate and the runner-secret refusal is recorded in ADR 0145, added later in fullsend-ai#8496, which amends ADR 0136's refused-name rule. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Address review comments on PR fullsend-ai#8496 without changing the deny-list or export-filtering behavior. Remove the stale claim that OpenShell injects HTTPS_PROXY and retain only the conditional pi compatibility warning. The pinned OpenShell version strips ambient proxy variables before child execution. Replace the generic .env.d and nonexistent-field migration advice with a link to deployment-aware guidance. Corporate proxy settings belong with the OpenShell gateway operator; the documented chaining covers policy-approved TLS CONNECT, not every application proxy use. Extra CA configuration must preserve OpenShell trust and account for the supervisor's separate upstream verification. Define OIDC and TLS, explain the ASCII identifier rule, number the conditional lock-check steps, and qualify the guide as selected-name filtering rather than complete protection against every equivalent. Add regression assertions for the migration warning. Focused CLI and sandbox tests pass with -race -count=1, staged lint passes, and approximate branch patch coverage is 40/40 changed instrumented lines. This validates the code and source-backed guidance, not live gateway connectivity. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Address the review finding that the GitHub Action writes its gateway config from a fixed template with no proxy or CA input. Add the limitation to the guide's migration section so Actions users behind a corporate proxy know there is no configuration step available yet. The GitLab VM executor preserves an operator-configured gateway.toml and is not affected the same way. The follow-up for an Action proxy input is tracked in fullsend-ai#8505. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…ependent Address the review finding that the migration guide linked the OpenShell v0.1.2 gateway configuration reference while the branch pins 0.1.4. The two releases differ on the exact field the guide sends readers to look up: the Docker driver section documents only `https_proxy` at v0.1.2 and carries `proxy_ca_bundle` and `proxy_connect_by_hostname` from v0.1.3 on, so a Docker reader following the v0.1.2 link to check where that field was supported was told it does not exist. Retarget the link at `main` and link the script that records the pinned version, instead of writing a version into the URL, the link text and the prose. A version tag in a doc is a third copy of the pin and nothing keeps it in step: the Renovate rule that bumps `OPENSHELL_VERSION` is fileFiltered to the script, and the guide copy manager from fullsend-ai#4808 covers only `running-agents-locally.md`. Repinning here would have left the next routine dependency bump red rather than updating the link. This follows how `running-agents-locally.md` already refers to the pin. Replace the "where supported" hedge, written for the release where Docker was the one driver missing the field, with the `https_proxy` requirement the reference carries. Correct the bundle's placement for Kubernetes: there the reference documents it as a path in the gateway Pod that Helm mounts from a ConfigMap, not a host path, so a host-path instruction would send a Kubernetes operator to a hostPath. Verified against the upstream reference at `main`. Link this section from `harness-reference.md` and the operations guide, which state the block but had no route to where the settings go instead. No guard test is added. A doc tag compared with `OPENSHELL_VERSION` would alarm on every bump without any way to fix itself, and with no version in the doc the drift class is gone. Focused CLI regressions pass with -race -count=1, including TestGuideNamesMatchTheGate over the edited note, and the doc lint hooks pass on the delta. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
….sandbox gate Fold the review follow-ups on PR fullsend-ai#8496 into one commit. Check the credential deny-list in isReservedSandboxKey through a new sandbox.IsReservedCredentialKey instead of merging it into reservedSandboxKeys at init. The merge had forced runnerSecretNameRefused onto its own copy of the runner-infrastructure names, with keep-in-sync notes in two files and a drift test guarding the copy. With the merge gone, runnerSecretNameRefused reads reservedSandboxKeys again, as on main; relative to main its refused set still gains only the case fold and the DYLD_ family. Tests that read the merged map now call isReservedSandboxKey or enumerate both lists, and the per-name sweep that re-proved the shared predicate is dropped. Drop the lock cache-hit diagnostics notice. It printed a warning for every up-to-date agent on every `fullsend lock` run, whether or not the harness had an env.sandbox block, which made the normal result of `lock --all` on a current repo a list of warnings. `fullsend run` reports reserved keys when the harness loads, and `lock --update` composes the harness and reports them; the guide says a current entry is not composed and points to --update. Because `lock` composes without event context, the guide, the CLI reference and the command table now say that a key added by an event-guarded overlay is reported only by `fullsend run`. Record the decision in a new ADR 0145 instead of a note on accepted ADR 0136: the credential deny-list stays out of the runner-secret refusal, which keeps reading the sandbox environment blocklist, matches case-insensitively and refuses the DYLD_ family. The ADR carries an Amends line for 0136, ADR 0136 gets the italic Amended-by paragraph under its Status that every other amended ADR carries, and docs/architecture.md lists the decision next to the 0136 paragraph. Drop the guide's claim that .env.d is sourced as shell. Since main's fullsend-ai#8498 and fullsend-ai#8574, every launch and the runner's in-sandbox probes read .env.d as data and take only assignment lines; .env itself stays valid shell an agent may source. The guide says so and links the harness reference entry that carries the per-runtime rules. Document the load-time and per-key warnings in docs/cli/run.md and note the lock behavior in docs/cli/README.md; the CLI reference pages are maintained by hand and mentioned none of it. Give the harness reference an env.sandbox field-details entry beside env.runner's, cross-link the local-run guide's Lock files section to the reserved-keys section, and extend the migration section with the Git and interpreter-name classes the deny-list also drops. Fold the pass-through delivery check into TestGuideNamesMatchTheGate's carve-out branch, so every name the guide promises is delivered is also exported in practice, and drop the separate test that repeated it. Use sandbox.IsReservedCredentialKey in the provider doors instead of their inline copies of its body, and drop the zsh rationale for the runner-secret case fold: zsh does not import a lowercase path from the environment, so consistency with the env.sandbox gate is the reason. Name the runner-secret bundle, its staging path and the GitLab trigger account token in the guide's reserved-name note; they were reserved but unlisted. Give that note its own heading so the CLI reference and the harness reference link to the list rather than to the PATH section, and say in the accessor's doc comment that it exists for cross-package tests. Describe the runner's own FULLSEND_* exports in the guide's reserved-name note as a family instead of listing them, and send its .env.d sentence to the harness reference's entry instead of repeating the dropped names, so the note does not go stale when the runner gains an export or the loader's drop set changes; the guide test's floor follows the shorter list. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…teway version The migration guide linked the OpenShell gateway configuration reference at main. fullsend pins OpenShell 0.1.4, and the reference at main already documents settings the pinned gateway lacks: additional_ca_bundle, which OpenShell 0.1.5 adds for Podman gateways, appears twice at main and not at v0.1.4. A reader migrating SSL_CERT_FILE or NODE_EXTRA_CA_CERTS would find that key and set it on a gateway that rejects it. Link the v0.1.4 tag, the version openshell-version.sh pins, so the reference matches the gateway fullsend ships; a Renovate manager in the next commit moves the tag with the pin. Say in the certificate bullet that the linked tag is what the pinned gateway supports, and that where that tag lacks additional_ca_bundle a private CA used without a corporate proxy has no gateway-level replacement for SSL_CERT_FILE or NODE_EXTRA_CA_CERTS. That sentence is written against the linked tag, so it stays true after the pin moves. Found in review of 08ada39 by waynesun09. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…gents guide link The previous commit pins the OpenShell gateway configuration link in docs/guides/user/customizing-agents.md to the tag openshell-version.sh pins. Renovate updated that pin file and the two copies in running-agents-locally.md (fullsend-ai#4808) but nothing rewrote a tag inside a link, so the next OpenShell bump would leave the link one version behind the gateway again. Add a regex customManager for the link with the same depName, datasource and extractVersionTemplate as the fullsend-ai#4808 manager, so the tag moves in the same openshell group PR. Automerge and postUpgradeTasks are unchanged. Checked that the matchString finds exactly one value in the guide, the pinned 0.1.4, with both a JavaScript RegExp and Python re, and that the file pattern matches the guide path. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
waynesun09
left a comment
There was a problem hiding this comment.
One new finding at head c249eca (inline): ADR 0145 status and PR title versus the open runner-secret scope question.
waynesun09
left a comment
There was a problem hiding this comment.
Approving at c249eca.
Runner-secret scope: OK to keep in this PR. That covers the case-insensitive runnerSecretNameRefused, the DYLD_ prefix, ADR 0145 and the 0136 Amended-by line, so 0145 can stay Accepted. It fails closed, and fullsend-ai/agents main has no runner-secret bundle and no lowercase env.runner keys.
Before merge, please retitle so the release notes carry both breaks, for example:
fix(#3373)!: block credential-class env.sandbox names; case-fold runner-secret refusal
Validated locally at this head:
go build ./...,go vetandgo testpass forinternal/cliandinternal/sandbox.pre-commit runover the PR range passes, including the ADR checks and markdown links.- The branch merges cleanly with main.
- A built
fullsend lockon a harness withhttps_proxyandDYLD_INSERT_LIBRARIESinenv.sandboxprints the documented reserved-key warning (the lowercase name is caught) and leaves other keys alone.
The earlier threads are addressed at this head.
Summary
Close the credential-name filtering gap in
env.sandboxand report theconfiguration entries affected by the change. Reserved-name matching is now
case-insensitive, with migration guidance for existing harnesses. The
runner-secret bundle check does not read the credential deny-list, so
host-side proxy and CA configuration keeps working.
Related Issue
Closes #3373
Problem
The
env.sandboxblocklist had drifted from the credential-key deny-list usedfor URL-sourced provider definitions. Of the 32 names on that credential list,
25 could still be exported through
env.sandbox.The gate also matched names case-sensitively. Checking the credential list
without changing that lookup would block
HTTPS_PROXYwhile continuing toaccept
https_proxy.This PR closes that name-list gap. It does not change the existing
trusted-local-provider exception or replace the broader sandbox security model.
Changes
sandbox.IsReservedCredentialKey()and
sandbox.ReservedCredentialKeys(), a sorted copy rather than mutablepolicy state.
env.sandboxgate beside the existing sandboxenvironment blocklist, which keeps its runner, OIDC and provider-only
restrictions. The deny-list is not merged into that blocklist.
enforcement and diagnostics.
still reads the sandbox environment blocklist, so credential-class names
stay usable as host-side runner secrets.
refuse
DYLD_*there as the macOS counterpart ofLD_*.fullsend runorfullsend lockloads the composedharness.
runner-secret keys while
env.sandboxrefuses them, and every name inboth lists is stored uppercase so the case fold can match it.
pinned version, so a dependency bump cannot leave it pointing at the wrong
release, and point the harness reference and the operations guide at that
migration section.
docs/cli/run.md,docs/cli/README.md), give the harness reference anenv.sandboxfield-details entry beside the
env.runnerone, and cross-link the "Lockfiles" section of the local-run guide to the reserved-keys section.
images/sandbox/Containerfile(a protected path):the pi floor note said the OpenShell sandbox "always" sets
HTTPS_PROXY,which the pinned OpenShell does not do (it strips proxy variables). Comment
only, no image change; raised and confirmed in the review thread on the
same claim in
run.go.runner-secret refusal", which amends ADR 0136's refused-name rule and
settles that door's name set: no deny-list, case-insensitive matching, and
the
DYLD_*family. ADR 0136 gets only the italic Amended-by paragraphunder its Status that other amended ADRs carry.
Numbers 0143 and 0144 are claimed by open PRs docs(#8421): record entity-source discovery requirements for ADR 0098 #8559 and docs(adr): define poll and entity-bound run lifecycles #8616, so this
ADR takes 0145; it was renumbered once already for the same reason.
Breaking change and adopter impact
BREAKING CHANGE: Previously accepted
env.sandboxentries may no longer reach the sandbox.The affected settings include:
HTTP_PROXY,HTTPS_PROXY,NO_PROXY,ALL_PROXYSSL_CERT_FILE,SSL_CERT_DIR,CURL_CA_BUNDLE,NODE_EXTRA_CA_CERTSGIT_SSH_COMMAND,GIT_CONFIG_GLOBAL,GIT_EXEC_PATH,GIT_ASKPASS,GIT_TEMPLATE_DIRNODE_OPTIONS,PYTHONPATH,JAVA_TOOL_OPTIONS,LD_AUDIT,IFS,PROMPT_COMMANDand the other credential-denied namesThe expansion adds 25 canonical names. Lowercase and mixed-case variants of
all reserved names are now blocked too. Existing restrictions on uppercase
names such as
PATH,HOMEand runner-only credentials are not new.Runner-secret bundle keys and
env.runnerkeys that receive a runner secretare matched case-insensitively against the refused names, and
DYLD_*is arefused family. A bundle containing a key like
pathorgithub_tokennowfails validation. Credential-class names such as
HTTPS_PROXY,SSL_CERT_FILEand
GIT_SSH_COMMANDare accepted as runner-secret keys, as on main beforethis PR; only the case variants of runner-owned names and the
DYLD_*familyare new there.
Beyond the issue: runner-secret door tightening (needs maintainer sign-off)
Three things in this PR go past the literal scope of #3373, all at the
runner-secret door (ADR 0136) rather than the
env.sandboxgate:runnerSecretNameRefusedmatches case-insensitively, sopathorgithub_tokenis refused likePATHorGITHUB_TOKEN.DYLD_*is a refused family there, the macOS counterpart ofLD_*.(
env.sandboxstill refuses onlyDYLD_INSERT_LIBRARIES, the one name onthe credential list.)
They came out of the review thread on the runner-secret door, where keeping a
wider refusal with docs and tests was one of the two options offered. I kept
them because they fail closed and the two doors now match. If you would rather
they ship separately, say so and I will split them and ADR 0145 into a
follow-up PR.
Alternate Git and TLS controls that are not on the credential list (
GIT_SSH,GIT_CONFIG_*,REQUESTS_CA_BUNDLE,GIT_SSL_NO_VERIFYand the rest) remainaccepted for now; see #8503 for the follow-up. An AI security pass over the
final head found a few more names where the plugin-env door and
env.sandboxstill disagree (tool-specific proxy names and git command-execution names);
those go on #8503 as well.
The gate skips affected exports and emits warnings; it does not reject the
entire harness solely because those keys are present. An affected agent may
therefore start but later encounter changed proxy routing, TLS failures, Git
authentication failures or missing tool configuration.
The affected population has not been measured. Adopters not using these settings
through
env.sandboxdo not need a configuration migration for this change.Adopters relying on them, particularly through a shared base harness, should
audit their configuration before upgrading. The fleet harnesses in
fullsend-ai/agents set none of the newly reserved names under
env.sandbox,use no lowercase
env.runnerkeys, and do not use the runner-secret bundle(checked against that repo's current main), so the fleet needs no migration.
Migration
configuration for the version and compute driver you deploy, rather than
restoring application proxy exports through
.env.d. TheOpenShell gateway configuration reference
at the pinned tag documents policy-approved TLS CONNECT proxy chaining;
fullsend records the version it pins in
.github/scripts/openshell-version.shat your release tag.
Plain-HTTP destination traffic stays direct. This is not a fullsend harness
field or a general replacement for every
HTTP_PROXYorALL_PROXYuse.GitHub Action users: the Action writes its
gateway.tomlfrom a fixedtemplate with no proxy or CA settings, and has no input for them yet. See
Add proxy and CA configuration inputs to the fullsend GitHub Action #8505 for the planned Action proxy input.
and other required roots in workload trust, and account for the supervisor's
separate upstream TLS verification. Follow the selected driver's certificate
provisioning instructions in that reference, which documents
proxy_ca_bundlefor a corporate proxy. It requireshttps_proxyand, onKubernetes, is a path in the gateway Pod rather than the host. Replacing a
generated bundle with a custom-only file, or changing only the agent image's
trust store, is not a verified general migration. Have the gateway operator
validate both trust paths. The linked tag is what the pinned gateway
supports: where it lacks
additional_ca_bundle(OpenShell 0.1.5, Podmangateways), a private CA used without a corporate proxy has no gateway-level
replacement for
SSL_CERT_FILEorNODE_EXTRA_CA_CERTS.host_files(a git config orshell rc file the tools load) or use the tool's own configuration. Every
launch and the runner's probes read
.env.das data and take onlyassignment lines;
.envitself is still shell an agent may source, sokeep treating these files like
pre_script. Git and TLS equivalents notyet on the list are tracked in Harden sandbox environment policy for alternate Git and TLS controls #8503.
into the sandbox. Which of them
host_files.env.dstill delivers differsby runtime (the harness reference's
.env.dhost files entry lists whateach runtime drops or unsets), and whatever it delivers it does so only
because that file is trusted like
pre_script. Do not assume moving anexport to
.env.dpreserves it: the dynamic-loader, interpreter andshell-startup variables that entry lists are never taken from it on any
runtime, and Claude and codex also unset several of these names at launch.
env.sandboxremain available as runner-secret bundle keys referenced fromenv.runnerfor host-side scripts (pre_script,post_script,validation_loop). They do not reach the sandbox child.supported provider-only use of
GH_WORKFLOW_TOKEN, such ascredentials.GITHUB_TOKEN: ${GH_WORKFLOW_TOKEN}for GitHub Packages, isunchanged. That route supplies a provider placeholder, not the raw runner
token, inside the sandbox.
blanket ban on
FULLSEND_*,*_TOKENor custom application variables.Documented hook inputs remain supported.
Skipping an
env.sandboxexport does not unset a value supplied through anothermechanism. Enforcement takes effect immediately on upgrade; this PR does not add
a warning-only grace period or compatibility flag.
Release notes
The release body is built from PR titles, and the title names only
env.sandbox, so here is the highlight text for the release cutter to lift.It covers the three user-visible breaks in this PR:
Why the diagnostics are included
We should not widen a security blocklist without telling operators which
configuration stopped taking effect.
The existing per-key stderr warning appears while
fullsend runwrites thesandbox environment. The new diagnostic surfaces reserved keys earlier,
alongside other harness warnings, and during harness composition by
fullsend lock.A current lock entry still skips composition and dependency resolution, so its
keys are not checked. To obtain the composed-key warnings, use:
--updatealso re-resolves dependencies and may modify the lock file. It isnot a diagnostics-only flag.
lockalso composes without event context, so anenv.sandboxkey added by an overlay guarded oneventis reported only byfullsend run; the guide and the CLI reference say so.Testing
Coverage includes:
delivery and not only against the predicate.
--updatediagnostics for reserved keys from both a base and child harness.infrastructure and loader names refused at both, and case-insensitive
matching at the runner-secret door.
The reproducer uses live enumeration to follow additions.
NotEmptyguardsagainst an empty accessor result; separate accessor-contract and explicit-name
tests protect completeness and existing membership.
At the reproduction commit (
07a6ec0f0, thetest(#3373)commit of this branch), this command exercises 32 cases, of which25 fail:
The same selector passes at the fix. HEAD adds independent infrastructure pins,
so its subtest count differs from the historical test.
Validation results at the current head (rebased onto current
main, whichnow includes #8574's change to read
.envas data on every runtime):regressions pass with
-race -count=1, and the fullinternal/sandboxsuite passes.
make lintpassed after staging the changes.(
isReservedSandboxKey,buildSandboxEnvLines,reservedSandboxEnvDiagnostics,runnerSecretNameRefused,sandbox.ReservedCredentialKeys,sandbox.IsReservedCredentialKey) reports100% in
go tool cover -func; the one changed line inlockOneAgentisexercised by
TestLockOneAgent_ReportsReservedSandboxEnvKeys.TestGuideNamesMatchTheGatestill passes over the edited guide, so the prosechanges left every named reserved key consistent with the gate.
TestRunGatewayRefresh_PendingHandOff*cases fail in a fulllocal
internal/clirun on this host. They fail identically in a cleanworktree at
origin/mainwithout these changes, so they are not from thisbranch; the
testcheck is the signal for them.Review rounds
After the last human round I had the AI review the branch (a multi-dimension
PR review plus the repo's ADR conventions check), fixed what it found, and
repeated the review until it came back clean, again after rebasing onto
current main, and once more as a fresh full pass before this push. Fixes
that came out of those rounds:
fix(#3373)!commit message (its trailer carries the GitHub Actioncaveat and its body names what later commits changed);
Amends:line, and ADR 0136 carrying the Amended-by paragraph under itsStatus instead of a note;
env.sandboxentry and the rewrapped "Refusednames" bullet, the Git and interpreter classes in the migration section,
the
lockevent-context caveat, and the "Lock files" cross-link;staging path and the GitLab trigger-account token, which the gate already
dropped but the list left out;
import a lowercase
pathfrom the environment; the reason is consistencywith the
env.sandboxgate);IsReservedCredentialKeyreused in the two provider doors, and three testtrims: a sweep that re-proved the shared predicate, a duplicate pass-through
test folded into the guide test, and a mutation probe on a fresh slice.
The remaining notes were advisory and are either kept on purpose (the
guide-parsing test, the per-key loop in the diagnostic, the lock test file's
placement) or filed on #8503 (more equivalent names, and the GitLab pre-auth
variable filter as a fifth door to reconcile).
A last pass scanned the open PRs for ones that touch the same lines, names or
headings. Two coupled lists came out of it, and both are now described by
rule instead of repeated: the guide's
.env.dsentence points at the harnessreference's
.env.dhost files entry rather than naming the droppedvariables (#8610 rewrites that entry to cover every
LD_*name), and thereserved-name note describes the runner's own
FULLSEND_*exports as afamily rather than listing them (#7007 and #7451 add
FULLSEND_RUN_HEAD_SHA,FULLSEND_RUN_STARTED_ATandFULLSEND_STEER_ACTIVEto the reserved set).The guide-parsing test's floor moved with the shorter list. One textual
overlap remains for whoever lands second: #7966 (
fullsend lint, draft)edits the same lint loop in
run.goand the samelockrow indocs/cli/README.md; once it lands,reservedSandboxEnvDiagnosticsbelongsin
fullsend linttoo. ADR 0145 is free in every open PR as of this push.Round five (waynesun09, on
08ada39cb): the OpenShell link atmainshowedadditional_ca_bundle, which the pinned 0.1.4 lacks. Two commits on top:the guide links the
v0.1.4tag and says the linked tag is what the pinnedgateway supports, and
renovate.jsongains a regex manager (the #4808pattern) so the tag moves with the pin in the same openshell group PR.
Checklist
make lintpasses (changes staged first).!for the breaking change.BREAKING CHANGE:trailer with migration guidance.paragraph under its Status (the fix commit's interim clarifying note is
replaced by it in the last commit); the new decision is recorded in
ADR 0145, which amends it.