mirror of
https://github.com/gradle/wrapper-validation-action.git
synced 2025-04-20 06:09:19 +08:00
Explicitly specify permissions needed by workflows
This reduces the default permissions for these workflows, see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
This commit is contained in:
parent
6721fc9fa7
commit
537945ac18
@ -8,6 +8,9 @@ on:
|
||||
paths:
|
||||
- 'action/index.js'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-no-dist-update:
|
||||
name: Check no dist update
|
||||
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -6,6 +6,9 @@ on: # rebuild any PRs and main branch changes
|
||||
- main
|
||||
- 'releases/*'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build: # make sure build/ci work properly
|
||||
runs-on: ubuntu-latest
|
||||
|
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
@ -9,6 +9,11 @@ on:
|
||||
schedule:
|
||||
- cron: '24 4 * * 6'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
# Allow uploading CodeQL results
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
|
6
.github/workflows/update-checksums-file.yml
vendored
6
.github/workflows/update-checksums-file.yml
vendored
@ -7,6 +7,12 @@ on:
|
||||
# Support running workflow manually
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
# Allow creation of branch for checksums file update
|
||||
contents: write
|
||||
# Allow creation of pull request
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-checksums:
|
||||
name: Update checksums
|
||||
|
8
.github/workflows/update-dist.yml
vendored
8
.github/workflows/update-dist.yml
vendored
@ -4,14 +4,14 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
# Allow the workflow to push the changed file to the repository
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-dist:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
# Allow the job to push the changed file to the repository
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user