HyperFrames
HyperFrames security: treat a submitted composition as executable code
Design trust boundaries around HTML scripts, remote assets, browser privileges and rendered artifacts before exposing video generation to users.
What you will learn
- An arbitrary HTML composition can execute code.
- A container alone does not define the required trust boundary.
- Track asset provenance and publish only completed artifacts.
Before you start
- Basic HTML, CSS and JavaScript
- Node.js 22+ and FFmpeg for the local exercise
Explain the chapter boundary and use its checklist to evaluate a repeatable video workflow.
Key takeaways
- An arbitrary HTML composition can execute code.
- A container alone does not define the required trust boundary.
- Track asset provenance and publish only completed artifacts.
A composition is more than a passive template
HyperFrames accepts HTML, animation scripts and media references as authoring inputs. If a service accepts arbitrary compositions, it is accepting executable browser content rather than only a harmless document. The isolation guidance here is an application threat model; it does not assert that the upstream package implements every control described.
Separate trusted internal templates from user-submitted code. A renderer should not inherit unrelated production secrets, broad writable mounts or an unrestricted route to internal services merely because it runs in a container. Define the account, filesystem and network access actually needed for its assets.
Control dependencies and asset acquisition
The README example loads GSAP from a CDN. That is convenient for learning, but a production fixture needs a fixed dependency and a deliberate asset policy. Remote URLs can change content, fail or refer to destinations your rendering environment should not reach. Decide whether the service fetches approved assets in advance or permits a constrained network during rendering.
Fonts, images, audio and video also need provenance and permitted usage. Keeping a local asset ledger improves reproducibility and makes it easier to identify what may be published. Do not interpret availability on a public URL as permission to redistribute a work in a generated video.
Make failure bounded and artifacts traceable
Set an external deadline and resource limits for capture and encoding jobs. Keep temporary files in a job-specific directory, retain the reason for failure and publish only a completed artifact. Retry transient infrastructure failures separately from compositions that consistently fail readiness or reference missing files.
Record the composition revision, asset identities, runtime configuration and output identity without logging credentials or private source media unnecessarily. When an agent writes composition code, review that code and its network requests before execution. Generated code deserves the same trust decision as code submitted by a person.
Implementation steps
- 1
Classify internal templates separately from submitted code.
- 2
Define worker filesystem, network and secret access.
- 3
Stage approved assets and record their identities.
- 4
Bound execution and retain a traceable output record.
Copy-ready example
Submission boundary -> review / allowed inputs
Asset boundary -> approved files and dependency versions
Execution boundary -> restricted account, mounts, network, deadline
Publication boundary -> completed artifact plus provenance
Application design checklist, not built-in renderer configuration.Frequently asked questions
Does Docker automatically make arbitrary compositions safe?
No. The actual privileges, mounts, networking, secrets and resource limits determine the boundary.
Can publicly reachable music be reused in an export?
Public access alone is not evidence of redistribution permission. Check the asset’s applicable terms and your intended use.
Sources
- Fixed READMESource checked 2026-09-07
- GSAP adapterSource checked 2026-09-07
- Seek dispatcherSource checked 2026-09-07
- Three.js adapterSource checked 2026-09-07
- GSAP testsSource checked 2026-09-07
- Seek dispatcher testsSource checked 2026-09-07