-
Notifications
You must be signed in to change notification settings - Fork 0
fix: upgrade upload-pages-artifact to v4 and add zizmor workflow linting #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Workflow Security | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - ".github/workflows/**" | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - ".github/workflows/**" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| zizmor: | ||
| name: zizmor | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| contents: read | ||
| actions: read | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run zizmor | ||
| uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 | ||
|
Comment on lines
+29
to
+30
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify SHA 71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 is tagged as v0.5.2
gh api repos/zizmorcore/zizmor-action/git/ref/tags/v0.5.2 --jq '.object.sha'Repository: Aureliolo/synthorg Length of output: 222 🏁 Script executed: cat -n .github/workflows/zizmor.ymlRepository: Aureliolo/synthorg Length of output: 862 🌐 Web query:
💡 Result:
That commit is titled “Sync zizmor versions ( SHA is correctly pinned to v0.5.2; consider adding The SHA-pinned action reference correctly follows repository conventions. Adding 💡 Optional: Add workflow_dispatch trigger on:
push:
branches: [main]
paths:
- ".github/workflows/**"
pull_request:
branches: [main]
paths:
- ".github/workflows/**"
+ workflow_dispatch:🤖 Prompt for AI Agents
Comment on lines
+29
to
+30
|
||
| with: | ||
| advanced-security: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull_requestworkflows triggered from forks will receive a read-only GITHUB_TOKEN, sosecurity-events: write(and SARIF upload) will fail in that context. Consider limiting SARIF upload topushonmain(or gating the upload step ongithub.event_name == 'push') while still running the analysis on PRs, so external PRs don't fail spuriously.