Repository navigation
Conversation
…abel.yml Refs circlefin#1601 The original workflow interpolated ${{ github.event.issue.user.login }} directly into a shell grep pattern, creating a script-injection vector since issue author names are untrusted input. ### Fix - Pass ${{ github.event.issue.user.login }} securely through `env: OPENER_LOGIN` - Enforce exact line match via `grep -qxF "$OPENER_LOGIN"\) (whole-line fixed-string match, no regex) - Declare explicit job-level permissions (`contents: read`, `issues: write`) - Keep existing action SHAs pinned (already: `actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10`, `actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3`)
Contributor
|
Contributor
|
Hi @feafel, Thank you for your interest in contributing to Malachite. This PR has been automatically closed because you are not assigned to issue #1601. We require contributors to be explicitly assigned to an issue before submitting a PR. To contribute properly:
Please see our CONTRIBUTING.md for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1601
Problem
In
.github/workflows/need-triage-label.yml, the untrusted input${{ github.event.issue.user.login }}was interpolated directly into an inline bashrun:block, creating a potential script injection vector.Fix
${{ github.event.issue.user.login }}securely throughenv: OPENER_LOGINgrep -qxF "$OPENER_LOGIN"(whole-line fixed-string match, no regex)contents: read,issues: write)actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10,actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3)Verification
grep -qxFchange is semantically identical for valid GitHub usernames (alphanumeric + hyphen + underscore) but rejects malicious payloads containing shell metacharactersNote
I've requested assignment on #1601; submitting this PR per CONTRIBUTING.md.