Skip to content

ci: scan main on push so code-scanning baseline stays current#275

Merged
devantler merged 1 commit into
mainfrom
claude/zizmor-scan-on-main-push
Jun 10, 2026
Merged

ci: scan main on push so code-scanning baseline stays current#275
devantler merged 1 commit into
mainfrom
claude/zizmor-scan-on-main-push

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Daily AI Assistant

Problem

Every open PR on this repo is stuck at mergeStateStatus: BLOCKED — including the promoted #271 (feat(create-issues-from-todos): support client-id), whose required CI - Required Checks is green and whose review threads are resolved.

Root cause, verified live:

  • main's code-scanning baseline is frozen at 2025-07-17 (last zizmor analysis = commit b03c107, results_count: 9).
  • All 9 open alerts sit on .github/workflows/reusable-workflow-ci-gitops-test.yaml — a file that no longer exists on main (1× zizmor/excessive-permissions, 8× zizmor/template-injection). They are phantom: the code that produced them was deleted months ago.
  • The main branch has a code_scanning protection rule, so those 9 stale alerts are counted as a merge blocker on every PR, even when each PR's own required checks pass.

Why the baseline never refreshes:

zizmor:
  if: github.event_name != 'push'   # <-- never runs on push to main

The zizmor job (which holds security-events: write and uploads SARIF) was gated off for push events. But push-to-main is exactly the event that updates the default-branch code-scanning baseline. With it excluded, the baseline can never refresh and resolved findings can never auto-close — so the 2025-07-17 snapshot lingers indefinitely.

Fix

Swap the excluded event: run zizmor on pull_request (catch new findings) and on push to main (refresh the baseline so resolved findings auto-close), skipping only merge_group (the PR scan already ran; the queue ref makes a SARIF upload moot). One-line change to the job's if: plus a comment explaining why.

Once this is on main, the next push triggers a fresh zizmor analysis. Current code has 0 zizmor findings (the PR-event zizmor job passes), so the new baseline closes the 9 phantom alerts and the code_scanning blocker clears for all PRs.

⚠️ Maintainer: one-time unblock (chicken-and-egg)

This PR is itself BLOCKED by the same stale baseline, so it can't merge until the deadlock is broken once. Either:

  1. Dismiss the 9 stale alerts (Security → Code scanning → filter by reusable-workflow-ci-gitops-test.yaml; they're on a deleted file). That immediately unblocks this PR, feat(create-issues-from-todos): support client-id, deprecate app-id #271, and every other open actions PR. Then merging this PR keeps the baseline fresh going forward so it can't recur; or
  2. Admin-merge this PR once; the resulting push refreshes the baseline and closes the alerts.

Option 1 is preferred — it unblocks the whole lane right away, and this PR then prevents recurrence.

Validation

  • actionlint .github/workflows/ci.yaml — clean for this change (the only output is two pre-existing code-quality permission-scope warnings on unrelated lines 326/740, a known actionlint-version lag on that newer scope).
  • No behavior change to PR scanning; the only added behavior is the push-to-main baseline refresh.

Notes

The zizmor job was gated `if: github.event_name != 'push'`, so it never ran
on push to main — the one event that refreshes the default-branch
code-scanning baseline. As a result the baseline froze (last analysis
2025-07-17) with 9 stale alerts on a since-deleted workflow file, and the
`code_scanning` branch rule treats those phantom alerts as a merge blocker on
every PR. Run zizmor on push to main (and keep it on pull_request); skip only
merge_group, where the PR scan already ran.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-code-quality

github-code-quality Bot commented Jun 10, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: Go, C#

Go / code-coverage/test

The overall coverage remains at 50%, unchanged from the branch.

C# / code-coverage/dotnet

The overall coverage remains at 100%, unchanged from the branch.


Updated June 10, 2026 06:24 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@devantler devantler marked this pull request as ready for review June 10, 2026 06:27
@devantler devantler marked this pull request as draft June 10, 2026 06:27
@devantler devantler marked this pull request as ready for review June 10, 2026 12:25
@devantler devantler merged commit eeb1b95 into main Jun 10, 2026
49 checks passed
@github-project-automation github-project-automation Bot moved this from 🫴 Ready to ✅ Done in 🌊 Project Board Jun 10, 2026
@devantler devantler deleted the claude/zizmor-scan-on-main-push branch June 10, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant