Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new guide, "How to Restrict URLs with a URL Security Policy," along with corresponding updates to the site outline, configuration, and existing guides to document URL security features. The review feedback points out that the Kotlin SDK is missing from the SDK availability table in the new guide and provides a suggestion to add it.
| | SDK | Status | | ||
| | :---------------------------- | :---------------------------------------------------------------------- | | ||
| | TypeScript (`@a2ui/web_core`) | Available | | ||
| | Python (`a2ui_core`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) | | ||
| | Dart (`a2ui_core`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) | | ||
| | Swift (`A2UICore`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) | |
There was a problem hiding this comment.
The SDK availability table is missing the Kotlin (androidx.a2ui) SDK, which is one of the primary supported platforms in A2UI. Please add Kotlin to the table to ensure complete and accurate documentation of SDK availability.
| SDK | Status |
| :---------------------------- | :---------------------------------------------------------------------- |
| TypeScript (`@a2ui/web_core`) | Available |
| Python (`a2ui_core`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) |
| Dart (`a2ui_core`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) |
| Swift (`A2UICore`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) |
| Kotlin (`androidx.a2ui`) | In progress ([#4045](https://github.com/a2ui-project/a2ui/issues/4045)) |
b3d4606 to
7931c0e
Compare
📖 Docs Site Preview DeployedPreview URL: https://a2ui.org/pr-preview/pr-4113/ Modified pages in this PR: Built from commit |
96625a2 to
edd3913
Compare
edd3913 to
d492158
Compare
d492158 to
5227231
Compare
5227231 to
8dde27a
Compare
e9d91d5 to
7cd12f5
Compare
Add a guide for the URL security policy (#4045): setting a policy on the message processor, marking custom component URL properties with the schema helpers or x-a2ui-url-context, checking URLs custom code builds with sanitizeUrl, URL_BLOCKED warnings, allowlist rules, rewrite hooks, custom policies, openUrlHandler, the urlProperties map, limits, and SDK availability. Link it from the catalog and universal component guides.
… security guide Document checkPayloadUrls in @a2ui/agent and the unmarked URL property warnings, and list per-SDK status for the core policy and the agent check, including Kotlin.
… and Markdown links
… URL security guide (#4045)
… security guide (#4045)
050a3aa to
7c908ca
Compare
Summary
Adds a guide for the URL security policy that #4104 adds to
@a2ui/web_core: how a host restricts the hosts components and functions may load, open, or embed, and how catalog, component, and function authors keep their URLs inside the policy.Part of #4045. Stacked on #4104 (base
feat/url-security-web-core). Related to #3899, which asks for a security concept page; this guide covers the URL part and can be linked from that page once it exists.Live Preview: https://a2ui.org/pr-preview/pr-4113/
Modified pages:
Reviewer focus
urlSecurityPolicyandopenUrlHandlerprocessor options,AllowlistUrlSecurityPolicyoptions (media,navigation,iframe,allowRelative,rewrite,allowSvgDataUrls,urlProperties),mediaUrl()/navigationUrl()/iframeUrl(),sanitizeUrlonDataContext/ComponentContext/SurfaceModel, and theURL_BLOCKEDwarning fields.sanitizeUrl, schema helper, blocked-URL channel, agent check) as the open PRs define them; update it if those PRs rename anything.checkPayloadUrlsin@a2ui/agentand theCatalog.fromJson()/assemble_catalog.pywarnings from feat(tooling): warn about unmarked catalog URL props and add an agent pre-send URL check #4116. Merge this PR after feat(tooling): warn about unmarked catalog URL props and add an agent pre-send URL check #4116, or drop those two sections if feat(tooling): warn about unmarked catalog URL props and add an agent pre-send URL check #4116 changes shape.Changes
docs/site/src/content/docs/guides/url-security.mdxwith a four-step core path (set a policy, mark URL properties, check URLs custom code builds, watch for blocked URLs) and additional sections on the baseline, allowlist host rules, rewrite hooks, custom policies,openUrlHandler, theurlPropertiesmap, the agent payload check, unmarked URL property warnings, limits (custom code fetching on its own, CSP as a backstop), and SDK availability.x-a2ui-url-contextin catalog JSON.astro.config.mjs, plusllms.txtandSITE_OUTLINE.mdentries.Impact & risks
Docs only. The guide describes APIs that land with #4104 and #4116, so it must not merge before those PRs.
Testing
npm --prefix docs/site run build: builds,check-linksreports 0 errors across internal links and anchors.python3 docs/scripts/validate_doc_examples.py: 0 errors..mdxfiles.@a2ui/web_coresnippet on the page against the sources of feat(web_core): add URL security policy and plumb it to components and functions #4104 withtsc --noEmit(scratch file, not committed). Checked the@a2ui/agentsnippet's names and options against the source of feat(tooling): warn about unmarked catalog URL props and add an agent pre-send URL check #4116.🤖 Agent-generated