Skip to content

Commit feb36aa

Browse files
ackizilkaleclaude
andcommitted
ci: add least-privilege permissions and pin softprops/action-gh-release
Resolves the 5 open CodeQL alerts on the repository: - Add explicit `permissions:` blocks to all workflow jobs (contents: read for build/test/publish-pypi; contents: write for the GitHub release job that creates releases). - Pin softprops/action-gh-release@v1 to its commit SHA. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5faa5a6 commit feb36aa

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
jobs:
1212
publish-pypi:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
1416
steps:
1517
- uses: actions/checkout@v4
1618
- name: Set up Python
@@ -32,10 +34,12 @@ jobs:
3234
needs: publish-pypi
3335
name: Create Release
3436
runs-on: ubuntu-latest
37+
permissions:
38+
contents: write
3539
steps:
3640
- uses: actions/checkout@v4
3741
- name: Create Release
38-
uses: softprops/action-gh-release@v1
42+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
3943
with:
4044
name: Release ${{ github.ref_name }}
4145
draft: false

.github/workflows/run_annotation_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
annotation-tests:
1414
runs-on: ${{ matrix.os }}
1515
timeout-minutes: 20
16+
permissions:
17+
contents: read
1618
strategy:
1719
fail-fast: false
1820
matrix:

.github/workflows/run_tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
build:
1313
runs-on: ${{ matrix.os }}
1414
timeout-minutes: 20
15+
permissions:
16+
contents: read
1517
strategy:
1618
fail-fast: false
1719
matrix:

0 commit comments

Comments
 (0)