Skip to content

Commit 4f6c1cb

Browse files
committed
ci: harden workflow permissions and timeouts
1 parent 51140dd commit 4f6c1cb

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ jobs:
88
analyze:
99
name: Analyze
1010
runs-on: ubuntu-latest
11+
timeout-minutes: 30
1112
permissions:
1213
actions: read
1314
contents: read

.github/workflows/pages.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ on:
66
- master
77
permissions:
88
contents: read
9-
pages: write
10-
id-token: write
119
concurrency:
1210
group: "pages"
1311
cancel-in-progress: false
1412
jobs:
1513
build:
1614
runs-on: ubuntu-latest
15+
timeout-minutes: 15
1716
steps:
1817
- uses: actions/checkout@v4
1918
- uses: actions/setup-python@v5
@@ -25,10 +24,14 @@ jobs:
2524
with:
2625
path: ./site
2726
deploy:
27+
permissions:
28+
pages: write
29+
id-token: write
2830
environment:
2931
name: github-pages
3032
url: ${{ steps.deployment.outputs.page_url }}
3133
runs-on: ubuntu-latest
34+
timeout-minutes: 10
3235
needs: build
3336
steps:
3437
- name: Deploy to GitHub Pages

.github/workflows/pr-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
jobs:
1010
main:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 5
13+
permissions:
14+
pull-requests: read
1215
steps:
1316
- uses: amannn/action-semantic-pull-request@v5
1417
env:

.github/workflows/stale.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
jobs:
77
stale:
88
runs-on: ubuntu-latest
9+
timeout-minutes: 10
10+
permissions:
11+
issues: write
12+
pull-requests: write
913
steps:
1014
- uses: actions/stale@v8
1115
with:

0 commit comments

Comments
 (0)