Skip to content

Commit 91ab089

Browse files
committed
CI: Improve permissions.
1 parent b2f1c92 commit 91ab089

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/codeql-code-scanning.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- cron: '29 23 * * 0'
1111
workflow_dispatch:
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
analyze:
1518
name: Analyze

.github/workflows/report-size.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ on:
66
types:
77
- completed
88

9-
# This workflow needs to be run with "pull-requests: write" permissions to
10-
# be able to comment on the pull request. We can't checkout the PR code
11-
# in this workflow.
12-
# Reference:
13-
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
149
permissions:
15-
pull-requests: write
10+
contents: read
1611

1712
jobs:
1813
report-size:
1914
name: Comment on PR
2015
runs-on: ubuntu-latest
16+
# This job needs "pull-requests: write" permissions to be able to comment
17+
# on the pull request. We can't checkout the PR code in this workflow.
18+
# Reference:
19+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
20+
permissions:
21+
contents: read
22+
pull-requests: write
2123
if: github.event.workflow_run.event == 'pull_request' &&
2224
github.event.workflow_run.conclusion == 'success'
2325
steps:

0 commit comments

Comments
 (0)