Skip to content

Commit 1183469

Browse files
jkennedyvzPosture Fix
andauthored
ci: add minimum workflow permissions (#106)
- Add top-level `permissions: contents: read` to all 4 workflow files - Change release-doctor.yml trigger from `pull_request` to `pull_request_target` to prevent secret exfiltration via PR-controlled workflow modifications Co-authored-by: Posture Fix <posture-fix@langchain.ai>
1 parent 5f83650 commit 1183469

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
- 'stl-preview-head/**'
1515
- 'stl-preview-base/**'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
lint:
1922
timeout-minutes: 15

.github/workflows/codeql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
branches: [main, next]
88
schedule:
99
- cron: "0 0 * * 0" # Weekly scan on Sunday at midnight
10+
11+
permissions:
12+
contents: read
13+
1014
jobs:
1115
analyze:
1216
name: Analyze

.github/workflows/publish-sonatype.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
release:
99
types: [published]
1010

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

.github/workflows/release-doctor.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
name: Release Doctor
22
on:
3-
pull_request:
3+
pull_request_target:
44
branches:
55
- main
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
release_doctor:
1013
name: release doctor

0 commit comments

Comments
 (0)