Skip to content

Commit 7438a8a

Browse files
authored
ci: workflows security hardening (#1385)
1 parent 8dcb584 commit 7438a8a

2 files changed

Lines changed: 8 additions & 0 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
- main
77
pull_request:
88

9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
912
jobs:
1013
unit-test:
1114
runs-on: ${{ matrix.os }}

.github/workflows/semantic-pull-request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ on:
77
- edited
88
- synchronize
99

10+
permissions: {}
1011
jobs:
1112
main:
13+
permissions:
14+
pull-requests: read # to analyze PRs (amannn/action-semantic-pull-request)
15+
statuses: write # to mark status of analyzed PR (amannn/action-semantic-pull-request)
16+
1217
runs-on: ubuntu-latest
1318
name: Semantic Pull Request
1419
steps:

0 commit comments

Comments
 (0)