linuxwacom / input-wacom

Linux kernel driver for Wacom devices
GNU General Public License v2.0
611 stars 58 forks source link

github: Minimize permissions granted to automated workflows / jobs #400

Closed jigpu closed 9 months ago

jigpu commented 9 months ago

Jobs that use the GITHUB_TOKEN to perform sensitive actions on behalf of a real user may be granted a range of permissions. Instead of granting blanket permissions to read and write "all" APIs, we should really limit the permissions what any individual workflow or job can do.

This commit sets the default permissions for each workflow to "contents: read", which allows jobs to only read from the repository. The one job that requires additional permission is our "tagged_release" job which additional requires write access.

Link: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions Link: https://github.com/linuxwacom/input-wacom/pull/317

Pinglinux commented 9 months ago

Merged. Thank you Jason!