Skip to content

Commit 5105534

Browse files
committed
CI: Restrict default permissions
Reduces risk of arbitrary code is run by attacker.
1 parent 8ee97f9 commit 5105534

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

.github/.github/workflows/lighthouse.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Lighthouse
2+
permissions:
3+
contents: read
24
on: [push, pull_request]
35
jobs:
46
CI:

.github/.github/workflows/pre-commit.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Linting
2+
permissions:
3+
contents: read
24

35
on:
46
push:

.github/.github/workflows/publish-pypi.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: Push to PyPI
2+
permissions:
3+
contents: read
24

35
on:
46
push:
@@ -8,7 +10,10 @@ on:
810
jobs:
911
publish:
1012
runs-on: ubuntu-latest
11-
13+
permissions:
14+
id-token: write
15+
attestations: write
16+
contents: read
1217
steps:
1318
- name: Checkout
1419
uses: actions/checkout@v1

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22

33
name: Linting
4+
permissions:
5+
contents: read
46
on: [pull_request]
57

68
permissions:

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22

33
name: Release
4+
permissions:
5+
contents: read
46
on:
57
release:
68
types:

0 commit comments

Comments
 (0)