Summary
before-and-after currently defaults to uploading screenshots to the public file host https://0x0.st when markdown output/upload flows are used.
That behavior is documented in the README and skill, implemented in the runtime upload code, and covered by tests.
For a tool that is often used against preview deployments, internal apps, or PR screenshots, this is a risky default because screenshots can contain non-public UI, internal URLs, user data, or other sensitive content.
Why this is a problem
This is not just a documentation issue:
README.mdsays images are uploaded to0x0.stby default.src/upload.tssetshttps://0x0.stas the default upload target.src/bin/cli.tsuploads on--markdownwhen no custom upload URL is supplied.- The bundled skill defaults to the
0x0stadapter. - Integration tests assert the default behavior.
So the current package behavior is effectively "public external upload by default".
Expected behavior
The default should be secure-by-default / fail-closed for sensitive screenshots. For example:
- require an explicit
--upload-url/UPLOAD_URL, or - require an explicit opt-in flag for public uploads, or
- default to a user-owned/private storage backend instead of a public anonymous host
Actual behavior
A user can run:
before-and-after <before> <after> --markdownand the tool will upload screenshots to 0x0.st unless a custom upload destination is configured.
Affected files
README.mdsrc/upload.tssrc/bin/cli.tsskill/SKILL.mdskill/scripts/upload-and-copy.shskill/scripts/adapters/0x0st.shskill/scripts/adapters/gist.shtests/integration/upload.test.ts
Steps to reproduce
- Inspect
src/upload.tsand noteDEFAULT_UPLOAD_URL = 'https://0x0.st'. - Inspect
src/bin/cli.tsand note that--markdowntriggers upload when no custom URL is supplied. - Inspect
README.md, which states that0x0.stis the default. - Inspect
skill/scripts/upload-and-copy.sh, which defaultsIMAGE_ADAPTERto0x0st. - Inspect
skill/scripts/adapters/0x0st.sh, which POSTs the file tohttps://0x0.stand returns a public URL.
Suggested fix
One of these would materially improve the default:
- remove
0x0.stas the implicit default and require an explicit upload destination - add an explicit
--public-upload/--allow-public-uploadopt-in for0x0.st - make
--markdownfail with a message unless a custom upload backend is configured - at minimum, add a loud runtime warning and avoid treating public upload as the default safe path
Context
The root AGENTS.md describes this project as generating PR-ready markdown tables with uploaded images, which makes secure defaults especially important for real-world use on preview/internal applications.
Observed on
- Repository:
vercel-labs/before-and-after - Branch:
main - Observed: 2026-04-07
Activity
0No activity yet.