GitHub
ghAn 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.
What it cannot undo
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-deletegh release delete **gh.release-deletegh api -X DELETE **gh.api-x-delete
What it changes
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 mergeinstead. gh release create **gh.release-creategh secret set **gh.secret-setgh repo edit **gh.repo-editgh pr create **gh.pr-create- opens a PR, merges nothing
What it only reads
Matched so a rule can say read is fine, rather than leaving it unspoken.
gh auth statusgh.auth-statusgh pr view **gh.pr-viewgh pr list **gh.pr-listgh 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.