Skip to content

Set permissions for GitHub actions #11367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/algolia-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger

permissions:
contents: read

jobs:
update:
name: Update Algolia Index
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/antora-generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
env:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/clean_build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ on:
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC

permissions:
contents: read

jobs:
main:
permissions:
contents: none
runs-on: ubuntu-latest
steps:
- name: Delete artifacts in cron job
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ jobs:
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
DOCS_HOST: ${{ secrets.DOCS_HOST }}
perform_release:
permissions:
contents: write # for Git to git push
name: Perform release
needs: [prerequisites, deploy_artifacts, deploy_docs, deploy_schema]
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger

permissions:
contents: read

jobs:
deploy:
name: deploy
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/milestone-spring-releasetrain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env:
TITLE: ${{ github.event.milestone.title }}
jobs:
spring-releasetrain-checks:
permissions:
contents: none
name: Check DueOn is on a Release Date
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on: pull_request
env:
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}

permissions:
contents: read

jobs:
build:
name: Build
Expand Down