Skip to content

Commit 6d2c8df

Browse files
committed
Tighten GitHub CI/CD permissions and other corrections
1 parent 363e82b commit 6d2c8df

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

.github/labeler.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,22 @@ Github-files:
55
- '.github/**'
66

77
Tests:
8-
- 'tests/**'
9-
10-
Analysis:
11-
- 'analysis/**'
8+
- 'src/tests/**'
129

1310
Core:
14-
- 'core/**'
11+
- 'src/libinspector/**.py'
12+
- 'pyproject.toml'
13+
- 'setup.py'
14+
- 'uv.lock'
15+
16+
Scripts:
17+
- '**/*.sh'
18+
- '**/*.ps1'
19+
- '**/*.bat'
1520

1621
Data:
17-
- 'data/**'
22+
- 'src/libinspector/data/**'
1823

19-
UI:
20-
- 'ui/**'
24+
Streamlit:
25+
- 'src/libinspector/.streamlit/**'
26+
- '.streamlit/**'

.github/workflows/create_release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ on:
66
branches:
77
- master
88

9+
# Set no permissions by default. This is the most secure practice.
10+
# We will grant specific permissions to each job that needs them.
11+
permissions: {}
12+
913
jobs:
1014
create_release:
1115
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
1218
outputs:
1319
v-version: ${{ steps.version.outputs.v-version }}
1420
steps:
@@ -22,6 +28,8 @@ jobs:
2228

2329
build:
2430
runs-on: ${{ matrix.os }}
31+
permissions:
32+
contents: read
2533
needs: [create_release]
2634
strategy:
2735
fail-fast: false
@@ -101,6 +109,9 @@ jobs:
101109
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102110
with:
103111
tag_name: ${{ needs.create_release.outputs.v-version }}
112+
draft: false
113+
generate_release_notes: true
114+
prerelease: false
104115
files: |
105116
dist/*.exe
106117
dist/*.whl

.github/workflows/inspector_test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ on:
77
schedule:
88
- cron: '0 0 */30 * *'
99

10+
# Set no permissions by default. This is the most secure practice.
11+
# We will grant specific permissions to each job that needs them.
12+
permissions: {}
13+
1014
jobs:
1115
build:
1216
runs-on: ${{ matrix.os }}
17+
permissions:
18+
contents: read
1319
strategy:
1420
fail-fast: false
1521
matrix:

0 commit comments

Comments
 (0)