Skip to content

security: harden server-side model asset URL downloads#15

Open
georgestander wants to merge 1 commit into
mainfrom
security/harden-managed-asset-downloads
Open

security: harden server-side model asset URL downloads#15
georgestander wants to merge 1 commit into
mainfrom
security/harden-managed-asset-downloads

Conversation

@georgestander
Copy link
Copy Markdown
Owner

@georgestander georgestander commented Mar 3, 2026

Summary

  • restrict URL-to-binary asset downloads to managed attachment URLs only
  • allow only same-origin /api/files/* and exact/suffix *.blob.vercel-storage.com hosts
  • add regression tests for external URL blocking and lookalike host rejection

Risk

  • External third-party file/image URLs in message parts are no longer fetched server-side; they are passed through unchanged.

Validation

  • pnpm exec vitest run lib/utils/download-assets.test.ts

@georgestander georgestander added codex Changes created by Codex codex-automation Changes created by Codex automation labels Mar 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

Changelog Preview

No valid changelog bullets were found under ## Changelog.

Add at least one bullet in the PR body, or apply the skip-changelog label.

Checked on 2026-03-03T06:04:32.650Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Changes created by Codex codex-automation Changes created by Codex automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant