Skip to content

Commit 7033191

Browse files
opentelemetrybototelbot[bot]trask
authored
Add minimum token permissions for all github workflow files (#1655)
* Add minimum token permissions for all github workflow files * Update .github/workflows/phpdoc-to-github-pages.yml --------- Co-authored-by: otelbot <[email protected]> Co-authored-by: Trask Stalnaker <[email protected]>
1 parent e27aac8 commit 7033191

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

.github/workflows/php.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
php:
1114
runs-on: ubuntu-latest

.github/workflows/phpdoc-to-github-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ on:
66
- "main"
77
workflow_dispatch:
88

9-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
109
permissions:
1110
contents: read
12-
pages: write
13-
id-token: write
1411

1512
jobs:
1613
documentation:
14+
permissions:
15+
pages: write # required for GitHub Pages deployment
16+
id-token: write # required for GitHub Pages deployment
1717
name: "Documentation"
1818
runs-on: "ubuntu-latest"
1919
steps:

.github/workflows/publish-otel-php-base-docker-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
paths:
1212
- docker/Dockerfile
1313
- .github/workflows/publish-otel-php-base-docker-image.yml
14+
permissions:
15+
contents: read
1416
jobs:
1517
push_to_registry:
1618
name: OpenTelemetry PHP base docker image creation

.github/workflows/shellcheck.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
shellcheck:
1114
runs-on: ubuntu-latest

.github/workflows/split-monorepo.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
create:
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
gitsplit:
1417
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)