Repository navigation
fix(secret): keep piped multi-line secrets and mask them - #489
Merged
Merged
Conversation
Bump tuikit to v0.5.1 and vault to v0.4.1. tuikit now reads a lone masked field to EOF, so `printf 'a\nb\n' | flow secret set NAME` stores the value byte for byte instead of its first line, and the piped-input summary prints the value as a mask instead of plaintext. The secret value field is now required, so an empty pipe fails instead of storing an empty secret. Fixes #478
Member
Author
|
Verification
Worth a close look
Out of scope (follow-up)
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The multiline value prompt now reads stdin to EOF, so a pipe left open blocked the spec until GC closed the writer, about 120s later.
Member
Author
|
Follow-up: the |
# Conflicts: # go.mod # go.sum
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
flow secret set NAMEwith the value piped on stdin kept only the first line, so a PEM key or JSON credential was silently truncated. The piped-input summary also printed the masked value in plaintext, soecho "$SECRET" | flow secret set NAMEwrote the secret to stdout, where a CI log or an agent transcript would capture it. Both came from how tuikit's form reads piped input, and are fixed there.Notable Changes
********. Confirm and text prompts still read one line, soyes | flow vault remove Xor a stdin held open by a parent process does not block.secret setvalue field is required, so an empty pipe fails instead of storing an empty secret.Fixes #478