[infra] Add minimum token permissions for all github workflow files (#6357)

Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
This commit is contained in:
OpenTelemetry Bot 2025-07-24 03:50:45 -07:00 committed by GitHub
parent 7f111ea831
commit be60150962
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 23 additions and 2 deletions

View File

@ -28,6 +28,9 @@ on:
required: false
type: string
permissions:
contents: read
jobs:
build-test:

View File

@ -7,11 +7,12 @@ on:
branches: [ 'main*' ]
permissions:
issues: write
pull-requests: write
contents: read
jobs:
add-labels-on-issues:
permissions:
issues: write
if: github.event_name == 'issues' && !github.event.issue.pull_request
runs-on: ubuntu-22.04
@ -33,6 +34,8 @@ jobs:
ISSUE_BODY: ${{ github.event.issue.body }}
add-labels-on-pull-requests:
permissions:
pull-requests: write
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-22.04

View File

@ -9,6 +9,9 @@ on:
pull_request:
branches: [ 'main*' ]
permissions:
contents: read
jobs:
lint-misspell-sanitycheck:
uses: ./.github/workflows/sanitycheck.yml

View File

@ -5,6 +5,9 @@ name: Lint - Markdown
on:
workflow_call:
permissions:
contents: read
jobs:
run-markdownlint:
runs-on: ubuntu-22.04

View File

@ -16,6 +16,9 @@ on:
types:
- created
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml

View File

@ -23,6 +23,9 @@ on:
types:
- created
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml

View File

@ -16,6 +16,9 @@ on:
schedule:
- cron: '0 0 * * *' # once in a day at 00:00
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml