Security
Settings > Security checks your site for security problems and helps you fix them. It runs three scans, the package scan, the code scan and the AI security review, and checks your database tables when your site uses Supabase. When there are critical issues, a red count appears next to Security in the Settings sidebar.
At the top, a line says how many issues there are to fix, and when your site was last checked. Click Check now to check it again. Below that:
- AI review: the deeper review the AI does in chat. Click Start review. It uses credits.
- Automatic checks: the free package and code scans, with when they last ran.
- Issues in your code: what the code scan and the table check found, worst first.
- Packages: each package with a known problem, the version installed, the version that fixes it, and the version on your live site. Download list saves it as a file.
- Automatic security updates, Email me about critical issues and Pause publishing while data is exposed.
Package scan
Your site is built on open-source packages, like the framework it runs on. The package scan checks every package your site uses against the npm advisory database of known security problems.
It runs on its own:
- Every day, for active and published sites
- After the AI builds
- Every time you publish, so it reflects what's live
Code scan
The code scan is free and runs on every publish. You can also run it any time from the Security tab. It looks for the mistakes that most often expose a site's data:
- Secret keys in browser code. Anything the browser loads, anyone who opens your site can read.
- Secret values in public names. Secrets whose names start with
NEXT_PUBLIC_reach the browser. Keep private keys in names without the prefix. See Public values. - Service keys in browser code. A service key skips your database's access rules, so it belongs only in server code.
- Unprotected job routes. Scheduled jobs whose routes anyone can call, not only the scheduler.
- Unsafe HTML rendering. Showing raw HTML can let someone run their own scripts on your pages.
- Risky image settings. Image settings that are more open than your site needs.
Database tables
When your site uses Supabase, visitors' browsers read and save data in its tables directly, with a public key every visitor has. Each table's row level security rules decide what that key can do. WebTwizz checks every table for three problems:
- Row level security is off, so the table's rows can be read, changed and deleted.
- A rule lets people change or delete every row, not only their own.
- A rule lets people read every row of a table with personal details, like emails, phone numbers or addresses.
Who it's open to sets the severity:
- Anyone, with no sign-in needed, is critical, and publishing waits until it's fixed or dismissed.
- Anyone signed in is high. Data every member of a site can see is often meant, so it's a warning and never holds up publishing.
When the AI creates or changes a table, it checks the result itself and fixes anything it left open before it finishes, so most problems never reach this list. The check also runs before every publish, after the AI changes your database, every day for published sites, and when you open your tables in the Data panel. In the Data panel, exposed tables are marked Exposed, and an exposed table shows what's open above its rows, with Fix with AI, Open in Supabase and Dismiss. Fix with AI checks how your site uses the table, then writes rules that keep it working. Open in Supabase opens the table's rules, to change them yourself.
If Supabase can't be reached, Security says why and how to fix it: reconnect Supabase, or restore a paused project.
WebTwizz Cloud and other databases are reached only by your site's server code, never straight from the browser, so their tables don't need this check.
AI security review
The AI security review runs in chat when you start it with Start review, and uses credits like any message. The AI reads all of your site's code, and your database's access rules when one is connected, and looks for problems specific to how your site works:
- Who can read or change what
- Pages and actions that should check someone is signed in
- Payments
- Injection, where something a visitor types is treated as code or a database query
- Data shown to people who shouldn't see it
It lists what it finds, worst first, and asks before changing anything. Its findings stay in the chat.
Reading findings
Each finding shows what's wrong, where it is, and its severity: critical, high, moderate or low. Findings are sorted from most to least severe, so start at the top.
Package findings name the package, the versions that are affected and the advisory, which you can open to read in full. Code scan findings name the file and line, and Fix with AI makes the change. Fix all with AI fixes every issue in your code in one go.
To set an issue aside, click Dismiss and pick why: It's intended on this site, I accept the risk, It's wrong or Until a fix is available. Dismissed issues move out of the list; Show dismissed brings them back, and Restore puts one back on the list.
No scan catches every risk. A clean report means none of these checks found a problem, not that your site can't have one. Test anything that handles sign-ins, payments or your Users' data before you rely on it.
Fixing findings
- Package updates. When a fixed version of a package is out, click Update to move your draft to it, then publish to put it live. Fixes within the same major version don't change how your site works.
- Fix with AI. Click Fix with AI on a finding and the AI applies the suggested fix. The change is saved in version history, so you can undo it.
Issues that need more than a version bump, like a new major version or a change to your code, are never applied for you. They're flagged with a one-click fix, so you decide when.
Automatic security updates
When a package your site uses has a critical vulnerability, and the fix is in the same major version, WebTwizz updates your published site for you:
- Only package versions change. Your site's own code is never touched.
- WebTwizz rebuilds the published version of your site. Unfinished drafts are never published.
- If the rebuild fails, your current version stays live.
- An undo point is saved in version history. To undo the update, restore the version from before it.
- If your project syncs to GitHub, the update is pushed there as a commit.
- You get an email that says what changed.
WebTwizz also rebuilds published sites when Node.js, which runs them, gets a security fix. Nothing in your site changes, and the update shows under Handled for you.
Automatic updates are on by default for new sites. Sites created before automatic updates existed have them off. To change it for a site, open Settings > Security and switch Automatic security updates on or off. If an issue is being actively exploited, WebTwizz may still apply the update, and may take the site offline until it's fixed.
Email alerts
- Critical issues. When a published site has a new critical issue, including a table open to anyone, you get an email at your account address. Everything new that day comes in one email, and an issue is only ever emailed once. This is on by default. To stop these emails, switch off Email me about critical issues in Settings > Security.
- High issues. These come in a weekly email.
Publish checks
Every publish runs the package scan and the code scan, and checks your database tables. Open critical issues show on the Security row of the publish panel.
Pause publishing while data is exposed is on by default. While a table is open to anyone, or a secret key is written into your code, publishing waits, and the publish panel says why. To publish anyway, fix the issue, dismiss it, or switch the setting off in Settings > Security. Package issues never hold up publishing, since automatic security updates handle them.
What WebTwizz handles
These are kept secure and up to date for you, with nothing to set up:
- The starter and templates. The starter every new site is built from, and every template in the gallery.
- Your preview. Each site's preview runs in its own isolated virtual machine.
- Hosting. Sites on webtwizz.app addresses and on their own domains, with HTTPS.
- Secrets. Stored encrypted. You enter them only on WebTwizz, never in a chat with an AI assistant. See Secrets.
- Password-protected and private sites. Access is checked before the site loads. See Visibility.
Reporting a security problem
If you find a security problem in WebTwizz, or in a site hosted on it, email security@webtwizz.com. See webtwizz.com/security for what to include and past advisories.