Skip output 'AWS_ACCOUNT_ID' since it may contain secret #26636
-
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 3 replies
-
Hi @jonathan-be21, Glad to see you in Github Community Forum! This is by designed. Once you change the secrets value and it becomes part of the var value, the warning will happen, it’s automatically by github action and cannot be avoided. As the doc mentioned: Job outputs are strings, and job outputs containing expressions are evaluated on the runner at the end of each job. Outputs containing secrets are redacted on the runner and not sent to GitHub Actions . Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @weide-zhou, i wasn’t talking about using a github secret. i’m using a simple env var that github actions thinks it’s a secret. it’s not a secret value by any mean (it’s just a long number actually) |
Beta Was this translation helpful? Give feedback.
-
Hi @jonathan-be21, Thanks for your reply! Sorry i’m a little confused, could you please provide a sample code for further investigation? If your var value is a long number, for example: 123456789, and using a secret (value set as 456) other place in the workflow, the warning will happen. The job output cannot get the value. I repro the error on my side: Thanks |
Beta Was this translation helpful? Give feedback.
-
@weide-zhou thank you for your help so far.
As you can see, I’ve never declared a secret but still receive the above error |
Beta Was this translation helpful? Give feedback.
-
Hi @jonathan-be21, What’s display in the Is there any secrets in your workflow other places? And how you define Thanks |
Beta Was this translation helpful? Give feedback.
-
@weide-zhou no, the display shows only: I’m working around it by setting an hardcoded github secret, but even if it was a real secret such as password (which isn’t the case), how else should i pass it between jobs? I’m using multiple envs and secrets, this is the only env that fails with that error. the $SECRET is a simple json: |
Beta Was this translation helpful? Give feedback.
-
Hi @jonathan-be21, I cannot reproduce the issue, please check my workflow: https://github.com/weide-zhou/ticket13/runs/902090365?check_suite_focus=true If the output in step Hence, could you please provide a sample repository for futher investigation? Thanks |
Beta Was this translation helpful? Give feedback.
-
@jonathan-be21 I got this issue, too. aws-actions/configure-aws-credentials@v1 will addMask for our aws accountid you can use
|
Beta Was this translation helpful? Give feedback.
-
Hi Folks, I got this problem too. And my output has nothing related to the AWS as well as any kind of secrets. The result I got is: Hi @weide-zhou, I saw you asked a question:
The answer in my case is YES.
And actually the value I set to the I guess this is because github detected it as secret by wrong, and I did not found any way to disable that functionality from both google and stackoverflow. Am I missed something? Any hints you can provide? For more informations: |
Beta Was this translation helpful? Give feedback.
-
Alright, I guess I found the issue. The value That is my docker-hub username, I putted it into my repo level secrets along with the docker-hub token. I cannot tell whether this is a good idea or not, I just thought this mechanism may exposure secrets. Anyway, I have changed my implementation from utilizing github output to use artifacts action, that make more sense in my case. |
Beta Was this translation helpful? Give feedback.
-
fmb-chin:
Thank you so much for this. The |
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing! Have you worked around this somehow? |
Beta Was this translation helpful? Give feedback.
-
Yes, for me. Because the value that been masked is not really a secrete, So I just removed it from Github Secretes and putted it into repo directly. |
Beta Was this translation helpful? Give feedback.
-
I’ve opened an issue on the configure-aws-credentials repo to request that this be documented |
Beta Was this translation helpful? Give feedback.
-
bob-bins:
This was also a solution for me, I’ve verified @bob-bins in that no documentation is found on the readme. I have posted this quickly as suggestion to another README.md pull request on the repo.
Update README.md
Added explicit language that this action is not supported on github currently. … *Issue #, if available:* N/A Description of changes: I added clarifying language that says that the tagging with web identity tokens is not currently supported with github actions currently, as to not require customers to discover this themselves. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. Many pull requests are open, not sure how active BDFL is. |
Beta Was this translation helpful? Give feedback.
@jonathan-be21 I got this issue, too.
But I found the root cause.
aws-actions/configure-aws-credentials@v1 will addMask for our aws accountid
you can use
mask-aws-account-id: 'no'
to avoid the issue.