Skip to content

Commit 753505d

Browse files
varunsh-coderljharb
authored andcommitted
[actions] add minimum GitHub token permissions for workflows
Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>
1 parent cf9313c commit 753505d

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

.github/workflows/node-4+.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/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/packages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 'Tests: packages'
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)