Skip to content

Commit 2a4885e

Browse files
committed
feat: add permissions section to workflows for least-privilege security
1 parent 9f2e2eb commit 2a4885e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Check compilation
22

33
on: [push, pull_request]
44

5+
permissions: {} # lock everything by default (least-privilege)
6+
57
jobs:
68
build:
79
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
812

913
steps:
1014
- name: Checkout repository

.github/workflows/security-code-scanner.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
required: false
1616
workflow_dispatch:
1717

18+
permissions: {} # lock everything by default (least-privilege)
19+
1820
jobs:
1921
security-scan:
2022
uses: MetaMask/action-security-code-scanner/.github/workflows/security-scan.yml@v2

0 commit comments

Comments
 (0)