Skip to content

Commit b2260ca

Browse files
ashishkurmiljharb
authored andcommitted
[actions] setting minimum token permissions for github actions
Signed-off-by: Ashish Kurmi <akurmi@stepsecurity.io>
1 parent 4d00a73 commit b2260ca

4 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/node-pretest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 'Tests: pretest/posttest'
22

33
on: [pull_request, push]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
pretest:
710
runs-on: ubuntu-latest

.github/workflows/node.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 'Tests: node.js'
22

33
on: [pull_request, push]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
matrix:
710
runs-on: ubuntu-latest

.github/workflows/rebase.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ name: Automatic Rebase
22

33
on: [pull_request_target]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
_:
10+
permissions:
11+
contents: write # for ljharb/rebase to push code to rebase
12+
pull-requests: read # for ljharb/rebase to get info about PR
713
name: "Automatic Rebase"
814

915
runs-on: ubuntu-latest

.github/workflows/require-allow-edits.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: Require “Allow Edits”
22

33
on: [pull_request_target]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
_:
10+
permissions:
11+
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR
712
name: "Require “Allow Edits”"
813

914
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)