Skip to content

chore(zizmor): drop the local policy copy, the reusable supplies it - #783

Merged
CybotTM merged 1 commit into
mainfrom
chore/sync-zizmor-comment
Aug 3, 2026
Merged

chore(zizmor): drop the local policy copy, the reusable supplies it#783
CybotTM merged 1 commit into
mainfrom
chore/sync-zizmor-comment

Conversation

@CybotTM

@CybotTM CybotTM commented Aug 2, 2026

Copy link
Copy Markdown
Member

Removes .github/zizmor.yml. netresearch/.github#339 makes the zizmor reusable fetch the organisation policy at run time when a repo has no file of its own, and drops it from all five templates, so this copy no longer has a job.

It is not harmless to leave behind. A local file takes precedence over the fetched one, so this repository would keep running an old policy the next time the shared one actually changes — which is exactly how a two-line policy ended up needing a pull request in 54 repositories to reword a comment.

The scan result does not change: the same policy is applied, from one place instead of 54. A repository that genuinely needs a different policy opts out by keeping its own .github/zizmor.yml; this one was byte-identical to the template, which was verified before deleting.

This pull request previously carried the comment rewording from #336. That became pointless once the file itself moved, so the branch was rewritten to delete it instead.

Copilot AI review requested due to automatic review settings August 2, 2026 16:16
@github-actions github-actions Bot added the ci label Aug 2, 2026
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.28%. Comparing base (4130200) to head (e0c6cc0).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #783   +/-   ##
=======================================
  Coverage   89.28%   89.28%           
=======================================
  Files          88       88           
  Lines       12147    12147           
=======================================
  Hits        10846    10846           
  Misses       1001     1001           
  Partials      300      300           
Flag Coverage Δ
integration 89.27% <ø> (-0.02%) ⬇️
unittests 88.70% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the documentation comments in the zizmor configuration to accurately describe what the unpinned-uses rule enforces (ref-pinned vs SHA-pinned), while clearly separating tooling guarantees from human convention.

Changes:

  • Clarifies that first-party uses: entries are allowed to be pinned to a ref (branch/tag), not necessarily a full commit SHA.
  • Explicitly states that the specific ref choice (commonly @main) is a convention enforced by review, not by zizmor.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

github-actions[bot]
github-actions Bot previously approved these changes Aug 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated approval for maintainer PR

All automated quality gates passed. See SECURITY_CONTROLS.md for compensating controls.

netresearch/.github#339 makes the zizmor reusable fetch the organisation policy
at run time when a repo has no .github/zizmor.yml of its own, and removes the
file from the templates. Keeping a copy here would silently win over the shared
policy the next time it really changes, which is how this file came to differ
across the fleet in the first place.

The scan itself is unchanged: the same policy is applied, from one place.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM
CybotTM force-pushed the chore/sync-zizmor-comment branch from d889c42 to e0c6cc0 Compare August 2, 2026 17:51
@CybotTM CybotTM changed the title docs(zizmor): describe the rule that is actually enforced chore(zizmor): drop the local policy copy, the reusable supplies it Aug 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

@CybotTM
CybotTM requested a review from Copilot August 2, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Automated approval for maintainer PR

All automated quality gates passed. See SECURITY_CONTROLS.md for compensating controls.

@CybotTM
CybotTM added this pull request to the merge queue Aug 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 2, 2026
@CybotTM
CybotTM added this pull request to the merge queue Aug 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 2, 2026
@CybotTM
CybotTM added this pull request to the merge queue Aug 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 2, 2026
CybotTM added a commit to netresearch/.github that referenced this pull request Aug 2, 2026
…#340)

GitHub deletes the `gh-readonly-queue` ref the moment a merge queue
finishes, which races the SARIF upload inside `codeql-action/analyze`.
`scorecard.yml` already guards against this and its comment calls the
result "a guaranteed `ref ... not found` failure"; `zizmor.yml` skips
its whole job for the same reason. `codeql.yml` never got the guard.

The consequence is not a cosmetic red check: the queue run fails, and
`github-merge-queue[bot]` **ejects the pull request from the queue**. It
happened on
[netresearch/ofelia#783](netresearch/ofelia#783),
a pull request that deletes one YAML file and touches no Go code at all
— added to the queue at 18:40:42, removed at 18:46:13, with `codeql /
Analyze (go)` reporting `ref
'refs/heads/gh-readonly-queue/main/pr-783-...' not found in this
repository`. Every merge-queue repository that calls this reusable is
exposed to the same race.

No analysis coverage is lost. The pull-request head is analysed before
it ever reaches the queue, and the `push` and `schedule` events that
keep the default-branch results current run against stable refs — which
is exactly the reasoning already written down in `scorecard.yml`.
@CybotTM
CybotTM added this pull request to the merge queue Aug 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 2, 2026
@CybotTM
CybotTM added this pull request to the merge queue Aug 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 2, 2026
@CybotTM
CybotTM added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit 9de734b Aug 3, 2026
37 checks passed
@CybotTM
CybotTM deleted the chore/sync-zizmor-comment branch August 3, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants