Skip to content

[infra] - gate claude.yml on github.repository_owner instead of a hardcoded login#654

Merged
cgfixit merged 1 commit into
mainfrom
claude/cyclaw-optimize-claude-yml-owner
Jul 26, 2026
Merged

[infra] - gate claude.yml on github.repository_owner instead of a hardcoded login#654
cgfixit merged 1 commit into
mainfrom
claude/cyclaw-optimize-claude-yml-owner

Conversation

@cgfixit

@cgfixit cgfixit commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Proposed changes

Phase 2 security-scan finding (CI, low severity). .github/workflows/claude.yml's sole authorization guard on a pull-requests: write + issues: write workflow hardcoded github.event.comment.user.login == 'CGFixIT', whereas the sibling automation uses the dynamic owner:

  • codex.yml:20: github.event.comment.user.login == github.repository_owner
  • pr-review.yml:39: github.event.pull_request.user.login == github.repository_owner

Mirror that established repo pattern (one line). A handle rename or repo transfer silently breaks the literal guard — or, if the old CGFixIT handle is later re-registered by someone else, weakens it (that account could then trigger a write-capable workflow). github.repository_owner always resolves to the current owner.

Invariant / Governance Impact: None — CI auth-guard hardening; it tightens the guard's future-safety and its failure mode stays fail-safe (a non-owner @claude comment simply doesn't run the job). Same canonical-case string for the owner, so no behavior change today.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

Scope note: Infrastructure / CI only (one line).

Benefits / why

  • The write-capable review workflow's authorization survives a username change / repo transfer and can't be silently weakened by handle re-registration — matching how codex.yml and pr-review.yml already guard themselves.

Risks to monitor

  • If the repo is ever transferred to an org, github.repository_owner becomes the org login; the guard would then admit anyone commenting as that org context — revisit the condition (add github.actor/triggering_actor checks like codex.yml:21-22) if ownership model changes. Not a concern for the current single-owner repo.

Further comments

Verified: claude.yml parses (yaml.safe_load); the new condition is byte-identical in form to codex.yml's working guard. No shared files with any other open PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_0138hmScu3tFU4v1jzvFUwVT


Generated by Claude Code

…a literal

claude.yml's sole authorization guard on a pull-requests:write + issues:write
workflow hardcoded `github.event.comment.user.login == 'CGFixIT'`, while the
sibling automation (codex.yml:20, pr-review.yml:39) uses the dynamic
`github.repository_owner`. A handle rename or repo transfer silently breaks
(or, if the old handle is re-registered by someone else, weakens) the literal
guard. Mirror the repo's own established pattern. Failure mode stays fail-safe:
a non-owner comment simply doesn't run the workflow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0138hmScu3tFU4v1jzvFUwVT
@cgfixit
cgfixit force-pushed the claude/cyclaw-optimize-claude-yml-owner branch from 8291f50 to 5e5afb1 Compare July 26, 2026 01:27
@cgfixit
cgfixit marked this pull request as ready for review July 26, 2026 01:29
@cgfixit
cgfixit merged commit 24fcd3b into main Jul 26, 2026
37 of 39 checks passed
@cgfixit
cgfixit deleted the claude/cyclaw-optimize-claude-yml-owner branch July 26, 2026 01:29
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