Skip to content

Commit 68a3f35

Browse files
authored
[chore] run zizmor with fix-all (#15356)
Addresses a bunch of the zizmor warnings. --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
1 parent 7182e23 commit 68a3f35

31 files changed

Lines changed: 128 additions & 19 deletions

.github/workflows/add-labels-and-owners.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.user.login != 'renovate[bot]' && github.repository_owner == 'open-telemetry' && github.event.pull_request.draft == false }}
1717
steps:
1818
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
persist-credentials: false
1921

2022
- name: Run add-codeowners-to-pr.sh
2123
run: ./.github/workflows/scripts/add-labels-and-owners.sh

.github/workflows/add-labels-command.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-24.04
1515
steps:
1616
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
persist-credentials: false
1719

1820
- name: Run add-labels-command.sh
1921
run: ./.github/workflows/scripts/add-labels-command.sh

.github/workflows/api-compatibility.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ jobs:
2424
with:
2525
ref: ${{ github.base_ref }}
2626
path: ${{ github.base_ref }}
27+
persist-credentials: false
2728

2829
- name: Checkout-HEAD
2930
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3031
with:
3132
path: ${{ github.head_ref }}
33+
persist-credentials: false
3234

3335
- name: Setup Go
3436
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0

.github/workflows/approve-workflows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
runs-on: ubuntu-24.04
1616
steps:
1717
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
18+
with:
19+
persist-credentials: false
1820
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
1921
id: otelbot-token
2022
with:

.github/workflows/build-and-test-arm.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030
steps:
3131
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32+
with:
33+
persist-credentials: false
3234
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3335
with:
3436
go-version: oldstable
@@ -42,6 +44,7 @@ jobs:
4244
~/go/bin
4345
~/go/pkg/mod
4446
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
47+
lookup-only: true
4548
- name: Install dependencies
4649
if: steps.go-cache.outputs.cache-hit != 'true'
4750
run: make gomoddownload
@@ -53,13 +56,17 @@ jobs:
5356
needs: [arm-unittest-matrix]
5457
steps:
5558
- name: Print result
56-
run: echo ${{ needs.arm-unittest-matrix.result }}
59+
run: echo ${NEEDS_ARM_UNITTEST_MATRIX_RESULT}
60+
env:
61+
NEEDS_ARM_UNITTEST_MATRIX_RESULT: ${{ needs.arm-unittest-matrix.result }}
5762
- name: Interpret result
5863
run: |
59-
if [[ success == ${{ needs.arm-unittest-matrix.result }} ]]
64+
if [[ success == "${NEEDS_ARM_UNITTEST_MATRIX_RESULT}" ]]
6065
then
6166
echo "All matrix jobs passed!"
6267
else
6368
echo "One or more matrix jobs failed."
6469
false
6570
fi
71+
env:
72+
NEEDS_ARM_UNITTEST_MATRIX_RESULT: ${{ needs.arm-unittest-matrix.result }}

.github/workflows/build-and-test-windows.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
steps:
2525
- name: Checkout Repo
2626
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
2729
- name: Setup Go
2830
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2931
with:
@@ -38,6 +40,7 @@ jobs:
3840
~\go\pkg\mod
3941
~\AppData\Local\go-build
4042
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
43+
lookup-only: true
4144
- name: Ensure required ports in the dynamic range are available
4245
run: |
4346
& ${{ github.workspace }}\.github\workflows\scripts\win-required-ports.ps1
@@ -53,6 +56,8 @@ jobs:
5356
steps:
5457
- name: Checkout Repo
5558
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
with:
60+
persist-credentials: false
5661
- name: Setup Go
5762
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5863
with:
@@ -67,6 +72,7 @@ jobs:
6772
~\go\pkg\mod
6873
~\AppData\Local\go-build
6974
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
75+
lookup-only: true
7076
- name: Ensure required ports in the dynamic range are available
7177
run: |
7278
& ${{ github.workspace }}\.github\workflows\scripts\win-required-ports.ps1

.github/workflows/build-and-test.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout Repo
2222
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
with:
24+
persist-credentials: false
2325
- name: Setup Go
2426
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2527
with:
@@ -33,6 +35,7 @@ jobs:
3335
~/go/bin
3436
~/go/pkg/mod
3537
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
38+
lookup-only: true
3639
- name: Install dependencies
3740
if: steps.go-cache.outputs.cache-hit != 'true'
3841
run: make gomoddownload
@@ -43,6 +46,8 @@ jobs:
4346
steps:
4447
- name: Checkout Repo
4548
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49+
with:
50+
persist-credentials: false
4651
- name: Setup Go
4752
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4853
with:
@@ -56,6 +61,7 @@ jobs:
5661
~/go/bin
5762
~/go/pkg/mod
5863
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
64+
lookup-only: true
5965
- name: golint
6066
run: make -j2 golint
6167
- name: goimpi
@@ -68,6 +74,8 @@ jobs:
6874
steps:
6975
- name: Checkout Repo
7076
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
77+
with:
78+
persist-credentials: false
7179
- name: Setup Go
7280
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
7381
with:
@@ -81,6 +89,7 @@ jobs:
8189
~/go/bin
8290
~/go/pkg/mod
8391
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
92+
lookup-only: true
8493
- name: Run `govulncheck`
8594
run: make govulncheck
8695

@@ -90,6 +99,8 @@ jobs:
9099
steps:
91100
- name: Checkout Repo
92101
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
102+
with:
103+
persist-credentials: false
93104
- name: Setup Go
94105
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
95106
with:
@@ -103,6 +114,7 @@ jobs:
103114
~/go/bin
104115
~/go/pkg/mod
105116
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
117+
lookup-only: true
106118
- name: Setup Node
107119
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
108120
with:
@@ -162,6 +174,8 @@ jobs:
162174
steps:
163175
- name: Checkout Repo
164176
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
177+
with:
178+
persist-credentials: false
165179
- name: Setup Go
166180
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
167181
with:
@@ -175,11 +189,13 @@ jobs:
175189
~/go/bin
176190
~/go/pkg/mod
177191
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
192+
lookup-only: true
178193
- name: Cache Build
179194
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
180195
with:
181196
path: ~/.cache/go-build
182197
key: unittest-${{ runner.os }}-${{ matrix.runner }}-go-build-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
198+
lookup-only: true
183199
- name: Run Unit Tests
184200
run: |
185201
make -j4 gotest-with-junit
@@ -194,23 +210,29 @@ jobs:
194210
needs: [setup-environment, unittest-matrix]
195211
steps:
196212
- name: Print result
197-
run: echo ${{ needs.unittest-matrix.result }}
213+
run: echo ${NEEDS_UNITTEST_MATRIX_RESULT}
214+
env:
215+
NEEDS_UNITTEST_MATRIX_RESULT: ${{ needs.unittest-matrix.result }}
198216
- name: Interpret result
199217
run: |
200-
if [[ success == ${{ needs.unittest-matrix.result }} ]]
218+
if [[ success == "${NEEDS_UNITTEST_MATRIX_RESULT}" ]]
201219
then
202220
echo "All matrix jobs passed!"
203221
else
204222
echo "One or more matrix jobs failed."
205223
false
206224
fi
225+
env:
226+
NEEDS_UNITTEST_MATRIX_RESULT: ${{ needs.unittest-matrix.result }}
207227

208228
test-coverage:
209229
runs-on: ubuntu-latest
210230
needs: [setup-environment]
211231
steps:
212232
- name: Checkout Repo
213233
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
234+
with:
235+
persist-credentials: false
214236
- name: Setup Go
215237
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
216238
with:
@@ -224,11 +246,13 @@ jobs:
224246
~/go/bin
225247
~/go/pkg/mod
226248
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
249+
lookup-only: true
227250
- name: Cache Build
228251
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
229252
with:
230253
path: ~/.cache/go-build
231254
key: coverage-${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
255+
lookup-only: true
232256
- name: Run Unit Tests With Coverage
233257
run: make gotest-with-cover
234258
- name: Upload coverage report
@@ -281,6 +305,8 @@ jobs:
281305
steps:
282306
- name: Checkout Repo
283307
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
308+
with:
309+
persist-credentials: false
284310
- name: Setup Go
285311
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
286312
with:
@@ -294,6 +320,7 @@ jobs:
294320
~/go/bin
295321
~/go/pkg/mod
296322
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
323+
lookup-only: true
297324
- name: Build
298325
env:
299326
GOOS: ${{matrix.goos}}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
steps:
3333
- name: Checkout Repo
3434
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
with:
36+
persist-credentials: false
3537
- name: Setup Go
3638
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3739
with:

.github/workflows/builder-snapshot.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ jobs:
2424
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525
with:
2626
path: .core
27+
persist-credentials: false
2728

2829
- name: Pull the latest releases repo
2930
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3031
with:
3132
path: opentelemetry-collector-releases
3233
repository: open-telemetry/opentelemetry-collector-releases
34+
persist-credentials: false
3335

3436
- name: Copy release files
3537
run: cp -R ./opentelemetry-collector-releases/cmd/builder/. ./.core/cmd/builder/
@@ -58,6 +60,7 @@ jobs:
5860
~/go/bin
5961
~/go/pkg/mod
6062
key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
63+
lookup-only: true
6164

6265
- name: Check GoReleaser
6366
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2

.github/workflows/changelog.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131
with:
3232
fetch-depth: 0
33+
persist-credentials: false
3334
- name: Setup Go
3435
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3536
with:

0 commit comments

Comments
 (0)