ci: Reduce permissions of semantic-pull-request check #343
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.
Description
Reduce permissions of the lint-pr github action.
Add a permissions block to lint-pr. This is now the recommended option in:
https://github.com/amannn/action-semantic-pull-request#installation
Recently a project has been attacked using
pull_request_target
see full details. This project/action is not vulnerable to that, but there is no reason for the token associated with this action to have write permissions.n/a, improves security posture of the project.
Type of change
Please select the type of change your PR introduces:
How Has This Been Tested?
Only affects CI; CI will test it.
Can check by looking at "Set up job" and then expanding "GITHUB_TOKEN Permissions" on the "Validate PR title" PR check. Before it will say "write", after it should only have "read". (Note because this is using
pull_request_target
this won't be visible on this PR, only once merged to main).