Skip to content

Commit e9d57d9

Browse files
Update zizmor to use offline mode (#34)
* update zizmor to run offline (needs version bump) * remove token job and enable offline mode
1 parent f6d8fdb commit e9d57d9

File tree

1 file changed

+3
-37
lines changed

1 file changed

+3
-37
lines changed

.github/workflows/self-zizmor.yaml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -27,58 +27,24 @@ jobs:
2727
FOUND_FILES=true
2828
fi
2929
echo "found-files=${FOUND_FILES}" >> $GITHUB_OUTPUT
30-
get-github-token:
31-
name: Get GitHub Token
32-
runs-on: ${{ !github.event.repository.private && 'ubuntu-latest' || 'ubuntu-arm64-small' }}
33-
outputs:
34-
token: ${{ steps.set-output.outputs.token }}
35-
permissions:
36-
id-token: write
37-
steps:
38-
- id: get-secrets
39-
uses: grafana/shared-workflows/actions/[email protected]
40-
continue-on-error: true # Will fail for external repos
41-
with:
42-
# Secrets placed in the ci/common/<path> path in Vault
43-
common_secrets: |
44-
ZIZMOR_APP_ID=zizmor:app-id
45-
ZIZMOR_PRIVATE_KEY=zizmor:private-key
46-
- name: Get GitHub Token
47-
id: get-github-token
48-
uses: actions/create-github-app-token@v2
49-
continue-on-error: true
50-
if: ${{ env.ZIZMOR_APP_ID != '' }}
51-
with:
52-
app-id: ${{ env.ZIZMOR_APP_ID }}
53-
private-key: ${{ env.ZIZMOR_PRIVATE_KEY }}
54-
owner: ${{ github.repository_owner }}
55-
56-
- name: Set Output
57-
id: set-output
58-
shell: bash
59-
env:
60-
TOKEN: ${{ steps.get-github-token.outputs.token || github.token}}
61-
run: |
62-
echo "token=${TOKEN}" >> $GITHUB_OUTPUT
6330
zizmor:
6431
name: Run zizmor from current branch (self test)
6532

6633
permissions:
6734
actions: read
6835
contents: read
69-
36+
id-token: write
7037
pull-requests: write
7138
security-events: write
7239

7340
needs:
7441
- zizmor-check
75-
- get-github-token
7642
if: ${{ needs.zizmor-check.outputs.found-files == 'true' }}
7743

78-
uses: grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@b502a15952bab7f72daa1f8ce115491a6d97be59
44+
uses: grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@8ce69f8316247b9c75380ddb1f69df42d6d3a913
7945
with:
8046
runs-on: ${{ !github.event.repository.private && 'ubuntu-latest' || 'ubuntu-arm64-small' }}
8147
fail-severity: never
8248
min-severity: high
8349
min-confidence: low
84-
github-token: ${{ needs.get-github-token.outputs.token }}
50+
extra-args: --offline

0 commit comments

Comments
 (0)