Set restrictive GitHub Action permissions (#1985)
* chore: Set permissions for GitHub actions Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. * Remove global permissions which are set implicitly With restrictive settings in the global GitHub Action permission settings those permissions are given implicitly. Co-authored-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com> Co-authored-by: Joakim Sørensen <hi@ludeeus.dev> Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
3
.github/workflows/dev.yml
vendored
3
.github/workflows/dev.yml
vendored
@@ -12,6 +12,9 @@ jobs:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
|
||||
name: Prepare build
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
outputs:
|
||||
version_main: ${{ steps.version_main.outputs.version_main }}
|
||||
version_dev: ${{ steps.version_dev.outputs.version_dev }}${{ steps.version_pr.outputs.version_pr }}
|
||||
|
||||
Reference in New Issue
Block a user