Repository navigation
Scope delivered secrets to declared steps - #668
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Critical impact] The PR appears safe to merge; no new blocking issue was found.
|
313f9dd to
f22f146
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a7364e. Configure here.

Summary
Add per-step secret grants to authored
f.run,f.agent, andf.llmoptions and declarative specs. Only names enter the spec. The kernel filters delivered secrets from each deterministic child environment; agent and LLM CLIs, including Relay communication agents, receive their own model login plus explicitly granted other user-delivered secrets. Unknown, malformed, duplicate, and unavailable names fail closed.On a daemon with
step_secret_scoping, plain agent and LLM steps use a clean environment by default, even when no step declares a grant. The environment retains system variables, trusted repository git/gh setup and hardening, and model login for the selected CLI, including delivered login names. Cloud will mark the exact Bedrock login names it selected in the CLI-onlyRELAY_PLATFORM_AGENT_ENV_NAMESJSON array; the SDK accepts only known Bedrock names for Claude. It keeps the marker out ofrun.start/run.resumeand child processes.An SDK talking to the currently pinned older runtime still admits plain runs with delivered secrets. It refuses only a step with a nonempty grant when the daemon lacks
step_secret_scoping. Upgrading the runtime changes the environment of existing ungranted agent/LLM steps and removes ungranted delivered secrets from deterministic children; flows relying on such secrets must declare them.This PR is rebased on main through #669 and #670 and can merge independently of #667. It touches deterministic lowering and
run.start, which #667 also touches; that conflict was resolved in a local combined-branch check.Threat model
RELAY_SECRET_ENV_NAMESmanifest alongside runenvSecrets. Values remain in the run's in-memory environment and never enter step specs, journals, or logs.envSecretsand supply the Bedrock marker only for active Bedrock login.RELAYFLOW_V2_SIGNAL_READ_TOKENis refused as a step grant, excluded fromrun.start/run.resume, and stripped from agent children on both capability paths. Cloud must also launch the daemon with--det-withhold RELAYFLOW_V2_SIGNAL_READ_TOKEN. Relay communication CLIs continue to clear broker credentials; Relay-transport agent steps cannot request grants./proc/<pid>/environon Linux or read CLI login files underHOME. Environment filtering is not process isolation; UID and filesystem isolation remain follow-up work in AgentWorkforce/cloud#4715.Release order
envSecrets, derive the CLI-only Bedrock marker from active delivered Bedrock values insiderelayflowV2ChildEnvironments, and launch the daemon with--det-withhold RELAYFLOW_V2_SIGNAL_READ_TOKENbefore signal token issuance. Older SDKs ignore the marker.f.runenvironments in release notes.Verification
npm run typecheck,npm run typecheck:tests, andnpm run buildpassed.rustfmt --edition 2024 --checkonexec_det.rsandgit diff --checkpassed. The Rust fallback now handles non-UTF-8 process environment entries without panicking. The scoped agent child test also confirmsRELAY_AGENT_TOKENis absent.f22f146ed30809d31505535d4992db4831f8f7fd, including the full SDK suite and exact artifact smoke.Review-thread fixes (
dcf807d0)kernelStepToAuthoring.Selected CLI login compatibility (
0d9b7a34)GH_TOKEN.Bedrock selection guard (
4a7364ed)RELAY_PLATFORM_AGENT_ENV_NAMES.Full-suite CI call shape (
99ee8235)budget-preflight,cli-probe, andstep-secretspass 54/54 locally; both SDK typechecks pass.Communication provider login (
74fb6c47)AWS_*,GOOGLE_API_KEY, andGOOGLE_APPLICATION_CREDENTIALSremain grant-only; delivered repository names remain filtered.Agent Relay sessions
codexsession01a14312· opened viagh pr create· last active 2026-10-16