Skip to content

Commit 33d5ff2

Browse files
committed
Limit permissions to content read for most workflows
1 parent 23ca4b9 commit 33d5ff2

File tree

6 files changed

+23
-5
lines changed

6 files changed

+23
-5
lines changed

.github/workflows/check_untested_functions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Check Untested Functions
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Lint
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]

.github/workflows/old_issues_unit_tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: issues_unit_tests
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
push:
48
branches:
59
- "main"
6-
pull_request:
7-
types:
10+
pull_request:
11+
types:
812
- opened
913
- synchronize
1014
env:
@@ -22,4 +26,4 @@ jobs:
2226
- run: pip install -e .[doc]
2327
- name: run tests
2428
shell: bash
25-
run: /bin/bash issues_tests/run_tests
29+
run: /bin/bash issues_tests/run_tests

.github/workflows/publish_to_pypi.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
tags:

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Run Tests
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [ main ]

.github/workflows/track_dependencies.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
name: Track Dependencies
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches:
69
- main
7-
10+
811
jobs:
912
generate-sbom:
1013
runs-on: ubuntu-latest
@@ -28,4 +31,3 @@ jobs:
2831
apikey: ${{ secrets.DEPENDENCY_TRACK_API_KEY }}
2932
project: '1e001e58-586c-4f01-b5f6-3b94a7c34c43'
3033
bomfilename: 'sbom.json'
31-

0 commit comments

Comments
 (0)