Skip to content

Commit 7ef550a

Browse files
authored
GitHub Workflows security hardening (#5365)
* build: harden pypi_upload.yml permissions Signed-off-by: Alex <aleksandrosansan@gmail.com> * build: harden ci.yaml permissions Signed-off-by: Alex <aleksandrosansan@gmail.com>
1 parent 40e04ad commit 7ef550a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/ci.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ on:
3232
- ".gitmodules"
3333
- ".gitattributes"
3434
- ".editorconfig"
35+
permissions:
36+
contents: read # to fetch code (actions/checkout)
3537
jobs:
3638
lint:
3739
name: Check code linting

.github/workflows/pypi_upload.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ on:
66
tags:
77
- v[0-9]+.[0-9]+.* # add .* to allow dev releases
88

9+
permissions: {}
910
jobs:
1011
deploy:
12+
permissions:
13+
contents: write # to create a release (actions/create-release)
14+
1115
name: pipenv PyPI Upload
1216
runs-on: ubuntu-latest
1317
env:

0 commit comments

Comments
 (0)