[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:
parent
7f111ea831
commit
be60150962
|
|
@ -28,6 +28,9 @@ on:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test:
|
build-test:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,12 @@ on:
|
||||||
branches: [ 'main*' ]
|
branches: [ 'main*' ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
contents: read
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add-labels-on-issues:
|
add-labels-on-issues:
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
if: github.event_name == 'issues' && !github.event.issue.pull_request
|
if: github.event_name == 'issues' && !github.event.issue.pull_request
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
@ -33,6 +34,8 @@ jobs:
|
||||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||||
|
|
||||||
add-labels-on-pull-requests:
|
add-labels-on-pull-requests:
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
if: github.event_name == 'pull_request_target'
|
if: github.event_name == 'pull_request_target'
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ 'main*' ]
|
branches: [ 'main*' ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-misspell-sanitycheck:
|
lint-misspell-sanitycheck:
|
||||||
uses: ./.github/workflows/sanitycheck.yml
|
uses: ./.github/workflows/sanitycheck.yml
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ name: Lint - Markdown
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-markdownlint:
|
run-markdownlint:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ on:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automation:
|
automation:
|
||||||
uses: ./.github/workflows/automation.yml
|
uses: ./.github/workflows/automation.yml
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ on:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automation:
|
automation:
|
||||||
uses: ./.github/workflows/automation.yml
|
uses: ./.github/workflows/automation.yml
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # once in a day at 00:00
|
- cron: '0 0 * * *' # once in a day at 00:00
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automation:
|
automation:
|
||||||
uses: ./.github/workflows/automation.yml
|
uses: ./.github/workflows/automation.yml
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue