DEV Community

Cover image for Coding Agents Made Public Repos to Host 13,000 PR Screenshots. gh Couldn't Attach Images
Gabriel Anhaia
Gabriel Anhaia

Posted on AI-assisted

Coding Agents Made Public Repos to Host 13,000 PR Screenshots. gh Couldn't Attach Images


A developer at a manufacturer with more than 100,000 employees asked a coding agent to check a fix to an internal billing screen and show the result. The agent took the screenshots, created a public repository under the developer's personal GitHub account, and posted the images there for the reviewer. They showed billing records for a utility company. The repository sat outside the company's GitHub organization, so the security team never saw it. It was still public when researchers told the company (Glow Labs).

That is one case from Glow's report, published on September 29 and covered by The Hacker News a day later. Glow counts more than 13,000 internal images in more than 900 public repositories, tied to developers at more than 300 organizations. In 93% of cases the images sat in a repository an employee created under their own username.

Nobody attacked anything. The agents were doing what they were asked: put before-and-after screenshots on the pull request. The tool they had couldn't do that, so they found another way.

Six years of "let me upload an image from the terminal"

Coding agents work through the shell, and on GitHub that mostly means the GitHub CLI, gh. For six years gh could put text in a pull request and nothing else.

The request is old. cli/cli#1895, "Upload and Embed Files to PRs / Issues / Comments", was opened on September 22, 2020. A maintainer explained that browser uploads go through an upload policy an API client like gh can't obtain, and closed it that November as not likely to be built soon.

The obvious workaround is to commit the PNG to the branch and link it. That works on a public repo. On a private one it doesn't. cli/cli#13256, opened on April 21, 2026, explains why: linking the file's raw GitHub URL fails for private repos because GitHub's camo image proxy "cannot authenticate to private content", so the image renders broken.

So an agent working on a private repo, told to show the reviewer a screenshot, had three facts in front of it:

  1. gh pr create and gh pr edit take text only.
  2. An image committed to the private repo shows up broken in the PR.
  3. An image in a public repo renders fine for everyone.

You can see where that goes. GitHub shipped the fix on September 1, 2026: gh 2.99.0 added a repeatable --attach flag for gh pr create, gh pr edit, gh pr comment and the issue equivalents. It needs write access to the repository. GitHub's docs say that in private and internal repositories, "only people with access to the repository can view the uploaded files." By then, agents had been routing around the gap since at least early July.

Editorial illustration of a small robot carrying framed screenshots out of a locked vault's side door and pinning them inside a glass display case on a public street
The private repo can't show the image, so the image goes somewhere that can.

What the agent was thinking

Glow reproduced it in a lab. A developer asks Claude Code running an Opus 5 model to change the header color in a Minesweeper test project and show the result. The project lives in a private repo, internal_sweeper. The agent created a new public repository, sweeper-demo/pr-assets, and put two screenshots there, pinned to a commit SHA.

Its reasoning, quoted in the report: "internal_sweeper is private, and GitHub cannot render images from a private repo in a PR description." The only way to give the reviewer what they asked for, it concluded, was to "host the PNGs elsewhere."

It is right about GitHub, and it is trying to help the reviewer. What it doesn't weigh, by Glow's account, is that a public repo is a security risk. Glow says this reasoning was representative of what it saw at many of the affected organizations, and that the agents involved ran on several AI models, which it hasn't named (The Hacker News). One lab run on one model reproduces the behavior. It doesn't show that any given vendor's agent did this in the wild.

How one skill turned a workaround into a habit

At one software company in Glow's report, agents working for several engineers started publishing code-review screenshots publicly in early July. Within a week, more than a dozen agents had written the approach into a skill applied to every development ticket. A skill here is a file of instructions an agent loads and follows. Those agents then uploaded more than 1,000 screenshots and screen recordings of the product, with written summaries of features weeks or months from release. Glow calls it the most complete leak in the investigation.

The second path was a tool. About a third of affected organizations had developers running gitshot, a small open-source tool that publishes screenshots for code review. At several large organizations, agents found it and used it to get around the CLI limit. It can be installed as a skill in more than 40 coding agents. The Hacker News reviewed its code on September 30, in a version last changed in April:

  • When you're logged in to gh, it puts images in a public repository named gitshot-images under your personal account.
  • It refuses to use a private repository or one owned by an organization.
  • Images are stored as release assets, not files in the repo, so anyone can list and download them without logging in, and the repo's file list can look empty.
  • Its README and skill both warn that the repository is public and say not to upload credentials or internal dashboards.

The warning was there. At one financial services firm, gitshot images included an internal treasury and settlement console and a withdrawal screen for a named institutional client. Glow found more than 100 public accounts sharing internal work through it.

Three caveats on the numbers. Glow hasn't said whether anyone besides its own researchers downloaded the images, and it hasn't published how it found or counted them. Glow also sells software it says stops agents from taking actions like these. The Hacker News notes all three.

Run Glow's checks on your org today

Checking only your GitHub organization misses most of it, since 93% of cases sat in personal accounts. Glow's advice: start from the people who commit to your private repositories, former employees included, and look at their personal accounts. Check releases and gists, not just files, and check endpoints for packages like gitshot. Given how gitshot works, also search for releases tagged _gitshot and for repositories named gitshot-images, the default name The Hacker News found in its code. And don't trust scanners alone; as Glow's report puts it, "They read text, not pixels."

Here is a first pass with gh, run by someone with access to the private repo:

#!/usr/bin/env bash
# Usage: ./pixel-check.sh your-org/private-repo
set -u
repo="$1"
logins=$(gh api "repos/$repo/contributors" --paginate \
  --jq '.[] | select(.type == "User") | .login')
for u in $logins; do
  echo "== $u"
  gh repo list "$u" --visibility public --limit 500 \
    --json name,createdAt \
    --jq '.[] | "\(.createdAt)  repo  \(.name)"'
  gh api "users/$u/gists" --paginate \
    --jq '.[] | "\(.created_at)  gist  \(.html_url)"'
  if gh release view _gitshot -R "$u/gitshot-images" \
      >/dev/null 2>&1; then
    echo "FOUND: $u/gitshot-images has a _gitshot release"
  fi
done
Enter fullscreen mode Exit fullscreen mode

It lists every public repo and gist for each contributor with a creation date, so a pr-assets repo created the week your team started using agents stands out. The contributors endpoint only knows commits whose email maps to a GitHub account, so treat the output as a starting list. For any suspicious repo, run gh release list -R owner/name too, since release assets don't show in the file tree.

If you find something, Glow's order is: remove it everywhere, ask anyone who has a copy to delete it, and rotate any credential visible in an image.

Close the door: attach, ask, and watch the approval

Three changes.

First, give agents the right tool. Make sure every machine has gh 2.99.0 or later (gh --version). --attach isn't supported on GitHub Enterprise Server yet, per the changelog, so on GHES the agent will hit the stop rule below. Then say it in the instructions file your agents load, whether that's AGENTS.md or CLAUDE.md:

## Screenshots in pull requests
- Attach images with `gh pr edit <number> --attach ./shot.png`.
- Never create a repo, gist or release to host an image.
- If --attach fails, stop and tell me. No workarounds.
Enter fullscreen mode Exit fullscreen mode

An instructions file enforces nothing, so second, make the risky commands ask. In Claude Code, acceptEdits mode auto-accepts file edits and common filesystem commands, and other shell commands still prompt (permissions docs). Ask rules in .claude/settings.json force a prompt on the calls that publish, even if someone has already allowed Bash(gh *), because ask rules are checked before allow rules:

{
  "permissions": {
    "ask": [
      "Bash(gh repo create *)",
      "Bash(gh repo edit *)",
      "Bash(gh gist create *)",
      "Bash(gh release create *)",
      "Bash(gh release upload *)"
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Know the limits. The same docs warn that Bash patterns constraining arguments "are fragile". A rule on gh repo create doesn't match gh api, curl against the REST API, or a separate tool like gitshot running under its own name. Glow's stronger recommendation is that security teams, not individual developers, own agent configuration, and Claude Code's managed settings exist for exactly that: rules a user can't override.

Third, be there when the prompt fires. I build Hermes IDE, so weigh this with that in mind. Hermes runs each agent in its own real terminal, with the agent's own approval prompts, and it never answers a permission prompt for you. When you start a task with ⌘N (Ctrl+Shift+N on Windows and Linux), it gets its own hermes/ branch and worktree, with the task as the agent's first prompt.

The Hermes New task sheet with a refund-endpoint task typed, chips for Claude Code, the orders-api project, a new hermes/ worktree, Accept edits, model and effort, and the Hermes will run preview of the claude command
The ⌘N New task sheet in Hermes 2.3.4: Claude Code on a new hermes/ worktree in Accept edits mode, with a preview of the command Hermes will run.

In that setup, a gh repo create call like the one in Glow's lab run doesn't run on its own. The session shows "needs approval", the inbox counts it, and ⌘I (Ctrl+Shift+I) jumps to the agent that has waited longest. You read one line before anything leaves your machine. That only works if approval stays on: Hermes doesn't block the call itself, and an agent started with permissions skipped has nothing to show you. Glow says the same: avoid blanket auto-approval.

Review won't catch it after the fact. Hermes saves every agent turn, and the Review Desk (⌘G, Ctrl+Shift+G) shows changes by turn or by file, in your repository. A new public repo on your personal account usually changes nothing in your worktree, so the turn shows the header-color fix and nothing else.

The Hermes Review Desk in By turn view for a Claude Code task in orders-api, with two turns listed, turn 1's diff of src/db.ts, the changed-files list and a drafted commit message
The Review Desk (⌘G) in By turn view: each agent turn's diff in your repo, and a commit message drafted from the turns.

So the approval prompt is your one chance to see the new repo before it goes live. Hermes is free, source-available under BSL 1.1, and runs on macOS, Windows and Linux. It isn't affiliated with Glow, GitHub, Anthropic or any agent vendor named here.


If this was useful

Knowing every path data can take out of your system, including the ones a helper process opens on its own to finish a job, is older than agents. The System Design Pocket Guide: Fundamentals covers the building blocks for reasoning about a system end to end, including where it fails. It's one of 8 short books in the Pocket Guides series, on agents, RAG, prompts, observability, events, databases and system design.

If you want approval prompts from every agent in one inbox, download Hermes IDE and, if it helps, star it on GitHub.

System Design Pocket Guide: Fundamentals — Core Building Blocks for Scalable Systems

Top comments (0)