Skip to content

Code consent

Models can contain sandboxed WebComponent scripts and parametric generators. Unknown code asks for consent before it runs. Declining keeps the saved geometry and leaves scripts off. When no controller is connected, Always for this origin remembers an explicit script permission. Review these permissions under Settings > Security > Explicit script consent. Native generators and project scripts have separate consent settings.

Open Settings > Security > Trusted code sources to add or remove origins. A fresh browser profile starts with https://library.realvirtual.io. An empty list stays empty. Restore defaults restores that library origin. If saving fails, the settings show an error and keep the actual list. Settings belong to the browser origin/profile; models, projects, sidecars and shared-link options cannot configure the list.

Use an exact HTTPS origin, such as https://library.example.com:8443. HTTP is allowed only on loopback for local development. Paths, wildcard hosts, credentials and duplicate entries are refused. Ports and subdomains are separate origins.

After a GLB loads directly from a listed origin, the viewer recognizes its exact sandboxed script and generator texts for the lifetime of this tab. Recognized code runs without another prompt, including when used in a foreign containing model. A later foreign model containing identical recognized code can also run it. Parameters are data, not a publisher signature. Changing even a comment creates different code and can ask again. If a document mixes known and unknown active scripts, the whole document asks.

Only the fetched GLB bytes and child GLBs actually contained in its BIN payload contribute. Overlays and sidecars cannot introduce new trusted text. Redirects and cache entries without verified source evidence do not establish trust. A warm cache with its verified source metadata can rebuild evidence. Resource limits can also cause a prompt.

Removing a source revokes its recognized code for subsequent loads, unless the same code was also loaded from another source that remains listed. Already running scripts are not stopped. The code evidence is never saved as an explicit permission. Existing explicit permissions remain valid and can be removed separately. Closing/reloading the page discards its volatile code inventory.

Recognized code has the existing trusted-script Live rights. Unknown running code still requires Live confirmation, even after a neighbouring recognized script reloads. With an active connection, consent says scripts can write signals to the machine. A connection made while unknown scripts run offers to keep scripts, stop scripts, or cancel. Explicit Always permission does not answer the separate Live question. Interface write switches remain in force.

Trust covers every directly served path on that origin, including uploads and proxy routes. Whoever controls that origin can supply code that runs without a prompt. For the default library this includes control of the Bunny library zone rv-library, DNS or TLS. Signed publisher verification is future work. Recognizing source text does not prove that a script is safe, or that it cannot interpret parameter data as code.

Agents can inspect the list through web_query with command codeConsent.trustedSources; web_status also reports trusted sources and matched code evidence. There is no dedicated write command or tool. Residual risk: the existing web_scene_query executes JavaScript in the page and can write localStorage, including consent settings. Isolating that existing path is separate work.