This website uses cookies to ensure you get the best experience.
Learn more.
A workflow inserts a pull request title directly into a run script using ${{ github.event.pull_request.title }}. An attacker controls the title. Which correction best reduces script-injection risk?
Published
- Replace the title with the pull request branch name and continue interpolating it directly into the script.
- Pass the title as an environment value and quote its shell use.
- Base64-encode the title and then evaluate the decoded string as shell code.
- Grant the job additional token permissions so malicious title text is rejected.
Comments — 0
Sign in to comment