Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize pull request title before passing to gitlint #1624

Closed
terriko opened this issue Mar 29, 2022 · 1 comment · Fixed by #1622
Closed

Sanitize pull request title before passing to gitlint #1624

terriko opened this issue Mar 29, 2022 · 1 comment · Fixed by #1622

Comments

@terriko
Copy link
Contributor

terriko commented Mar 29, 2022

Currently, if your pull request has a bracket in it (e.g. "ci: upgrade black (fixes #1621)") then gitlint fails.

I rather like having brackets in pull requests to denote such fixes. can we fix how we pass the commit message to gitlint so this will work going forwards?

@terriko terriko changed the title gitlint can't handle brackets Sanitize pull request title before passing to gitlint Mar 29, 2022
terriko added a commit that referenced this issue Mar 29, 2022
* ci: upgrade black (fixes #1621)

* ci: improve PR title handling for gitlint (fixes #1624)
@terriko
Copy link
Contributor Author

terriko commented Mar 29, 2022

Took a deeper look at this. As we currently invoke gitlint, it could execute bash commands:

https://securitylab.github.com/research/github-actions-untrusted-input/

It's a little embarrassing that I didn't notice this earlier since I'm literally trained for this kind of error, but since I have to approve pull requests until a new contributor has code merged, at least only existing contributors could have taken advantage of this (and it would have been reasonably obvious in the PR logs). I've merged a fix already.

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 a pull request may close this issue.

1 participant