Skip to content

Commit 74e5af5

Browse files
committed
feat: tighten actions security
1 parent 793e9d6 commit 74e5af5

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/ci.yml

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

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
paths:
88
- "package.json"
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
publish-dry-run:
1215
if: "${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'chore: release v') }}"
@@ -84,6 +87,9 @@ jobs:
8487
if: needs.publish-dry-run.outputs.should_publish == 'true'
8588
runs-on: ubuntu-latest
8689
environment: production
90+
permissions:
91+
contents: read
92+
id-token: write
8793

8894
steps:
8995
- uses: actions/checkout@v4

.github/workflows/version.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ on:
1212
- minor
1313
- major
1414

15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
1519
jobs:
1620
version:
1721
if: github.ref == 'refs/heads/main'
1822
runs-on: ubuntu-latest
1923
environment: test
20-
permissions:
21-
contents: write
22-
pull-requests: write
23-
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:

0 commit comments

Comments
 (0)