Skip to content

Commit 31f5b46

Browse files
authored
ci: restrict GITHUB_TOKEN to contents:read in format and python-code-checks workflows (#457)
Closes CodeQL alerts #1, #3, #4 (format.yaml) and #5, #6 (python-code-checks.yaml) by adding a workflow-level `permissions: contents: read` block. Neither workflow needs anything beyond checkout.
1 parent 51afd81 commit 31f5b46

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/format.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
env:
99
RUSTFLAGS: "--cfg reqwest_unstable"
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
fmt:
1316
name: rustfmt

.github/workflows/python-code-checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
workflow_dispatch: null
55
workflow_call:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
lint_check:
912
name: Lint check

0 commit comments

Comments
 (0)