multiline secrets are not sanitized #57

Open
opened 2023-07-18 14:44:43 +00:00 by earl-warren · 1 comment
Owner

Steps to reproduce:

  • Create a secret with two lines (ONE TWO)
  • Run the workflow
    on: [push]
    jobs:
      test:
        runs-on: docker
        steps:
          - run: |
                set -x
                echo ">>>${{ secrets.MULTILINELEAK }}<<<"            
    
  • See the secret displayed
    image
Steps to reproduce: * Create a secret with two lines (ONE TWO) * Run the workflow ```yaml on: [push] jobs: test: runs-on: docker steps: - run: | set -x echo ">>>${{ secrets.MULTILINELEAK }}<<<" ``` * See the secret displayed ![image](/attachments/79f80266-8895-45a8-bab6-0bc837cb961b)
earl-warren added the
Kind/Bug
Priority
Critical
labels 2023-07-18 14:44:43 +00:00
Author
Owner
In ACT * https://github.com/nektos/act/blob/master/pkg/runner/testdata/mask-values has some test data on how secrets are sanitized * https://github.com/nektos/act/blob/master/pkg/runner/logger.go#L146 the function doing the masking In the runner * https://code.forgejo.org/forgejo/runner/src/branch/main/internal/pkg/report/reporter.go#L425-L428 There may be a regression / inconsistency there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/runner#57
No description provided.