Skip to content

Commit 4c0bbfe

Browse files
authored
Add permissions to all workflows (#687)
1 parent ffa630c commit 4c0bbfe

6 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/check-uncommitted.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Check for uncommitted files
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
push:

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: CI
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
workflow_dispatch:
48
push:

.github/workflows/dependabot-auto-merge.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Dependabot auto-merge
22
on: pull_request_target
33

4+
permissions: {}
5+
46
jobs:
57
dependabot:
68
runs-on: ubuntu-latest

.github/workflows/dependabot-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Compile dependabot updates
33
on:
44
pull_request:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
fetch-dependabot-metadata:
811
runs-on: ubuntu-latest
@@ -25,6 +28,8 @@ jobs:
2528
build-dependabot-changes:
2629
runs-on: ubuntu-latest
2730
needs: [fetch-dependabot-metadata]
31+
permissions:
32+
contents: write
2833

2934
# We only need to build the dist/ folder if the PR relates a production NPM dependency, otherwise we don't expect changes.
3035
if: needs.fetch-dependabot-metadata.outputs.package-ecosystem == 'npm_and_yarn' && needs.fetch-dependabot-metadata.outputs.dependency-type == 'direct:production'

.github/workflows/release-bump-version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on: # yamllint disable-line rule:truthy
1515
- patch
1616
default: "minor"
1717

18+
permissions: {}
19+
1820
jobs:
1921
Create-PR-To-Bump-Fetch-Metadata-Version:
2022
runs-on: ubuntu-latest

.github/workflows/release-move-tracking-tag.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
release:
1313
types: [published]
1414

15+
permissions: {}
16+
1517
jobs:
1618
Move-Tracking-Tag-To-Latest-Release:
1719
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)