Replies: 3 comments
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
|
What you are experiencing is the intentional behavior of the GitHub Actions redaction engine. It is designed as a "fail-safe" to prevent secrets from leaking, even if a third-party tool prints them unexpectedly. How it works: Is this safe? How to fix your logs:
|
Beta Was this translation helpful? Give feedback.
-
|
Yeah, this is expected behavior but your concern about it being a potential security issue is valid. The redaction engine does a simple string match across the entire log output. If your secret value is The security angle you're pointing at: if someone sees "An***le" in the logs, they can pretty easily reverse-engineer that the secret contains "sib". With a 3-character secret, that's basically giving it away. So yes, short secrets and the redaction engine don't mix well. The fix isn't on GitHub's side though, it's in how you set up your secrets:
- run: echo "::add-mask::${{ steps.something.outputs.token }}"This adds values to the redaction list on the fly, which is useful for derived values that aren't stored as repo secrets. One more thing: the redaction only applies to log output. It doesn't protect against secrets being written to files, artifacts, or |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
General
Discussion Details
When using secrets, I noticed that parts of words containing secret characters are replaced in Github action logs.
Example:
secret: sib
Ansible => An***le
however, the secret itself in the form {{ secret }} was not used in this block in the pipeline
This may lead to compromise of the secret in certain scenarios.
Is this behavior of the secrets engine safe?
Beta Was this translation helpful? Give feedback.
All reactions