Skip to content

Run Zizmor on all generated workflows in CI - #50641

Merged
pelikhan merged 3 commits into
mainfrom
copilot/gh-aw-extend-zizmor-in-ci
Aug 5, 2026
Merged

Run Zizmor on all generated workflows in CI#50641
pelikhan merged 3 commits into
mainfrom
copilot/gh-aw-extend-zizmor-in-ci

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

gh-aw generates GitHub Actions workflows, but CI only scanned a single workflow (poem-bot) with Zizmor, and only on main. This lets Zizmor findings ship in the generated .lock.yml files, blocking gh-aw CLI upgrades for downstream projects (e.g. Argo CD) that run Zizmor on their own CI.

Changes

  • New zizmor job in .github/workflows/cgo.yml — depends on build, restores the checkout cache, downloads the already-built gh-aw-linux-amd64 artifact (no rebuild), and runs ./gh-aw compile --zizmor --verbose to scan all repository workflows on every CI event.
  • Wired into notify-failure so failures surface through the existing aggregation.
  zizmor:
    needs: [build]
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
    - name: Restore checkout
      uses: actions/cache/restore@...
      with: { path: ., key: checkout-${{ github.sha }}, fail-on-cache-miss: true }
    - name: Download gh-aw binary
      uses: actions/download-artifact@...
      with: { name: gh-aw-linux-amd64 }
    - name: Make gh-aw executable
      run: chmod +x gh-aw
    - name: Run zizmor security scan on all workflows
      run: ./gh-aw compile --zizmor --verbose
      env: { GH_TOKEN: ${{ github.token }} }

Unlike the pre-existing security-scan matrix (main-only, single workflow), this job covers every generated workflow on all events, catching findings before release.

Copilot AI linked an issue Aug 5, 2026 that may be closed by this pull request
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Zizmor to CI for gh aw project Run Zizmor on all generated workflows in CI Aug 5, 2026
Comment thread .github/workflows/cgo.yml Outdated
GH_TOKEN: ${{ github.token }}

zizmor:
needs: [build]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs validate-yaml

Copilot AI requested a review from pelikhan August 5, 2026 17:43
Comment thread .github/workflows/cgo.yml Outdated
GH_TOKEN: ${{ github.token }}

zizmor:
needs: [build]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot update to needsvalidate.yaml.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the zizmor job to needs: [build, validate-yaml] in 27bbacd's follow-up commit.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan August 5, 2026 17:53
@pelikhan
pelikhan marked this pull request as ready for review August 5, 2026 17:55
Copilot AI balanced review requested due to automatic review settings August 5, 2026 17:55
@pelikhan
pelikhan merged commit 3ae19a4 into main Aug 5, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/gh-aw-extend-zizmor-in-ci branch August 5, 2026 17:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a CI job intended to scan all generated workflows with Zizmor using the existing build artifact.

Changes:

  • Adds the zizmor job.
  • Connects it to failure notification aggregation.
Show a summary per file
File Description
.github/workflows/cgo.yml Adds and wires the Zizmor CI scan.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread .github/workflows/cgo.yml
run: chmod +x gh-aw

- name: Run zizmor security scan on all workflows
run: ./gh-aw compile --zizmor --verbose
Comment thread .github/workflows/cgo.yml
env:
GH_TOKEN: ${{ github.token }}

zizmor:
Comment thread .github/workflows/cgo.yml
- build
- build-wasm
- validate-yaml
- zizmor
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.85.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Having Zizmor run as part of the CI

3 participants