Skip to content

Commit 8ec0ee1

Browse files
author
Ciprian Goea
authored
chore: fix zizmor findings (#52)
1 parent dec4006 commit 8ec0ee1

File tree

7 files changed

+69
-26
lines changed

7 files changed

+69
-26
lines changed

.github/workflows/auto-close.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ on:
1212
schedule:
1313
- cron: '30 1 * * *' # run every day
1414
workflow_dispatch: {}
15-
15+
permissions: {}
1616
jobs:
1717
stale-auto-close:
18-
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
18+
permissions:
19+
contents: read # branch delete will be handled by the repo settings
20+
issues: write
21+
pull-requests: write
22+
runs-on: ubuntu-latest
1923
steps:
20-
- uses: actions/stale@v5.1.1
24+
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
2125
with:
2226
repo-token: ${{ secrets.GITHUB_TOKEN }}
2327
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Make a comment or update the PR to avoid closing PR after 15 days.'

.github/workflows/auto-update.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@ on:
1414
- main
1515
- release-*
1616

17+
permissions: {}
18+
1719
concurrency:
1820
group: ${{ github.workflow }}-${{ github.ref }}
1921
cancel-in-progress: true
2022

2123
jobs:
2224
Auto-Update-PR:
25+
permissions:
26+
contents: read
27+
pull-requests: write
2328
runs-on: ubuntu-latest
2429
steps:
25-
- uses: tibdex/[email protected]
30+
- uses: tibdex/auto-update@4081c5bdc34560b58288a010318054e63e6f4a51 # v2.2.1
2631
with:
2732
github_token: ${{ secrets.SYS_ORCH_GITHUB }}
2833

.github/workflows/co-integration-test.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,39 @@ on:
1414

1515
jobs:
1616
integration-smoke-test:
17+
permissions:
18+
contents: read
1719
runs-on: ubuntu-24.04-16core-64GB
1820
if: true
1921
env:
2022
VERSION: ${{ github.head_ref }} # Use the component branch that triggered the action for the test
2123
steps:
2224
- name: Checkout orch ci
23-
uses: actions/checkout@v4
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2426
with:
2527
repository: open-edge-platform/orch-ci
2628
path: ci
2729
ref: "main"
2830
token: ${{ secrets.SYS_ORCH_GITHUB }}
31+
persist-credentials: false
2932

3033
- name: Checkout cluster-tests for integration tests
31-
uses: actions/checkout@v4
34+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3235
with:
3336
repository: open-edge-platform/cluster-tests
3437
path: cluster-tests
3538
ref: "main"
3639
token: ${{ secrets.SYS_ORCH_GITHUB }}
40+
persist-credentials: false
3741

3842
- name: Bootstrap CI environment
3943
uses: ./ci/.github/actions/bootstrap
4044
with:
4145
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
4246

4347
- name: Run make test with additional config
48+
env:
49+
VERSION: ${{ env.VERSION }}
4450
run: |
4551
cd cluster-tests
46-
ADDITIONAL_CONFIG="{\"components\":[{\"name\":\"cluster-manager\", \"skip-local-build\": false, \"git-repo\": {\"version\":\"${{ env.VERSION }}\"}}]}" make test
52+
ADDITIONAL_CONFIG="{\"components\":[{\"name\":\"cluster-manager\", \"skip-local-build\": false, \"git-repo\": {\"version\":\"${VERSION}\"}}]}" make test

.github/workflows/post-merge.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ on:
1111
- main
1212
- release-*
1313
workflow_dispatch:
14-
14+
permissions: {}
1515
jobs:
1616
post-merge:
17-
uses: open-edge-platform/orch-ci/.github/workflows/post-merge.yml@main
17+
permissions:
18+
contents: read
19+
security-events: write
20+
id-token: write
21+
uses: open-edge-platform/orch-ci/.github/workflows/post-merge.yml@13722579bc8edfb712203cb8e88fcc404d2218bc # 0.1.9
1822
with:
1923
run_build: true
2024
run_version_check: true
@@ -28,4 +32,4 @@ jobs:
2832
run_docker_push: true
2933
run_helm_build: true
3034
run_helm_push: true
31-
secrets: inherit
35+
secrets: inherit # zizmor: ignore[secrets-inherit]

.github/workflows/pre-merge.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@ on:
1212
- release-*
1313
workflow_dispatch:
1414

15+
permissions: {}
16+
1517
jobs:
1618
lint:
19+
permissions:
20+
contents: read
1721
runs-on: ubuntu-latest
1822
steps:
1923
- name: Checkout PR
20-
uses: actions/checkout@v4
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2125
with:
2226
ref: ${{ github.head_ref }}
27+
persist-credentials: false
2328

2429
- name: "Setup"
25-
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@main
30+
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@13722579bc8edfb712203cb8e88fcc404d2218bc # 0.1.9
2631
with:
2732
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
2833
bootstrap_tools: "go,gotools,nodejs"
@@ -33,7 +38,7 @@ jobs:
3338
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
3439
3540
- name: Cache build artifact
36-
uses: actions/cache@v4
41+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
3742
with:
3843
path: |
3944
${{ env.GOCACHE }}
@@ -45,15 +50,18 @@ jobs:
4550
run: make lint
4651

4752
build:
53+
permissions:
54+
contents: read
4855
runs-on: ubuntu-latest
4956
steps:
5057
- name: Checkout PR
51-
uses: actions/checkout@v4
58+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5259
with:
5360
ref: ${{ github.head_ref }}
61+
persist-credentials: false
5462

5563
- name: "Setup"
56-
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@main
64+
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@13722579bc8edfb712203cb8e88fcc404d2218bc # 0.1.9
5765
with:
5866
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
5967
bootstrap_tools: "go,gotools"
@@ -64,7 +72,7 @@ jobs:
6472
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
6573
6674
- name: Cache build artifact
67-
uses: actions/cache@v4
75+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6876
with:
6977
path: |
7078
${{ env.GOCACHE }}
@@ -75,15 +83,18 @@ jobs:
7583
run: make build
7684

7785
test:
86+
permissions:
87+
contents: read
7888
runs-on: ubuntu-latest
7989
steps:
8090
- name: Checkout PR
81-
uses: actions/checkout@v4
91+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8292
with:
8393
ref: ${{ github.head_ref }}
94+
persist-credentials: false
8495

8596
- name: "Setup"
86-
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@main
97+
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@13722579bc8edfb712203cb8e88fcc404d2218bc # 0.1.9
8798
with:
8899
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
89100
bootstrap_tools: "go,gotools"
@@ -94,7 +105,7 @@ jobs:
94105
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
95106
96107
- name: Cache build artifact
97-
uses: actions/cache@v4
108+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
98109
with:
99110
path: |
100111
${{ env.GOCACHE }}
@@ -105,6 +116,8 @@ jobs:
105116
run: make test
106117

107118
pre-merge:
119+
permissions:
120+
contents: read
108121
needs: [lint, build, test]
109122
uses: open-edge-platform/orch-ci/.github/workflows/pre-merge.yml@main
110123
with:
@@ -122,4 +135,4 @@ jobs:
122135
run_docker_push: true
123136
run_helm_build: true
124137
run_helm_push: true
125-
secrets: inherit
138+
secrets: inherit

.github/workflows/service-test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
---
55

66
name: Run service tests
7-
7+
8+
permissions: {}
9+
810
on:
911
pull_request:
1012
branches:
@@ -14,15 +16,18 @@ on:
1416

1517
jobs:
1618
integration-smoke-test:
19+
permissions:
20+
contents: read
1721
runs-on: ubuntu-latest
1822
steps:
1923
- name: Checkout orch ci
20-
uses: actions/checkout@v4
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2125
with:
2226
ref: ${{ github.head_ref }}
27+
persist-credentials: false
2328

2429
- name: Bootstrap CI environment
25-
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@main
30+
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@13722579bc8edfb712203cb8e88fcc404d2218bc # 0.1.9
2631
with:
2732
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
2833

.github/workflows/validate-openapi.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ on:
1010
paths:
1111
- 'api/openapi/openapi.yaml'
1212

13+
permissions: {}
14+
1315
jobs:
1416
check-generate:
15-
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
17+
permissions:
18+
contents: read
19+
runs-on: ubuntu-latest
1620

1721
steps:
1822
- name: Checkout repository
19-
uses: actions/checkout@v4
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
with:
25+
persist-credentials: false
2026

2127
- name: Bootstrap CI environment
22-
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@main
28+
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@13722579bc8edfb712203cb8e88fcc404d2218bc # 0.1.9
2329
with:
2430
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
2531

0 commit comments

Comments
 (0)