Skip to content

Commit 1adf16e

Browse files
Add minimum token permissions for all github workflow files (#4574)
See open-telemetry/sig-security#148 for details. Please check this PR carefully and watch out for any permission-related workflow failures after merging it. cc @trask Co-authored-by: otelbot <[email protected]>
1 parent 421ef45 commit 1adf16e

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.github/workflows/checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches: [ main ]
88
merge_group:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
markdownlint:
1215
runs-on: ubuntu-latest

.github/workflows/stale-pr.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ on:
33
schedule:
44
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
stale:
11+
permissions:
12+
pull-requests: write # required for marking and closing stale PRs
813
runs-on: ubuntu-latest
914
steps:
1015
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0

.github/workflows/triage-followup.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
- cron: "12 4 * * *"
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
followup:
12+
permissions:
13+
issues: write # required for adding triage labels to issues
914
runs-on: ubuntu-latest
1015
defaults:
1116
run:

0 commit comments

Comments
 (0)