Skip to content

Conversation

@mudge
Copy link
Contributor

@mudge mudge commented Dec 7, 2024

Information in the github context should be treated as untrusted user input and is therefore unsafe to interpolate into scripts. Instead, mitigate their damage by using an intermediate environment variable instead.

See GHSA-7x29-qqmq-v6qc and https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections

Information in the github context should be treated as untrusted user
input and is therefore unsafe to interpolate into scripts. Instead,
mitigate their damage by using an intermediate environment variable
instead.

See GHSA-7x29-qqmq-v6qc and
https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections
@mudge mudge merged commit 6537bc7 into develop Dec 7, 2024
1 check passed
@mudge mudge deleted the fix-github-context-interpolation branch December 7, 2024 13:10
Comment on lines 17 to +21
echo "Current ref: $GITHUB_REF"
echo "Base ref: $GITHUB_BASE_REF"
echo "Head ref: $GITHUB_HEAD_REF"
echo "Repository: $GITHUB_REPOSITORY"
echo "Head repository: ${{ github.event.pull_request.head.repo.full_name }}"
echo "Head repository: $REPO_FULL_NAME"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like these echo commands were probably only used when we were initially debugging this workflow, so perhaps this entire "Log current branches and repositories" could / should also be deleted? 🤔

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