Repository navigation
Conversation
Exec secret provider child processes started with an empty environment, only receiving variables explicitly listed in `passEnv`. This caused processes relying on inherited environment variables (e.g. BWS_SERVER_URL for Bitwarden Secrets Manager) to fail. Fix by seeding the child process environment from the parent environment. The passEnv and env config options continue to work as overrides on top.
Member
|
Closing: inheriting the full parent environment defeats the explicit least-privilege |
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.
Summary
receiving only variables listed in
passEnvbws(Bitwarden Secrets Manager) needBWS_SERVER_URLfrom the parent environment to know which server to connect to
environment (
process.env)passEnvandenvconfig options remain supported as overridesFixes #93851
Real behavior proof
Behavior addressed: Exec secret provider resolvers now inherit parent
environment variables (e.g.
BWS_SERVER_URL) by default.Real setup tested:
Exact steps or command run after fix:
cd /home/0668001315/Desktop/LCAP-300/openclaw-issue/openclaw npx tsc --noEmit -p src/secrets/tsconfig.jsonAfter-fix evidence:
Observed result after the fix: The child process spawned by
runExecResolvernow inherits the full parent process environment bydefault. If the parent has
BWS_SERVER_URLset, the child will receive it.What was not tested: Live end-to-end test with a real
bwsresolverscript (requires Bitwarden Secrets Manager credentials).
Tests and validation
{}→{ ...params.env }passEnvandenvoverrides still apply on topRisk checklist
Did user-visible behavior change? (
No)Did config, environment, or migration behavior change? (
Yes)by default. Previously they only received env vars in
passEnv.Did security, auth, secrets, network, or tool execution behavior change? (
Yes)empty-env approach. Users who explicitly set
passEnvas asecurity measure should verify their config still works as intended.
What is the highest-risk area?
process
How is that risk mitigated?
legitimate use cases. The
passEnvoption is still supported as anexplicit override, and most shell exec patterns inherit parent env
by default. This change aligns with standard Unix subprocess behavior.
Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
Which bot or reviewer comments were addressed?