Skip to content

Commit f89172e

Browse files
committed
CI: Restrict default permissions
Reduces risk of arbitrary code is run by attacker.
1 parent f637099 commit f89172e

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

.github/workflows/black.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Lint with Black
2+
permissions:
3+
contents: read
24

35
on: [push, pull_request]
46

.github/workflows/check-test-coverage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Coverage (with doctests)
2+
permissions:
3+
contents: read
24
on:
35
push:
46
branches: [ master ]

.github/workflows/python-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

44
name: Publish Python Package
5+
permissions:
6+
contents: read
57

68
on:
79
release:

.github/workflows/python-runlinter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
name: Lint with flake8
5+
permissions:
6+
contents: read
57

68
on:
79
push:

.github/workflows/python-runtests-all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
name: Run units test (w/ img comps)
5+
permissions:
6+
contents: read
57

68
on:
79
push:

0 commit comments

Comments
 (0)