Skip to content

Commit a6da66b

Browse files
committed
CodeQL: fix "Workflow does not contain permissions" warnings
1 parent c175e8e commit a6da66b

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

.github/workflows/build-dockerfile.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ defaults:
4343
run:
4444
shell: bash
4545

46+
permissions:
47+
contents: read
48+
packages: ${{ github.event_name == 'pull_request' && 'read' || 'write' }}
49+
4650
jobs:
4751
cache-test-datasets:
4852
name: Cache test dataset
@@ -52,9 +56,6 @@ jobs:
5256
name: Build Dockerfile
5357
needs: [cache-test-datasets]
5458
runs-on: ubuntu-latest
55-
permissions:
56-
contents: "read"
57-
packages: "write"
5859
steps:
5960
- uses: actions/checkout@v4
6061
with:

.github/workflows/build-package.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ defaults:
3939
run:
4040
shell: bash
4141

42+
permissions:
43+
attestations: write
44+
contents: read
45+
4246
jobs:
4347
build-package:
4448
name: Build package distribution

.github/workflows/cache-test-datasets.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ defaults:
1515
run:
1616
shell: bash
1717

18+
permissions:
19+
contents: read
20+
1821
env:
1922
TEST_MCOOL_NAME: 4DNFI9GMP2J8.mcool
2023
TEST_MCOOL_URL: "https://zenodo.org/records/14616548/files/4DNFI9GMP2J8.stripepy.mcool?download=1"

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ defaults:
3333
run:
3434
shell: bash
3535

36+
permissions:
37+
contents: read
38+
3639
jobs:
3740
matrix-factory:
3841
name: Generate job matrix

.github/workflows/lint-cff.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ defaults:
2525
run:
2626
shell: bash
2727

28+
permissions:
29+
contents: read
30+
2831
jobs:
2932
lint-cff:
3033
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)