T09 · Insecure Skill Coding Practices
- Location
scripts/render.js:125- Finding
Caller-Controlled HTML Is Rendered with the Chromium Sandbox Disabled
- Content
View full analysis
- Remediation
View remediation
{ const url = new URL(request.url()); if (url.protocol === 'data:' || url.protocol === 'about:') { request.continue(); return; } if (url.protocol === 'file:' && url.pathname === absoluteHtmlPath) { request.continue(); return; } request.abort(); }); ``` 7. If local fonts or assets are needed, copy them into a dedicated temporary directory and allow only canonical paths within that directory. 8. Validate and canonicalize the input path before loading it. Reject symbolic links and paths outside the designated input directory where feasible. 9. Apply a restrictive Content Security Policy to generated HTML, such as `default-src 'none'; style-src 'unsafe-inline'; img-src data: file:; font-src file:`, adjusted only for required resources. 10. Keep Chrome or Chromium fully patched and pin the renderer to a reviewed, supported browser version. ]]>
