Skip to content

Commit 0261125

Browse files
dpark01claude
andcommitted
Add explicit permissions to workflow jobs (CodeQL fixes)
- Add contents: read permission to paths-filter and get-version jobs - Add contents: read and packages: read permissions to all test jobs - Add contents: read permission to docs build job Fixes CodeQL alerts for missing-workflow-permissions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 59fedf4 commit 0261125

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/docker.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
# Determine which paths changed to enable smart test filtering
2020
paths-filter:
2121
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
2224
outputs:
2325
core: ${{ steps.filter.outputs.core }}
2426
assemble: ${{ steps.filter.outputs.assemble }}
@@ -76,6 +78,8 @@ jobs:
7678
# Calculate version from git describe (once, shared by all jobs)
7779
get-version:
7880
runs-on: ubuntu-latest
81+
permissions:
82+
contents: read
7983
outputs:
8084
version: ${{ steps.version.outputs.version }}
8185
steps:
@@ -427,6 +431,9 @@ jobs:
427431
needs: [paths-filter, get-version, build-core]
428432
if: needs.paths-filter.outputs.core == 'true' || needs.paths-filter.outputs.docker == 'true'
429433
runs-on: ubuntu-latest
434+
permissions:
435+
contents: read
436+
packages: read
430437

431438
steps:
432439
- name: Checkout repository
@@ -493,6 +500,9 @@ jobs:
493500
needs: [paths-filter, get-version, build-core, build-derivatives]
494501
if: needs.paths-filter.outputs.assemble == 'true' || needs.paths-filter.outputs.core == 'true' || needs.paths-filter.outputs.docker == 'true'
495502
runs-on: ubuntu-latest
503+
permissions:
504+
contents: read
505+
packages: read
496506

497507
steps:
498508
- name: Checkout repository
@@ -567,6 +577,9 @@ jobs:
567577
needs: [paths-filter, get-version, build-core, build-derivatives]
568578
if: needs.paths-filter.outputs.classify == 'true' || needs.paths-filter.outputs.core == 'true' || needs.paths-filter.outputs.docker == 'true'
569579
runs-on: ubuntu-latest
580+
permissions:
581+
contents: read
582+
packages: read
570583

571584
steps:
572585
- name: Checkout repository
@@ -641,6 +654,9 @@ jobs:
641654
needs: [paths-filter, get-version, build-core, build-derivatives]
642655
if: needs.paths-filter.outputs.phylo == 'true' || needs.paths-filter.outputs.core == 'true' || needs.paths-filter.outputs.docker == 'true'
643656
runs-on: ubuntu-latest
657+
permissions:
658+
contents: read
659+
packages: read
644660

645661
steps:
646662
- name: Checkout repository

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ on:
2222
jobs:
2323
build-docs:
2424
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
2527

2628
steps:
2729
- name: Checkout repository

0 commit comments

Comments
 (0)