Skip to content

Keep ${VAR} references when stripping generated secrets from templates - #285

Merged
vsilent merged 1 commit into
devfrom
fix/keep-env-references-in-templates
Oct 15, 2026
Merged

vsilent merged 1 commit into
devfrom
fix/keep-env-references-in-templates

Conversation

@vsilent

@vsilent vsilent commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

strip_generated_field_values blanks every value of a generated/provided field before a template is stored, so the author's secrets never ship. It also blanked values that only name another variable, like AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}. That reference is how one generated secret feeds two services; without it each key is regenerated on its own and the app and MinIO get different values.

A value that is exactly ${NAME} or $NAME is now kept, in all five shapes the stripper handles (JSON map, JSON key/value pair, JSON and YAML K=V lists, YAML map). ${NAME:-default} is still blanked: the default can be the secret itself.

Tests: helpers::redact strip_*_keeps_references_to_other_variables (fail before the fix). lib 2240 passed, marketplace and field-policy integration 64 passed, BDD 334 scenarios passed.

Claude-Session: https://claude.ai/code/session_012TKZy6f5shPzM9WLdswH6f

strip_generated_field_values blanks every value of a generated/provided
field before a template is stored, so the author's secrets never ship. It
also blanked values that only name another variable, like
AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}. That reference is how one
generated secret feeds two services; without it each key is regenerated
on its own and the app and MinIO get different values.

A value that is exactly ${NAME} or $NAME is now kept, in all five shapes
the stripper handles (JSON map, JSON key/value pair, JSON and YAML K=V
lists, YAML map). ${NAME:-default} is still blanked: the default can be
the secret itself.

Tests: helpers::redact strip_*_keeps_references_to_other_variables (fail
before the fix). lib 2240 passed, marketplace and field-policy integration
64 passed, BDD 334 scenarios passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012TKZy6f5shPzM9WLdswH6f
@vsilent
vsilent merged commit 5cc1cac into dev Oct 15, 2026
9 of 10 checks passed
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.

2 participants