mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
* fix(producer): keep the render server local unless a token guards it startServer listened on every interface and trusted any caller without Origin/Sec-Fetch-Site headers, while /render, /render/stream and /lint used caller-supplied projectDir, entryFile and outputPath as arbitrary paths. - Listen on 127.0.0.1 by default (hostname / PRODUCER_HOST). A non-loopback address needs authToken / PRODUCER_AUTH_TOKEN, which createProducerApp then requires as a bearer token on every route but /health. Log the real address. - Confine request paths, symlinks included: projectDir to projectsDir (PRODUCER_PROJECTS_DIR, default cwd), entryFile to the project, outputPath to rendersDir, checked before any directory is created. The debug dir is never project content. - Refuse debug: true unless allowDebug / PRODUCER_ALLOW_DEBUG=1, drop perf.renderId from responses, and stop echoing resolved absolute paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqRB2bN8KsmaW2KUs9k6cb * fix(producer): apply the request policy at the public app, not the shared handlers createRenderHandlers is also mounted by trusted embedded services that pass absolute temp project and output paths and no projectsDir. Confining it by default turned their renders into 400s. - New confineRequests option: createProducerApp and startServer default it to true; createRenderHandlers keeps its old contract unless a caller opts in. - Under the policy, /lint refuses an entry that leaves the project through a symlink or reaches the debug dir, through an optional guard on prepareHyperframeLintBody (trusted callers are unchanged). - A blank auth token counts as no token, so it no longer unlocks a non-loopback listen address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqRB2bN8KsmaW2KUs9k6cb * chore(producer): trim added comments and raise the producer size budget The comment ratchet refused the comment lines the hardening added to server.ts and hyperframeLint.ts; they are cut or folded into one line. The producer tarball grew to 900392 bytes packed (budget 890000, 1% tolerance) with the auth middleware, request policy and lint entry guard, which ship in each of the producer's server bundles. The budget moves to 901000 to cover that code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqRB2bN8KsmaW2KUs9k6cb --------- Co-authored-by: Claude <noreply@anthropic.com>