Skip to content

AXI-85: Fix rich link URL scheme safety#13

Merged
Codename-11 merged 1 commit into
mainfrom
fix/axi-85-url-scheme-safety
Jun 18, 2026
Merged

AXI-85: Fix rich link URL scheme safety#13
Codename-11 merged 1 commit into
mainfrom
fix/axi-85-url-scheme-safety

Conversation

@Codename-11

Copy link
Copy Markdown
Owner

Summary

  • add shared URL-safety helper for renderable markdown hrefs and external link attachments
  • keep markdown https://... and internal /w/... links working while rendering unsafe schemes inert
  • enforce http(s)-only link attachments across tRPC, MCP, storage, and guard legacy link-attachment open/preview surfaces
  • add regression coverage for helper, markdown renderer, tRPC attachLink, and MCP attachLink

Verification

  • env -u OPENAI_API_KEY pnpm exec vitest run tests/unit/url-safety.test.ts tests/unit/markdown-url-safety.test.ts src/server/services/__tests__/mcp.test.ts src/server/routers/__tests__/attachment.test.ts --reporter=verbose --testNamePattern "url safety|MarkdownWithAttachments URL safety|attachments.attachLink accepts only http\(s\) external URLs|rejects non-http"
  • pnpm typecheck
  • pnpm lint
  • env -u OPENAI_API_KEY pnpm test (946 passed, 1 skipped)

Fixes AXI-85.

@Codename-11 Codename-11 merged commit 75e891c into main Jun 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant