Vendor replays
Coding agent risks with GitHub: replays and fixes
4 replays involve GitHub: 0 reported incidents and 4 command classes. Each one shows the call, a fix that needs no extra tool, and what KYA did in the replay.
GitHub repository deletion
Fix: Give the agent a fine-grained token limited to the repositories it needs, with no Administration permission, and do not add the delete_repo scope to a classic token. Keep a mirror clone of any repository you cannot lose.
Replay result: Stopped.
Read the GitHub CLI token file
Fix: Let gh keep its token in the system keyring and not in hosts.yml, give the agent a fine-grained token in GH_TOKEN, and add a deny rule such as Read(~/.config/gh/**) to the Claude Code settings. A Read rule also covers shell commands such as cat, but not a script that opens the file itself, so enable the Claude Code sandbox when the block must hold.
Replay result: Stopped.
Write a GitHub token into a source file
Fix: Read the token from an environment variable or a secret store at run time, and revoke any token that reached a file. Turn on push protection for secret scanning in the repository settings: it blocks a push that holds a known token shape, unless the pusher gives a bypass reason.
Replay result: Stopped.
Write a fine-grained GitHub token into a CI file
Fix: In GitHub Actions, use the built-in GITHUB_TOKEN with a permissions block, or an encrypted secret, and not a token in a file. If a token reached a file, revoke it in your GitHub settings.
Replay result: Stopped.