Skip to content

fix(secrets): secrets validate ignores ${VAR} mentioned only in comments (39) - #361

Open
vsilent wants to merge 2 commits into
devfrom
fix/secrets-validate-comments-39
Open

vsilent wants to merge 2 commits into
devfrom
fix/secrets-validate-comments-39

Conversation

@vsilent

@vsilent vsilent commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

What

BUGS.md #39: stacker secrets validate scanned raw text, so a ${VAR} that appears only inside a YAML comment failed the whole stack — and every pipeline gating on the command with it (exit 1).

How

References are collected from parsed YAML scalars (keys and values): comments drop out naturally, while block-scalar content — where # is literal text — still counts. Unparseable YAML falls back to the old raw scan.

Tests

Red→green (red reproduced the entry's exact BASE_PATH failure): comment-only references are ignored, block-scalar content is still checked, the fallback keeps working. The old test suite is untouched and green.

Verify

In BUGS.md #39 ("How to verify"): a # ${BASE_PATH}/... comment alone must leave stacker secrets validate at exit 0.

robotizeit and others added 2 commits November 20, 2026 12:31
…nts (39)

The validator scanned raw text, so a variable that appears exclusively inside
a YAML comment failed the whole stack — and every pipeline gating on
`stacker secrets validate` with it. References are now collected from parsed
scalars (keys and values), which drops comments naturally while still
counting block-scalar content where '#' is literal text; unparseable YAML
falls back to the old raw scan.

Co-Authored-By: Claude Opus 5 <noreply@claude.com>

This branch has not been deployed

No deployments
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