Skip to content

feat(generate): S6 (part) — secret:// env values become valueless keys - #41

Merged
gustavobertoi merged 1 commit into
mainfrom
nightly/S6-generate
Jun 29, 2026
Merged

feat(generate): S6 (part) — secret:// env values become valueless keys#41
gustavobertoi merged 1 commit into
mainfrom
nightly/S6-generate

Conversation

@gustavobertoi

Copy link
Copy Markdown
Contributor

Chunk S6 (part) — close the secret:// env leak

A secret:// ref in env.raw/env.prefixed was being written into the generated compose as its literal value (the ref string). Now projectEnv detects it and emits a valueless key (DB_PASSWORD: null) — same coupling as the existing import-secretAttrs path — so neither the ref nor (later) its resolved value reaches a generated file. The runtime value is injected via the compose-up process env (the saga secrets phase = the remaining S6 half: collect → batched Resolve → Compose.Env).

Non-secret env values are still interpolated + emitted verbatim. Golden + determinism unchanged.

Test

A secret:// env.raw value → DB_PASSWORD: null, no secret:// anywhere in the output; a sibling plain value survives.

Gate

make ci + make determinism green.

🤖 Generated with Claude Code

…s (spec 04 §7.5)

Close a real leak: a `secret://` reference in env.raw/env.prefixed was previously
emitted into the generated compose as its literal value (the ref string). Now
projectEnv detects a secret:// value and emits a VALUELESS key (null) — exactly
like the existing import-secretAttrs coupling — so neither the ref nor (later)
its resolved value ever lands in a generated file. The runtime value is injected
via the compose-up process env (the saga's secrets phase, the remaining S6 half:
collect refs → batched Resolve → Compose.Env).

Non-secret env values are still interpolated + emitted verbatim. Golden +
determinism unchanged (the fixture uses import-secretAttrs, not secret:// env).

Leak test: a secret:// env.raw value yields `DB_PASSWORD: null` with no
`secret://` anywhere in the output; a sibling plain value survives.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gustavobertoi
gustavobertoi merged commit 05c147b into main Jun 29, 2026
2 checks passed
@gustavobertoi
gustavobertoi deleted the nightly/S6-generate branch June 29, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant