-
Notifications
You must be signed in to change notification settings - Fork 4
feat(zizmor): run zizmor against actions and workflows #20
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 1 commit
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 |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ jobs: | |
| steps: | ||
| - name: Generate token | ||
| id: generate-token | ||
| uses: tibdex/github-app-token@v1 | ||
| uses: tibdex/github-app-token@32691ba7c9e7063bd457bd8f2a5703138591fa58 # v1 | ||
| continue-on-error: true | ||
| with: | ||
| app_id: ${{ secrets.DEPENDABOTREVIEWER_ID }} | ||
|
|
@@ -40,9 +40,10 @@ jobs: | |
| id: dependabot-metadata | ||
| uses: dependabot/[email protected] | ||
| - name: Enable auto-merge for Dependabot PRs | ||
| run: gh pr merge --auto --${{ inputs.repository-merge-method }} "$PR_URL" | ||
| run: gh pr merge --auto --${MERGE_METHOD} "$PR_URL" | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token || secrets.envPAT || secrets.GITHUB_TOKEN}} | ||
| MERGE_METHOD: ${{ inputs.repository-merge-method }} | ||
| - name: Approve patch updates | ||
| if: ${{ steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' }} | ||
| run: gh pr review $PR_URL --approve -b "**Approving** patch update" | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||||||
| name: zizmor GitHub Actions static analysis | ||||||||||
| on: | ||||||||||
| push: | ||||||||||
| pull_request: | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| zizmor: | ||||||||||
| name: Run zizmor from current branch (self test) | ||||||||||
|
|
||||||||||
| permissions: | ||||||||||
| actions: read | ||||||||||
| contents: read | ||||||||||
|
|
||||||||||
| pull-requests: write | ||||||||||
| security-events: write | ||||||||||
|
|
||||||||||
| uses: grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@5946b80e86f32bb4d208c2483c58345bbeef03d2 | ||||||||||
| with: | ||||||||||
iainlane marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| codeql-enabled: false | ||||||||||
|
||||||||||
| uses: grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@5946b80e86f32bb4d208c2483c58345bbeef03d2 | |
| with: | |
| codeql-enabled: false | |
| uses: grafana/shared-workflows/.github/workflows/reusable-zizmor.yml@8fa210559ab2cc62e7b12d3bb9cba19dbc862c11 |
to use that, and upload the results where we can.
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.
OK we're there 👍 I updated the suggestion with the SHA
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.
Just to confirm, this will go straight to blocking - is that the intention?
To do "informational only", it'd be
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.
The intention is that it'd be a failing test, but not "required" if there's anything that's high or above (which I think is the default). So it shouldn't immediately block, and then the "required" one would block on failure once we turn that one on
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.
Ok - just as a note of caution: I've rolled out changes like that before, and I'd say that the notion of a required check is not super well understood. We ended up getting quite a few questions from folks asking how they could unblock their stuff, when it never was blocked, because they'd seen the ❌.
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.
Ahh I see, yeah, I think in this case we probably kinda want that behaviour, no technical block, but prompting folks to update their workflows with the suggestion.