Skip to content

Commit

Permalink
ci: ensure least privilege permissions for GHA tokens (#12035)
Browse files Browse the repository at this point in the history
  • Loading branch information
agilgur5 authored Oct 19, 2023
1 parent 885577c commit 247448c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- v*
- "!v0.0.0"

permissions:
contents: read

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependabot-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
review:
if: ${{ github.actor == 'dependabot[bot]' && github.repository == 'argoproj/argo-workflows'}}
permissions:
pull-requests: write
contents: write
pull-requests: write # for approving a PR
contents: write # for enabling auto-merge on a PR
runs-on: ubuntu-latest
steps:
- name: Dependabot metadata
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ concurrency:
cancel-in-progress: true

permissions:
contents: write
contents: read

jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write # for publishing the docs to GH Pages
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- reopened
- synchronize

permissions:
contents: read

jobs:
title-check:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 247448c

Please sign in to comment.