-
Notifications
You must be signed in to change notification settings - Fork 61.6k
Added warning to documentation. #37411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
These strings leaking has been a known issue since at least 5 years (See github issue: actions/runner#475) regardless of whether or not this will ever be fixed the least that can be done is give the user a heads up that these 2 use cases will not mask the values. (Removing the 2 sections in their entirety might also be an option 🤔).
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksThe table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
I don't think this is precisely the right fix, but I do agree the example is wrong. I'd be inclined to suggest an example closer to: actions/runner#475 (comment) (I don't expect to have any time to do anything like this before the end of the month.) |
@tobias-wilfert Thanks for opening a PR! Since this is still a draft, could you ping me when this is ready to make sure I don't overlook it? ✨ |
@@ -289,6 +289,7 @@ Write-Output "::add-mask::Mona The Octocat" | |||
|
|||
> [!WARNING] | |||
> Make sure you register the secret with 'add-mask' before outputting it in the build logs or using it in any other workflow commands. | |||
> This will still leak the string initialy as part of the echo statment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the very least:
> This will still leak the string initialy as part of the echo statment. | |
> This will still leak the string initially as part of the echo statement. |
@@ -324,6 +325,9 @@ jobs: | |||
|
|||
{% endpowershell %} | |||
|
|||
> [!WARNING] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the gist is correct that you can't actually use an env:
block to set an unmasked secret and thus this section should be changed to just say as much:
Important
Values set via an env:
block in a workflow will be logged. Trying to mask in the step would be too late.
Masking would have to be done beforehand or by providing a file with the data and then reading the value, masking, and setting the variable locally within the shell context.
These strings leaking has been a known issue since at least 5 years (See github issue: actions/runner#475) regardless of whether or not this will ever be fixed the least that can be done is give the user a heads up that these 2 use cases will not mask the values. (Removing the 2 sections in their entirety might also be an option 🤔).
Why:
Closes: github issue: actions/runner#475
What's being changed (if available, include any code snippets, screenshots, or gifs):
Merly adding two warnings to two sections giving the user a heads up that these "masks" will still leak the string that should be masked.
Check off the following: