Secure your Shopify app
before the raccoons get in.

A terminal field guide for Shopify developers. Bandit โ€” a masked trash panda โ€” shows you exactly how he'd rummage through your app, then how to lock the can.

$ ./lock-the-can browse dumpster dives

ls ./sections

tail -n 3 ./dumpster-dives

cat ./severity-examples

CRIT Access token in localStorage
๐Ÿฆ Bandit opened DevTools and walked off with your Admin API token. It's now a permanent credential sitting in browser storage.
โ†’ fix: keep tokens server-side; use session tokens + App Bridge for the frontend.
WARN Webhook has no HMAC verification
๐Ÿฆ He POSTed a fake orders/create to your endpoint. You trusted it.
โ†’ fix: verify the X-Shopify-Hmac-Sha256 header against your app secret before processing.
INFO Requesting write_orders you never use
Over-scoped OAuth. Every extra scope is extra loot if you're breached.
โ†’ fix: request the minimum scopes; audit on each release.