Opus finding
ClosureReceiptInput allows owner/repo to be injected into commit URL without sanitization
lowsecuritymedium
- apps/web/lib/pr-comment.ts:89-95
owner/repo/closureSha are concatenated into a URL inside a Markdown link. If owner or repo somehow contains a ')' character or a Markdown control sequence (this would be unusual since GitHub names don't allow this, but the function is exported and accepts arbitrary strings), the produced markdown could break the link or be used to inject markdown into a PR comment that AntFleet then posts. Given GitHub repo/owner naming restrictions this is low-likelihood, but the type signature does not enforce them. Same applies to closureSha (which we slice but use the full string in URL) — a non-hex sha could produce an invalid GitHub URL.
Recommendation
Validate owner/repo against GitHub's allowed character set ([A-Za-z0-9._-]+) and closureSha against /^[0-9a-f]{7,40}$/ before formatting; throw on invalid input.