Skip to content

Commit 9743a08

Browse files
committed
ci: add explicit least-privilege permissions to workflow
CodeQL (actions/missing-workflow-permissions, medium) flagged the workflow for relying on the repository's default GITHUB_TOKEN scopes, which can be broader than the workflow needs. Declares `permissions: contents: read` at the top level (only checkout needs write — and CI doesn't push). Jobs that need extra scopes (e.g. PyPI publish with id-token: write) override at the job level. Part of org-wide CodeQL hygiene sweep — same one-line addition in cycles-server, cycles-server-admin, cycles-server-events, cycles-dashboard, cycles-client-python, cycles-spring-boot-starter.
1 parent 6729c94 commit 9743a08

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
ci:
1114
uses: runcycles/.github/.github/workflows/ci-python.yml@main

.github/workflows/python-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
- testpypi
1616
- pypi
1717

18+
# Default least-privilege; publish-* jobs override with id-token: write.
19+
permissions:
20+
contents: read
21+
1822
jobs:
1923
build:
2024
name: Build distributions

0 commit comments

Comments
 (0)