unslop
- Type
- Skill
- Scanned
- Nov 12, 2026
- Version
- 97daa3eb3656
- Files read
- 17
Unslop is an agent skill that audits and redesigns AI-generated user interfaces, with helper scripts that snapshot live web pages in Playwright and render before-and-after videos with ffmpeg. Its biggest risk is that snapshotting an untrusted webpage leaves event attributes, embedded frames, and CSS style-tag breakouts intact in the saved HTML file, allowing remote JavaScript to run locally when the snapshot is rendered or turned into a story video.
What it can reach
- Files
- Reads and edits UI source files in the project, writes HTML snapshots, screenshots, temporary video frames, and MP4 videos to disk, and serves files from the story folder over a local HTTP server.
- Browser
- Launches Chromium or local Google Chrome via Playwright to open, scroll, snapshot, and screenshot local HTML files and live URLs.
- Network
- Fetches live web pages along with their stylesheets and images when snapshotting a URL, binds a temporary HTTP server on 127.0.0.1 while rendering story videos, and can call an already-connected image generation service after asking the user.
- Shell commands
- Runs Node helper scripts to snapshot pages and build story videos, and invokes ffmpeg via execFileSync to encode video frames.
Findings
-
MediumIncomplete script stripping in HTML snapshots allows remote JavaScript to run locally
skills/unslop/scripts/snapshot.mjs:155
When saving a live webpage to a local HTML file, snapshot.mjs removes script and noscript tags so the saved file can be safely re-rendered locally (as SKILL.md immediately instructs) or copied into a story video. However, it leaves inline event handlers (such as onload and onerror), iframe/object/embed elements, and raw </style><script> sequences inside fetched external stylesheets (assigning style.textContent and serializing with copy.outerHTML does not escape closing style tags in HTML5). If a snapshotted webpage or third-party stylesheet includes any of these, its JavaScript executes locally under file:// or story.mjs's 127.0.0.1 server, where it can leak local file paths, probe localhost services, or read files exposed by the story server.
Fix: Remove all on* event attributes as well as iframe, object, embed, base, and meta[http-equiv] elements from the cloned DOM, and escape </style (for example as <\/style) in inlined CSS text before serializing.
-
LowPrefix-based path check in story server allows sibling file access and unhandled crashes
skills/unslop/scripts/story.mjs:388
The temporary HTTP server on 127.0.0.1 checks whether a requested file stays inside the story folder using !target.startsWith(root), where root has no trailing path separator, and serves unknown extensions as application/octet-stream. Content running inside story.html (or a cross-origin script/media tag on a website visited while --play is open) can request sibling files or folders whose names share the same prefix (for example /../unslop-story-backup/ or /../app.env when story.html is in app/), and requests for a directory such as / or malformed percent-encoding crash the server with uncaught EISDIR or URIError exceptions.
Fix: Check path containment with path.relative(root, realpathSync(target)) ensuring it does not start with '..' or path.isAbsolute, verify statSync(target).isFile() before calling readFileSync, and wrap decodeURIComponent in a try/catch.
