Skip to content

Commit 8b21e31

Browse files
authored
ci: explicit permissions to actions (#300)
revoke pull_request_target
1 parent f3ae750 commit 8b21e31

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
test:
1215
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
- main
77
- release/*
88

9-
pull_request_target:
9+
pull_request:
1010
branches:
1111
- main
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/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+
issues: write
9+
pull-requests: write
10+
contents: read
11+
712
jobs:
813
mark_stale:
914
name: Mark issues and PRs as Stale

0 commit comments

Comments
 (0)