Repository navigation
fix(security): hidden issue text no longer reaches the agent or leaks the token - #33
Conversation
β¦ the token Issue, PR and comment text is written by anyone on a public repository, and GitHub hides some of it from the maintainer who triggers a run: HTML comments, link-reference definition lines, and zero-width / bidi / Unicode tag characters. That is how the September 2026 issue-injection campaign smuggled commands into 61 repositories. All of it is now stripped before the model reads the issue, the PR description, the discussion or an @mention, and the prompt marks user text as untrusted data whose instructions are never followed. The image fetcher sent GITHUB_TOKEN to any URL containing "github", so a hidden  received a token with contents: write. It now authenticates only to the GitHub attachment hosts over https, and an image hidden in a comment is never fetched at all.
π‘οΈ ShipIT Forge β security scanβ Nothing found. No committed credentials, no infrastructure or workflow misconfiguration, and nothing matching the source-code security rules. What was scanned
All of it is deterministic: the same commit gives the same answer, every time, with no model call and no token cost. The model review judges what is reachable and worth worrying about; this pass judges nothing and simply never gets bored. Scanned 6 files in the files this pull request changes. No model call β this scan is deterministic and costs nothing. |
|
π ShipIT Forge β what this run looked at:
The scans are deterministic β no model call, no token cost β and run before the review, so their findings survived even if the model run stopped early. Findings arrive as inline comments, plus one security-scan comment grouped by rule. π ShipIT Forge reviewed this PR β π¬ commented (no blocking issues)No findings. |
There was a problem hiding this comment.
ShipIT Forge review
β No blocking issues found. I reviewed the changed files and ran:
- π‘οΈ Security checks β SSRF, injection (SQL/command/template), broken auth/authz, hardcoded secrets, unsafe deserialization, path traversal, weak crypto.
- π§ Code review β correctness, error handling, missing tests, clarity.
Nothing to flag. This is a comment, not an approval β ShipIT Forge never approves PRs; a human reviewer should approve and merge.
Why
The Radware-reported campaign (Sept 2026, 61 public repos) hid commands in issue and comment text that GitHub doesn't render, aiming at workflows that pass that text into a shell. Forge's workflows don't do that, but Forge passes the same text to an agent that holds
contents: writeand the model credentials.Changes
src/github/images.ts).GITHUB_TOKENwas sent to any image URL containinggithub, so a hiddenreceived it. The token now goes only togithub.com,user-images.githubusercontent.comandprivate-user-images.githubusercontent.com, over https, and never to a URL with userinfo.src/github/context.ts). HTML comments (including unterminated ones), link-reference definition lines ([//]: # (β¦)), and zero-width / bidi / Unicode tag characters are removed before the model reads an issue, PR description, discussion, or@mention(including skill arguments). Images hidden inside comments are not fetched.Tests
tests/github/context.test.tstests/github/images.test.ts(token host allowlist, including look-alike hosts) andtests/github/handlers.integration.test.ts(@mentionend to end)npm run typecheckis clean;npx vitest runpasses 867/867.Not covered
[//]: #lines. That behaviour comes from the CommonMark spec.After merge
Cut a release and move
v2, redeploy the hosted app if it runs this code, and pin consumers (shipit_agent,shipit-watchtower) to the merged commit SHA.