add-mask doesn't work with workflow_dispatch inputs
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
Github actions workflow with inputs cannot be masked using add-mask.
To Reproduce
- Create workflow
name: add-mask-test
on:
workflow_dispatch:
inputs:
secret:
description: 'secret value'
required: true
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: add-mask test
run: |
echo "::add-mask::${{ github.event.inputs.secret }}"
- Run workflow entering secret value "password" as input
- Look at workflow log and see value "password" appears twice without masking
Expected behavior
The value in add-mask does not appear at all in the workflow log output
Runner Version and Platform
Current runner version: '2.272.0'
Operating System
Ubuntu
18.04.4
LTS
What's not working?
The value in add-mask appears twice without masking
Job Log Output
add-mask test
shell: /bin/bash -e {0}
Run echo "::add-mask::password"
echo "::add-mask::password"
shell: /bin/bash -e {0}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided workflow_dispatch reproduction on Ubuntu and inspect how the runner processes the ::add-mask:: command and workflow inputs. Compare the two log entries shown in the report; done means the entered input is not exposed in either workflow log output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100