Name both output modes of the variable listing - #25
Merged
Conversation
The warning described the captured form, where a value prints in full, and read as though it described the terminal form, where the column is truncated. Both emit values, and the captured one is what an audit keeps. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Clarifies the audit guidance around gh variable list output behavior to explicitly distinguish terminal (TTY) vs captured/piped output, reducing the risk of unintentionally logging GitHub Actions variable values during audits.
Changes:
- Updates the
AUDIT.mdguidance to state thatgh variable listshows a value column in terminal output and emits full values when output is captured. - Strengthens the recommendation to avoid requesting
valuevia JSON output and to avoidgh variable view(which prints a value by design).
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.
From the promotion review, which disputed the claim that the bare variable listing prints values.
Measured on
gh 2.46.0: it prints them in both modes. The terminal form renders aVALUEcolumn and truncates long entries; the piped form emits each value in full. Piped is what an audit run produces, since its output is captured rather than watched, so the guarded case is the more exposed of the two.The original sentence described the captured form while reading like a claim about the terminal one, which is what made the finding reasonable. It now says which mode does what.
Also takes the sound half of the suggestion: never request the
valuefield, and never usegh variable view, which prints one by design.--json namealone would not stop someone reaching for--json name,valueto make the output more useful.🤖 Generated with Claude Code