Skip to content

Commit 27ceabd

Browse files
committed
Add GitHub token permissions for workflows
Follows rubocop/rubocop#10947
1 parent 9748bdb commit 27ceabd

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.github/workflows/linting.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
name: Linting
22
on:
33
- pull_request
4+
5+
permissions: # added using https://github.com/step-security/secure-workflows
6+
contents: read
7+
48
concurrency:
59
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
610
cancel-in-progress: true
11+
712
jobs:
813
yamllint:
14+
permissions:
15+
contents: read # for actions/checkout to fetch code
16+
pull-requests: write # for karancode/yamllint-github-action to post comments on PRs
917
name: Yamllint
1018
runs-on: ubuntu-latest
1119
steps:

.github/workflows/spell_checking.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Spell Checking
22

33
on: [pull_request]
44

5+
permissions: # added using https://github.com/step-security/secure-workflows
6+
contents: read
7+
58
concurrency:
69
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
710
cancel-in-progress: true

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions: # added using https://github.com/step-security/secure-workflows
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1215
cancel-in-progress: true

0 commit comments

Comments
 (0)