Skip to content

Commit ca251d5

Browse files
committed
Improve GHA security
1 parent dad6b8f commit ca251d5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
pull_request:
99
branches:
1010
- master
11+
permissions:
12+
contents: read
1113
jobs:
1214
test:
1315
runs-on: ubuntu-latest
@@ -22,6 +24,8 @@ jobs:
2224
- "3.13"
2325
steps:
2426
- uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
2529
- uses: actions/setup-python@v5
2630
with:
2731
allow-prereleases: true

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
26+
with:
27+
persist-credentials: false
2628

2729
- name: Initialize CodeQL
2830
uses: github/codeql-action/init@v3

0 commit comments

Comments
 (0)