Skip to content

[upstream staging] Guard release workflows against running from forks - #2

Closed
duksh wants to merge 1 commit into
mainfrom
claude/upstream-publish-owner-guard
Closed

[upstream staging] Guard release workflows against running from forks#2
duksh wants to merge 1 commit into
mainfrom
claude/upstream-publish-owner-guard

Conversation

@duksh

@duksh duksh commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

Staging PR for upstream submission to pyca/cryptography (do not merge into this fork's main; the fork's own guards live on the analysis branch). Submit upstream via: pyca/cryptography@main...duksh:cryptography:claude/upstream-publish-owner-guard

  • wheel-builder.yml: owner-guard the sdist job (every other job needs it, so skipping it skips the workflow); pull_request runs kept so workflow changes stay testable.
  • pypi-publish.yml: publish job additionally requires github.repository_owner == 'pyca', so forks never attempt an OIDC publish or mint attestations on a tag push.

Uses the same repository_owner guard pattern the scheduled bot workflows already use.

Testing

  • YAML validated; fork CI runs on this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a86aac2-7bc0-446c-b74b-2e8f568c9e85

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/upstream-publish-owner-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

wheel-builder.yml triggers on any tag push and pypi-publish.yml chains
from its completion, checking only the event type and conclusion. On a
fork, pushing a tag therefore runs a full wheel build and then attempts
an OIDC trusted publish (and attestation minting), relying entirely on
no trusted publisher being configured on PyPI for the fork.

Add the same repository_owner guard already used by the scheduled bot
workflows: wheel-builder's sdist job (which every other job needs) skips
on forks except for pull_request runs, and pypi-publish's publish job
requires the pyca owner.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DWoMomNAcBM3e8duJrb2do
@duksh
duksh force-pushed the claude/upstream-publish-owner-guard branch from 048620b to 999f812 Compare July 24, 2026 04:08

duksh commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

Submitted upstream as pyca#15325 — closing this staging PR (validation complete: all 93 runnable jobs green; ppc64le legs unrunnable on forks). Do not delete the branch until the upstream PR resolves.


Generated by Claude Code

@duksh duksh closed this Jul 25, 2026
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.

2 participants