Skip to content

Commit 749da92

Browse files
authored
ci: adopt deny-all top-level workflow permissions (#155)
Sets each workflow's top-level `permissions:` to `{}` (deny-all) and moves the previously top-level grants into the specific jobs that inherited them. **Effective permissions are unchanged for every job** — this just makes the grants explicit per job so a newly-added job can't silently inherit broad scopes. Behavior-preserving mechanical change (validated: all touched workflows still parse; per-job effective scopes identical). Workflows whose jobs inherit the org default are left untouched for a manual per-job pass. _Flagged by github-maintenance Workflow Permissions Audit._
1 parent bdd67d1 commit 749da92

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/demo.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
branches:
66
- main
77

8-
permissions:
9-
contents: read
8+
permissions: {}
109

1110
jobs:
1211
build:
@@ -38,6 +37,8 @@ jobs:
3837
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
3938
with:
4039
path: './demo/dist'
40+
permissions:
41+
contents: read
4142

4243
deploy:
4344
name: 🚀 Deploy

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Release
22

3-
permissions:
4-
contents: read
3+
permissions: {}
54

65
on:
76
push:
@@ -73,6 +72,8 @@ jobs:
7372
LICENSE
7473
retention-days: 1
7574
if-no-files-found: error
75+
permissions:
76+
contents: read
7677

7778
publish:
7879
needs: build
@@ -131,3 +132,5 @@ jobs:
131132
status: ${{ (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && 'failure' || 'success' }}
132133
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_RELEASES }}
133134
artifact-url: "https://npmjs.com/package/@marimo-team/codemirror-sql"
135+
permissions:
136+
contents: read

0 commit comments

Comments
 (0)