Skip to content

Commit 4815eae

Browse files
committed
Explicitly limit the permissions of workflows to read-only
1 parent 0499550 commit 4815eae

5 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/actionlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
actionlint:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1315
steps:
1416
- uses: actions/checkout@v4
1517
- name: Download actionlint

.github/workflows/publish_to_pypi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
build-n-publish:
1010
name: Build and publish Python 🐍 distributions 📦 to PyPI
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
1214
steps:
1315
- uses: actions/checkout@v4
1416
with:

.github/workflows/style.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
lint:
1515
name: Linting through pre-commit
1616
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1719
steps:
1820
- uses: actions/checkout@v4
1921
- name: Setup Python

.github/workflows/testing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
tests:
1616
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
1717
runs-on: ${{ matrix.os }}
18+
permissions:
19+
contents: read
1820
strategy:
1921
fail-fast: false
2022
matrix:

.github/workflows/typing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ env:
1313
jobs:
1414
type-checking:
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
1618
timeout-minutes: 15
1719
strategy:
1820
matrix:

0 commit comments

Comments
 (0)