Skip to content
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

Update README.md #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update README.md #13

wants to merge 1 commit into from

Conversation

amitie10g
Copy link

Passing secret to env may potentially leak the token on the logs. Using it directly into the command line will ofuscate it.

Passing secret to env may potentially leak the token on the logs. Using it directly into the command line will ofuscate it.
@imjasonh
Copy link
Owner

imjasonh commented Dec 20, 2024

I'm not sure there's a difference either way.

With this workflow:

on:
  workflow_dispatch:

jobs:
  test:
    name: test secret obfuscation
    runs-on: ubuntu-latest

    steps:
    - run: echo ${{secrets.TEST}}
    
    - env:
        TEST: ${{secrets.TEST}}
      run: echo ${TEST}
Screenshot 2024-12-20 at 12 00 23 PM

More docs about this here: https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#accessing-your-secrets

edit: workflows can also tell GitHub that a value is sensitive: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#masking-a-value-in-a-log

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.

2 participants