Skip to content

Commit 4813289

Browse files
0x46616c6bOpenCode
andcommitted
fix: add explicit permissions to workflow files
Add minimal permissions blocks to all three workflow files to resolve code scanning alerts for missing-workflow-permissions (alerts #3, #12, #14). This follows the principle of least privilege by explicitly declaring only the permissions each workflow needs rather than inheriting the default (potentially overly broad) token permissions. - release.yml: contents: write (create/update draft releases) - auto-merge.yml: contents: read (App token handles merge operations) - cla.yml: contents: write, pull-requests: write, actions: read Co-Authored-By: OpenCode <noreply@opencode.ai>
1 parent 58dd80a commit 4813289

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/auto-merge.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Dependabot
33
on:
44
pull_request:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
dependabot:
811
name: Auto Merge

.github/workflows/cla.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
types: [opened, closed, synchronize]
88

9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
actions: read
13+
914
jobs:
1015
CLAssistant:
1116
runs-on: ubuntu-latest

.github/workflows/release.yml

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

8+
permissions:
9+
contents: write
10+
811
jobs:
912
update_release_draft:
1013
name: Update Release

0 commit comments

Comments
 (0)