Add secretEnv config for secure custom environment variable injection#182
Open
GrimmiMeloni wants to merge 3 commits intobbrowning:mainfrom
Open
Add secretEnv config for secure custom environment variable injection#182GrimmiMeloni wants to merge 3 commits intobbrowning:mainfrom
GrimmiMeloni wants to merge 3 commits intobbrowning:mainfrom
Conversation
Allow users to declare custom secret environment variable names in project config (paude.json or devcontainer.json). Values are read from the host's os.environ and injected securely via exec -e (Podman) or tmpfs (OpenShift), never appearing in the container spec. Config format: - paude.json: top-level "secretEnv": ["MY_TOKEN"] - devcontainer.json: "customizations.paude.secretEnv": ["MY_TOKEN"] Secret env var names are persisted as container labels (Podman) or StatefulSet annotations (OpenShift) so they survive across connect/start/upgrade operations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
secretEnv now accepts both formats:
- list: ["FOO"] → same name on host and container
- dict: {"CONTAINER_NAME": "HOST_NAME"} → rename on injection
This enables injecting host env vars under different names inside
the container, e.g. mapping a read-only token to the name an MCP
server expects:
"secretEnv": {"JIRA_API_TOKEN": "JIRA_TOKEN_READONLY"}
Serialization in labels/annotations uses compact format:
FOO,CONTAINER_NAME=HOST_NAME
Also adds validation that names cannot contain commas or equals
signs (used as serialization separators).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove list format support (never published) to align with devcontainer conventions. Add documentation to CONFIGURATION.md, SECURITY.md, and OPENSHIFT.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
Hmm - I'm in the process of removing all secrets entirely from the main paude container and instead encoding them into https://github.com/bbrowning/paude-proxy (credential injecting proxy, so the untrusted agent container never sees any real secret anywhere). I don't yet know how long it will take to replace squid with the new paude-proxy, so will need to think on this. |
Owner
|
I like the spirit of this, and as the secrets move from the main paude container to the paude-proxy container I think there will still be a use/place for this once that lands. The secrets still have to get injected - they'll just never be visible to the container running the coding agent anymore and instead injected by the proxy in front of it. |
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
secretEnvconfiguration option (inpaude.jsonordevcontainer.json) to securely inject host environment variables into container sessions without exposing them in container specs or process listingsCONTAINER_NAME: HOST_NAME) so host and container variable names can differ🤖 Generated with Claude Code