Skip to content

Commit dbeca51

Browse files
authored
Merge pull request #1015 from tiran/minimal-permissions
ci: add minimal permissions to GitHub Actions workflows
2 parents 3072a0c + 2e9f9b8 commit dbeca51

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/check.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
- push
55
- pull_request
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
pre-commit:
912
name: pre-commit

.github/workflows/python-publish.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ name: Upload Python Package
66
on:
77
- push
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build-n-publish:
1114
name: Build and publish Python distributions to PyPI
@@ -15,6 +18,7 @@ jobs:
1518
environment: release
1619

1720
permissions:
21+
contents: read
1822
# IMPORTANT: this permission is mandatory for trusted publishing
1923
id-token: write
2024

.github/workflows/test.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: CI
44
on:
55
pull_request:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
unit:
912
name: unit

0 commit comments

Comments
 (0)