Skip to content

chore(ci): update permissions #1764

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

Merged
merged 1 commit into from
Feb 12, 2025
Merged
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/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
- 'mkdocs.yml'
- 'Makefile'

permissions:
contents: read

jobs:
docs:
runs-on: ubuntu-latest
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/dispatch_analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ on:
- cron: '0 * * * *'

permissions:
id-token: write
actions: read
checks: read
contents: read
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read

jobs:
dispatch_token:
permissions:
id-token: write
actions: read
checks: read
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
concurrency:
group: analytics
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
workflow_dispatch: {}

permissions:
id-token: write
contents: write
pages: write

jobs:
docs:
runs-on: ubuntu-latest
environment: Docs
permissions:
id-token: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Python
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr_artifacts_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
- 'powertools-validation/**'
- 'pom.xml'
- '.github/workflows/pr_artifacts_size.yml'

permissions:
contents: read

jobs:
codecheck:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ on:
- 'pom.xml'
- 'examples/pom.xml'
- '.github/workflows/**'

permissions:
contents: read

jobs:
build-corretto:
runs-on: ubuntu-latest
Expand All @@ -58,7 +62,6 @@ jobs:
AWS_REGION: eu-west-1
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup java
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr_build_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ on:
- 'pom.xml'
- 'examples/pom.xml'
- '.github/workflows/**'

permissions:
contents: read

jobs:
build-corretto:
runs-on: ubuntu-latest
Expand All @@ -54,7 +58,6 @@ jobs:
AWS_REGION: eu-west-1
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup java
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr_iac_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- v2
paths:
- 'examples/**'

permissions:
contents: read

jobs:
linter:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
types:
- published
workflow_dispatch: {}

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Maven Central Repository
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ on:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: release-drafter/release-drafter@569eb7ee3a85817ab916c8f8ff03a5bd96c9c83e # v5.23.0
env:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ on:
description: 'Release number to upgrade to. For example X.X.X. Follow Semantic Versioning when deciding on next version.'
required: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Get current date
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-e2e-tests-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
paths:
- 'powertools-e2e-tests/**'

permissions:
contents: read

jobs:
e2e:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
paths:
- 'powertools-e2e-tests/**'

permissions:
contents: read

jobs:
e2e:
runs-on: ubuntu-latest
Expand All @@ -40,7 +43,6 @@ jobs:
JAVA_VERSION: ${{ matrix.java }}
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup java
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/secure_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ on:
paths:
- ".github/workflows/**"

permissions:
contents: read

jobs:
enforce_pinned_workflows:
name: Harden Security
runs-on: ubuntu-latest
permissions:
contents: read # checkout code and subsequently GitHub action workflows
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/spotbugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
- 'powertools-test-suite/**'
- 'pom.xml'
- '.github/workflows/**'

permissions:
contents: read

jobs:
codecheck:
runs-on: ubuntu-latest
Expand Down
Loading