Skip to content

Commit 3067ce4

Browse files
lishaduckjfmengels
authored andcommitted
ci: restrict permissions
1 parent 5e446bb commit 3067ce4

File tree

4 files changed

+21
-0
lines changed
  • .github/workflows
  • new-package/github/workflows
  • test/run-snapshots
    • elm-review-something-for-new-rule/.github/workflows
    • elm-review-something/.github/workflows

4 files changed

+21
-0
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: CI
44

55
on: [push, pull_request]
66

7+
permissions:
8+
contents: read
9+
710
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
811
jobs:
912
test:

new-package/github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: CI
44
# events but only for the main branch
55
on: [push, pull_request]
66

7+
permissions:
8+
contents: read
9+
710
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
811
jobs:
912
test:
@@ -64,6 +67,9 @@ jobs:
6467
publish:
6568
needs: [test] # make sure all your other jobs succeed before trying to publish
6669

70+
permissions:
71+
contents: write
72+
6773
# The type of runner that the job will run on
6874
runs-on: ubuntu-latest
6975

test/run-snapshots/elm-review-something-for-new-rule/.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: CI
44
# events but only for the main branch
55
on: [push, pull_request]
66

7+
permissions:
8+
contents: read
9+
710
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
811
jobs:
912
test:
@@ -64,6 +67,9 @@ jobs:
6467
publish:
6568
needs: [test] # make sure all your other jobs succeed before trying to publish
6669

70+
permissions:
71+
contents: write
72+
6773
# The type of runner that the job will run on
6874
runs-on: ubuntu-latest
6975

test/run-snapshots/elm-review-something/.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: CI
44
# events but only for the main branch
55
on: [push, pull_request]
66

7+
permissions:
8+
contents: read
9+
710
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
811
jobs:
912
test:
@@ -64,6 +67,9 @@ jobs:
6467
publish:
6568
needs: [test] # make sure all your other jobs succeed before trying to publish
6669

70+
permissions:
71+
contents: write
72+
6773
# The type of runner that the job will run on
6874
runs-on: ubuntu-latest
6975

0 commit comments

Comments
 (0)