You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodeQL js/request-forgery (critical, CWE-918) — open alert #65, created by the 2026-06-29 scan after #424 landed, i.e. this flow was NOT covered by the previous SSRF fix (72afcd6).
consturl=m[1]// parsed from  in issue/PR body markdownconstres=awaitfetch(url,{headers: {Authorization: `Bearer ${appToken}`, ... },// GitHub app token sent to arbitrary host})
Exploit path: a malicious repository embeds  in an issue body; any developer running the github command on that repo leaks their GitHub app token to the attacker's server.
What changed (proposed)
Allowlist the fetch target host (e.g. only *.githubusercontent.com / the configured API host) before attaching the Authorization header, or strip the header for non-allowlisted hosts.
Why
CodeQL
js/request-forgery(critical, CWE-918) — open alert #65, created by the 2026-06-29 scan after #424 landed, i.e. this flow was NOT covered by the previous SSRF fix (72afcd6).Evidence
packages/opencode/src/cli/cmd/github.handler.ts:805-810:Exploit path: a malicious repository embeds
in an issue body; any developer running thegithubcommand on that repo leaks their GitHub app token to the attacker's server.What changed (proposed)
*.githubusercontent.com/ the configured API host) before attaching the Authorization header, or strip the header for non-allowlisted hosts.Acceptance
specgit finishexit 0.