Skip to content

Commit c9a1212

Browse files
committed
ci: ensure least privilege permissions for GHA tokens (argoproj#12035)
(cherry picked from commit 247448c)
1 parent a2bbac5 commit c9a1212

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/changelog.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
tags:
66
- v*
77
- "!v0.0.0"
8+
89
permissions:
910
contents: read
1011

.github/workflows/dependabot-reviewer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
review:
1010
if: ${{ github.actor == 'dependabot[bot]' && github.repository == 'argoproj/argo-workflows'}}
1111
permissions:
12-
pull-requests: write
13-
contents: write
12+
pull-requests: write # for approving a PR
13+
contents: write # for enabling auto-merge on a PR
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Dependabot metadata

.github/workflows/docs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
permissions:
16-
contents: write
16+
contents: read
1717

1818
jobs:
1919
docs:
2020
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write # for publishing the docs to GH Pages
2123
steps:
2224
- uses: actions/checkout@v4
2325
- uses: actions/setup-python@v5

.github/workflows/pr.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- reopened
99
- synchronize
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
title-check:
1316
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)