Skip to content

Commit 485d7ff

Browse files
authored
ci: explicit permissions for actions (#702)
1 parent ebb6532 commit 485d7ff

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

.github/workflows/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
pull_request:
1313
workflow_dispatch:
1414

15+
permissions:
16+
contents: read
17+
id-token: write
18+
1519
jobs:
1620
test:
1721
name: Test / OS ${{ matrix.os }} / Python ${{ matrix.python-version }}

.github/workflows/conventional-commits.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- master
77
- release/*
88

9-
pull_request_target:
9+
pull_request:
1010
branches:
1111
- master
1212
- release/*
@@ -16,6 +16,9 @@ on:
1616
- reopened
1717
- ready_for_review
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
check-conventional-commits:
2124
runs-on: ubuntu-latest
@@ -26,7 +29,7 @@ jobs:
2629
sparse-checkout: |
2730
.github
2831
29-
- if: ${{ github.event_name == 'pull_request_target' }}
32+
- if: ${{ github.event_name == 'pull_request' }}
3033
run: |
3134
set -ex
3235

.github/workflows/manual_pypi_publish.yml

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Manual PyPi Publish
22
on:
33
workflow_dispatch:
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
test:
710
name: Test / OS ${{ matrix.os }} / Python ${{ matrix.python-version }}

.github/workflows/stale.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
schedule:
55
- cron: '0 0 * * *'
66

7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
712
jobs:
813
mark_stale:
914
name: Mark issues and PRs as Stale

0 commit comments

Comments
 (0)