GitHub

CLIghfirst-party MCP server

An agent with gh on its PATH can merge pull requests and delete branches. Memnox wraps the binary, reads the command before it runs, and matches it against the table below. Nothing here is a list of what we support: it is what the runtime already classifies, and the strings are the ones a rule matches on.

What it reads to authenticate

Discovery records that these exist and hashes them. It never reads a value, so a scan can say three agents reach this file and never what is inside it.

! ~/.config/gh/hosts.yml! GH_TOKEN! GITHUB_TOKEN

What it cannot undo

3

Every one of these carries the alternative a refusal names, which is why an agent takes the alternative and finishes the task instead of stopping.

gh repo delete **gh.repo-delete
gh release delete **gh.release-delete
gh api -X DELETE **gh.api-x-delete

What it changes

5

Allowed by default, and the obvious first thing to put behind ask.

gh pr merge **gh.pr-merge
Denied, it names gh pr review --request, and let a person merge instead.
gh release create **productiongh.release-create
gh secret set **secretsgh.secret-set
gh repo edit **gh.repo-edit
gh pr create **gh.pr-create
opens a PR, merges nothing

What it only reads

4

Matched so a rule can say read is fine, rather than leaving it unspoken.

gh auth statusgh.auth-status
gh pr view **gh.pr-view
gh pr list **gh.pr-list
gh api **gh.api
read unless -X says otherwise

The rule this writes

[[rules]]
name = "gh-destructive-asks-first"
match.actions = ["gh.repo-delete"]
decision.effect = "ask"
decision.reason = "This cannot be undone."

memnox protect --for gh writes this into memnox.policies.toml from the table above. You can edit it, and the file is yours.

Run npx memnox to find out whether GitHub is actually reachable from your machine. It reads your own disk and needs no account.