Skip to content

Commit 5a2f21f

Browse files
Adopt shared zizmor workflow (#528)
* Add shared zizmor workflow * Fix blocking zizmor findings * Add shared zizmor workflow * Add trailing newline * Clarify CodeQL release branch comment * Document zizmor schedule * Run zizmor on all pull requests * Scan release branch pushes with zizmor --------- Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
1 parent 2a9875b commit 5a2f21f

5 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/auto-update-semconv.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
with:
5757
client-id: ${{ vars.OTELBOT_SEMANTIC_CONVENTIONS_JAVA_CLIENT_ID }}
5858
private-key: ${{ secrets.OTELBOT_SEMANTIC_CONVENTIONS_JAVA_PRIVATE_KEY }}
59+
permission-contents: write
60+
permission-pull-requests: write
5961

6062
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6163
with:

.github/workflows/codeql.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
distribution: temurin
3939
java-version: 21
4040

41-
- name: Set up gradle
41+
# This workflow analyzes release branches but does not build or publish release artifacts.
42+
- name: Set up gradle # zizmor: ignore[cache-poisoning]
4243
if: matrix.language == 'java'
4344
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
4445

.github/workflows/prepare-release-branch.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
with:
6868
client-id: ${{ vars.OTELBOT_CLIENT_ID }}
6969
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
70+
permission-pull-requests: write
7071

7172
- name: Create pull request against the release branch
7273
env:
@@ -115,6 +116,7 @@ jobs:
115116
with:
116117
client-id: ${{ vars.OTELBOT_CLIENT_ID }}
117118
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
119+
permission-pull-requests: write
118120

119121
- name: Create pull request against main
120122
env:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ jobs:
202202
with:
203203
client-id: ${{ vars.OTELBOT_CLIENT_ID }}
204204
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
205+
permission-pull-requests: write
205206

206207
- name: Create pull request against main
207208
env:

.github/workflows/zizmor.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/*
8+
pull_request:
9+
schedule:
10+
- cron: '53 6 * * 4' # weekly at 06:53 UTC on Thursday
11+
workflow_dispatch:
12+
13+
permissions: {}
14+
15+
jobs:
16+
zizmor:
17+
permissions:
18+
contents: read # for actions/checkout
19+
security-events: write # for zizmor to upload SARIF results
20+
uses: open-telemetry/shared-workflows/.github/workflows/zizmor.yml@7c49790392da7de86fdb4bb968446f9cb8461eb8 # v0.3.1

0 commit comments

Comments
 (0)