Skip to content

Commit 0f3b041

Browse files
committed
ci: fix all medium-severity zizmor findings and set --min-severity medium
1 parent 1f93062 commit 0f3b041

6 files changed

Lines changed: 47 additions & 12 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@ updates:
55
schedule:
66
interval: 'daily'
77
time: '02:00'
8+
cooldown:
9+
default-days: 7
810
target-branch: 'main'
911
- package-ecosystem: 'github-actions'
1012
directory: '/'
1113
schedule:
1214
interval: 'daily'
1315
time: '03:00'
16+
cooldown:
17+
default-days: 7
1418
target-branch: 'main'
1519
- package-ecosystem: 'devcontainers'
1620
directory: '/'
1721
schedule:
1822
interval: 'weekly'
23+
cooldown:
24+
default-days: 7
1925
target-branch: 'main'

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ on:
2121
schedule:
2222
- cron: '35 14 * * 3'
2323

24-
permissions:
25-
actions: read
26-
contents: read
27-
security-events: write
24+
permissions: {}
2825

2926
jobs:
3027
analyze:
3128
name: Analyze
3229
runs-on: ubuntu-latest
30+
permissions:
31+
actions: read
32+
contents: read
33+
security-events: write
3334

3435
strategy:
3536
fail-fast: false
@@ -39,6 +40,8 @@ jobs:
3940
steps:
4041
- name: Checkout repository
4142
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
with:
44+
persist-credentials: false
4245

4346
# Initializes the CodeQL tools for scanning.
4447
- name: Initialize CodeQL

.github/workflows/deploy-docs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ on:
33
push:
44
branches:
55
- main
6+
7+
permissions: {}
8+
69
jobs:
710
build-and-deploy-docs:
811
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
914
steps:
1015
- name: Checkout
1116
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
persist-credentials: false
1219
- name: Setup Node.js
1320
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
1421
with:

.github/workflows/generate-javascript.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: write # Push generated branch
23-
pull-requests: write # Create PR via repo-sync/pull-request
23+
pull-requests: write # Create PR via gh CLI
2424
steps:
2525
- name: Checkout Javascript
2626
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
2729
- name: Setup Node
2830
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2931
with:
@@ -50,13 +52,19 @@ jobs:
5052
# we modify the settings file in "Generate Openapi" but do not want to commit this
5153
git reset settings
5254
git commit -s -m "Automated openapi generation from ${KUBERNETES_BRANCH}"
55+
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
5356
git push origin "$BRANCH"
5457
env:
5558
KUBERNETES_BRANCH: ${{ github.event.inputs.kubernetesBranch }}
56-
- name: Pull Request
57-
uses: repo-sync/pull-request@7e79a9f5dc3ad0ce53138f01df2fad14a04831c5 # v2.12.1
58-
with:
59-
source_branch: ${{ env.BRANCH }}
60-
destination_branch: ${{ github.ref_name }}
61-
github_token: ${{ secrets.GITHUB_TOKEN }}
62-
pr_title: 'Automated Generate from openapi ${{ github.event.inputs.kubernetesBranch }}'
59+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
- name: Create Pull Request
61+
run: |
62+
gh pr create \
63+
--base "${BASE_BRANCH}" \
64+
--head "$BRANCH" \
65+
--title "Automated Generate from openapi ${KUBERNETES_BRANCH}" \
66+
--body "Automated openapi generation from ${KUBERNETES_BRANCH}"
67+
env:
68+
KUBERNETES_BRANCH: ${{ github.event.inputs.kubernetesBranch }}
69+
BASE_BRANCH: ${{ github.ref_name }}
70+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
steps:
3737
- name: Checkout Javascript
3838
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39+
with:
40+
persist-credentials: false
3941
- name: Setup Node
4042
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4143
with:
@@ -62,6 +64,8 @@ jobs:
6264
- name: Push tag
6365
if: ${{ github.event.inputs.dry_run != 'true' }}
6466
run: |
67+
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
6568
git push origin "${RELEASE_VERSION}"
6669
env:
6770
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

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

9+
permissions: {}
10+
911
jobs:
1012
build:
1113
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
1216
strategy:
1317
matrix:
1418
node: ['25', '24', '23', '22', '20', '18']
1519
name: Node ${{ matrix.node }} validation
1620
steps:
1721
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
1824
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
1925
with:
2026
node-version: ${{ matrix.node }}
@@ -48,3 +54,4 @@ jobs:
4854
with:
4955
advanced-security: false
5056
persona: pedantic
57+
min-severity: medium

0 commit comments

Comments
 (0)