Skip to content

Add hide_outputs input to suppress command output from Actions log#48

Merged
eriksw merged 2 commits intomainfrom
copilot/add-hide-outputs-variable
Mar 10, 2026
Merged

Add hide_outputs input to suppress command output from Actions log#48
eriksw merged 2 commits intomainfrom
copilot/add-hide-outputs-variable

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

Commands that emit sensitive data (secrets, tokens) to stdout/stderr have no way to prevent that output from appearing in the GitHub Actions log, while still making it available to downstream steps via output files.

Changes

  • action.yml: New hide_outputs boolean input (default: false). When true, stdout/stderr are written only to the output files and not forwarded to process.stdout/process.stderr.
  • src/main.ts: Reads hide_outputs input and passes it as { hideOutputs } to executeCommand(). Updated executeCommand() signature to accept an options object and conditionally skip piping to process streams.
  • README.md: Documents the new input and adds a usage example.

Example

- name: Fetch Secret Data
  id: fetch
  uses: retailnext/exec-action@main
  with:
    command: 'my-tool --output-secret'
    hide_outputs: 'true'

- name: Process Secret Data
  run: process-data < "${{ steps.fetch.outputs.stdout_file }}"

Output is hidden from the workflow log but remains accessible to subsequent steps via stdout_file / stderr_file.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: eriksw <24530198+eriksw@users.noreply.github.com>
Copilot AI changed the title [WIP] Add hide_outputs boolean variable for sensitive outputs Add hide_outputs input to suppress command output from Actions log Mar 9, 2026
@eriksw eriksw marked this pull request as ready for review March 9, 2026 22:57
@eriksw eriksw enabled auto-merge March 9, 2026 22:57
@eriksw eriksw requested a review from i1snow March 9, 2026 22:58
@eriksw eriksw merged commit 4132254 into main Mar 10, 2026
28 checks passed
@eriksw eriksw deleted the copilot/add-hide-outputs-variable branch March 10, 2026 13:23
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.

3 participants