usage of add-mask still echoes the value to the log
See original GitHub issueDescribe the bug
According to https://github.com/actions/runner/issues/159, the issue where the add-mask
workflow command echoes/leaks the secret was supposed to be fixed, but we still observe it.
This was also mentioned on the GitHub forum by a Partner
To Reproduce Steps to reproduce the behavior: echo “::add-mask:😒{{ steps.mystep.outputs.myvalue }}”
Expected behavior raw output is not echoed to the log
Runner Version and Platform Hosted Ubuntu
Issue Analytics
- State:
- Created 3 years ago
- Reactions:54
- Comments:53 (8 by maintainers)
Top Results From Across the Web
Working With add-mask and GitHub Actions for ... - Aaron Powell
The way add-mask works is that it takes a value and from that point onwards when that value is to be written to...
Read more >How to mask environment variables created in Github ...
I tried applying ::add-mask:: . Adding echo "ACCESS_TOKEN=::add-mask::$ACCESS_TOKEN" >> $GITHUB_ENV only added ::add-mask:: to the string.
Read more >How to Hide Sensitive Things in GitHub Actions Logs
add-mask is one of these actions. When you call it from a Workflow, with a string, it will hide that string in the...
Read more >Working With add-mask and GitHub Actions for dynamic secrets
The way add-mask works is that it takes a value and from that point onwards when that value is to be written to...
Read more >Masking Input Parameters in GitHub Actions
In the step, "Mask Password", we'll make use of the workflow command ::ask-mask::{value}. Unfortunately, calling add-mask on the input directly ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess I’m back to my original post then: what is the point of
add-mask
if it inherently exposes secrets?Accidentally discovered the following undocumented feature that can be used as a workaround for masking sensitive data. GitHub Actions appears to automatically mask inputs / environment variables following certain naming conventions. For instance, a plaintext variable named
WEBHOOK_TOKEN
holding a JWT is masked same way as encrypted secrets would. It would be great to officially document this behavior along with the supported keywords to make it safe to rely upon.GitHub Action configuration:
GitHub Action log: