Skip to content

Commit 94f4223

Browse files
Set more restrictive permissions for the workflows. (#1807)
1 parent 72544e7 commit 94f4223

13 files changed

+51
-0
lines changed

.github/workflows/approved_status.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Send PR Approval Status
22

3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
37
on:
48
pull_request:
59
branches:

.github/workflows/changelog.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: "Ensure labels"
2+
3+
permissions:
4+
pull-requests: write
5+
26
on: # yamllint disable-line rule:truthy
37
pull_request:
48
types:

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#
1212
name: "CodeQL"
1313

14+
permissions:
15+
contents: read
16+
checks: write
17+
1418
on:
1519
push:
1620
branches: [master]

.github/workflows/docs.yml

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

3+
permissions:
4+
contents: write
5+
36
on:
47
push:
58
branches:

.github/workflows/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
name: "Pull Request Labeler"
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
27
on:
38
- pull_request
49

.github/workflows/prepare_release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Prepare release
22

3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
37
env:
48
GIT_AUTHOR_EMAIL: "[email protected]"
59
GIT_AUTHOR_NAME: "ci.datadog-api-spec"

.github/workflows/prerelease.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Publish package on NPM
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
release:
48
types: [prereleased]

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Publish package on NPM
2+
3+
permissions:
4+
contents: write
5+
26
on:
37
release:
48
types: [released]

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Release
22

3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
37
env:
48
GIT_AUTHOR_EMAIL: "[email protected]"
59
GIT_AUTHOR_NAME: "ci.datadog-api-spec"

.github/workflows/stale.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Configuration for https://github.com/actions/stale
22

33
name: "Stale issues and pull requests"
4+
5+
permissions:
6+
contents: write
7+
issues: write
8+
pull-requests: write
9+
410
on:
511
schedule:
612
- cron: "0 0 * * *"

0 commit comments

Comments
 (0)