Skip to content

fix(codex): Update the rule for git/gh - #3942

Merged
yutkat merged 1 commit into
mainfrom
51.012
Aug 30, 2026
Merged

fix(codex): Update the rule for git/gh#3942
yutkat merged 1 commit into
mainfrom
51.012

Conversation

@yutkat

@yutkat yutkat commented Aug 30, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings August 30, 2026 11:05
@yutkat
yutkat merged commit 7850a26 into main Aug 30, 2026
7 of 10 checks passed
@yutkat
yutkat deleted the 51.012 branch August 30, 2026 11:05
Copilot stopped reviewing on behalf of yutkat due to an error August 30, 2026 11:05

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates Codex command rules to forbid repository-mutation commands while permitting read-only GitHub CLI queries.

Changes:

  • Replaces the blanket git ban with a targeted blocklist of mutating git subcommands.
  • Replaces the blanket gh ban with allow rules for read-only queries (issues/PRs/runs/search/api GET).
  • Adds a targeted gh mutation blocklist for specific resource subcommands/actions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +14 to +24
pattern=[
"git",
[
"add", "am", "apply", "checkout", "cherry-pick", "clean",
"commit", "fetch", "merge", "mv", "pull", "push", "rebase",
"reset", "restore", "revert", "rm", "stash", "switch",
"update-ref",
],
],
decision="forbidden",
justification="Git repository mutations are not allowed."
Comment on lines +14 to +27
pattern=[
"git",
[
"add", "am", "apply", "checkout", "cherry-pick", "clean",
"commit", "fetch", "merge", "mv", "pull", "push", "rebase",
"reset", "restore", "revert", "rm", "stash", "switch",
"update-ref",
],
],
decision="forbidden",
justification="Git repository mutations are not allowed."
)

prefix_rule(
Comment on lines +67 to +70
prefix_rule(
pattern=["gh", "api", "--method", "GET"],
decision="allow",
justification="Explicit GET requests to the GitHub API are read-only."
Comment on lines +49 to +53
prefix_rule(
pattern=["gh", "auth", "status"],
decision="allow",
justification="Checking GitHub authentication is read-only."
)
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