---
title: "Vibe coding security risks: which ones a first website can actually have"
url: https://iwantaito.com/blog/vibe-coding-security-risks-for-a-first-website/
summary: "The security risks of vibe coding depend on what your site does. A plain page has few. The serious ones come with logins, payments, stored details or paid services, and each has a check you can do."
published: 2026-11-12
updated: 2026-11-12
author: "Jack Stovell"
publisher: "Adapt Progress Evolve Limited"
language: en-GB
---

# Vibe coding security risks: which ones a first website can actually have

The security risks of vibe coding depend on what your site does. A plain page has few. The serious ones come with logins, payments, stored details or paid services, and each has a check you can do.

Short answer: for a first site, the risk is mostly in what you add. A page of words, pictures and links gives an attacker very little to work with. A page that holds people's details, takes money or spends yours on every visit gives them plenty.

Most of what you'll read about vibe coding security is written for developers shipping apps: remote code execution, SQL injection, risky dependencies. Those risks are real, but most of them belong to projects with servers and databases, which a first site usually doesn't have. So this post goes up a ladder instead: a plain page, then a form, then logins and shops, then a chatbot. Each step adds something, and each addition comes with a check. If you'd like the gentler overview first, [vibe coding websites for beginners](/blog/vibe-coding-websites-for-beginners/) covers the phone, text and link checks, so I won't repeat them here.

## A plain page: what can and cannot go wrong

A plain site is a folder of files that Cloudflare hands to each visitor's browser. At the time of writing (4 November 2026), Cloudflare's Pages documentation describes server-side code as something you add on purpose, with a feature called Pages Functions, and lists its database, D1, as a separate product. So a page made only of text, pictures and links, with no Functions and nothing that sends details to another service, has no code of yours running on a server.

That doesn't make it risk-free. The most likely problems are a wrong phone number, a dead link, or a private detail you pasted in without thinking, like your home address or personal mobile. All of it is public the moment you upload. And if Claude adds scripts that take something from the web address or from what a visitor types and put it on the page, mistakes there can be misused in the visitor's browser. OWASP, a well-known web security project, calls this DOM based cross-site scripting.

The check: read every word as a stranger would, because strangers will. If you'd mind a stranger seeing something, take it out. If the folder has any .js files, ask Claude in plain words whether any script puts what a visitor types, or anything from the web address, onto the page, and to make it safe if so.

## Secrets: the one mistake that matters most

A secret is a password or an API key: anything that proves you're allowed to do something, or lets someone spend money in your name. The mistake is putting one in your site's files. It's easy to make, because if you paste a key into the chat, the AI may write it straight into the code.

Anthropic's help page on API keys says to treat a key like a password and never share it. It also says never to include a key directly in your code or configuration files, and to use your cloud provider's encrypted secret storage instead. It warns that people often commit keys to public GitHub repositories by accident. If a key is exposed, it recommends revoking it straight away in the Console.

GitHub also has a safety net. At the time of writing (4 November 2026), its docs say secret scanning runs automatically and free on public repositories, checks the whole history, and raises an alert when it finds a known kind of secret. Push protection blocks a push containing a secret before it reaches the repository, and GitHub lists file uploads on its website among the things it covers. For your own account it's on by default and stops you pushing secrets to public repositories. Anthropic says it works with GitHub so that a Claude key found in a public repository is switched off automatically, and you get an email. That's useful backup, but it only catches the kinds of secret it recognises, so don't rely on it.

The check: before you upload, open each file and use Find (Ctrl+F, or Cmd+F on a Mac) to search for "key", "password" and "token". If something real turns up, take it out. If it has already been uploaded anywhere, replace it with a new one. GitHub's secret scanning page says to rotate an exposed credential immediately, and deleting the file doesn't remove it from the repository's history.

## Forms and anything that collects people's details

Once your site has a box someone types into, you're handling other people's information. The question is where it goes: to your inbox, to a database, or to a form service the AI picked without telling you? If you can't answer that in one sentence, you're not finished.

First ask whether you need a form at all. Our [business website build](/asks/build-me-a-website-for-my-business/) used tap-to-call and tap-to-email buttons and a link to a booking page, and the site itself stored nothing. That's less fancy, and it means there's no form to get wrong. Calls, emails and bookings still land in your phone, your inbox and your booking service, so keep those accounts locked down too.

The check, if you keep a form: send a test message yourself and follow it to wherever it ends up. Then ask who else can see that place.

## Logins, shops and payments: where to stop and take advice

This is where I'd stop being cheerful. Storing passwords safely is specialist work, and a password check written into a plain site's own files can be read by anyone who opens them. A login can work perfectly on your laptop and still be unsafe, and you can't tell which by looking.

Payments have a better answer: don't handle them yourself. Our [online shop build](/asks/build-me-an-online-shop/) (run on 1 October 2026) was built for one Stripe payment link per product, so that Stripe's page would take the card and the delivery address and the shop would have no basket or shop software to look after. Be clear what we did and didn't try, though. We never made real links: we tested made-up Stripe-style addresses, nothing reached Stripe, and until real links go in, the buttons say "Email us to order". The design keeps card numbers out of the site's files, but we didn't test a real checkout.

The check: if your site would store passwords or card details itself, don't put it live on your own say-so. Pass that part to a service built for it, or get someone who does this for a living to look first.

## A chatbot or anything that calls a paid service

A chatbot looks like a small addition, but in a build like ours, each question is sent to Claude's paid API using your key, and the answers are paid for from your credit. Anyone who gets that key, or who can use your chat box as a free Claude, can spend that credit.

Our [chatbot build](/asks/build-me-a-chatbot/) (run on 1 October 2026) shows how it should be set up. Claude planned to keep the key as an encrypted secret in Cloudflare and never in the page, and its instructions say to add it as a Secret under the Worker's Settings, in Variables and Secrets. It also told us to leave auto-reload off in the Claude Console, so the most you can lose is the credit already there. We didn't do that set-up for real: we ran the files on our own machine with a deliberately wrong key and never hosted a public copy, because a public copy would let anyone run up charges. The page also records what slipped through. A request with a faked header still got through to Claude in our test, and the per-visitor limit was only best effort, as Claude said itself. The real protection is the credit and spend limit in the Console.

The check: make sure the key lives in your host's secret settings and nowhere in the files, leave auto-reload off, and set a monthly spend limit you're comfortable with.

## Public repository, public files: what GitHub makes visible

At the time of writing (4 November 2026), GitHub's docs say a public repository's code is visible to everyone who can visit GitHub.com, and secret scanning looks through its whole history. Both points tell you the same thing: anything you ever uploaded, including a file you later deleted, can still be found.

At the time of writing, GitHub's visibility page says you change a repository to private under Settings, in the Danger Zone section, with Change visibility. It also warns that public forks (copies other people made) stay public. So if a key was ever in a public repository, making it private isn't enough: follow the secret scanning advice above and change the key.

## Five checks to do before you go live

1. Search every file for "key", "password" and "token".
2. Check whether your repository is public or private, and that you chose that on purpose.
3. Read every page as a stranger would, and take out anything personal you didn't mean to share.
4. Send any form yourself and follow the message to where it lands.
5. If anything calls a paid service, confirm the key is in your host's secret settings, auto-reload is off and a spend limit is set.

Those checks cover the commonest mistakes on a first site. If you're still deciding whether to build with AI at all, [can I use AI to build a website](/blog/can-i-use-ai-to-build-a-website/) answers that first.

## When to stop vibe coding and ask a person

Stop when the site would store passwords, take card details itself, or hold information you'd hate to see leaked. Stop when you can't say where something goes or who can see it. And stop when you feel out of your depth, because that feeling is usually right. Asking for help at that point is the sensible move.

If you haven't set anything up yet, the [start page](/start/) walks through the free accounts the plain-page route uses, which is the safest place to begin.

## Sources

- [Cloudflare Pages docs (Pages Functions for server-side code; D1 as a separate database product)](https://developers.cloudflare.com/pages/)
- [OWASP: DOM based XSS Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/DOM_based_XSS_Prevention_Cheat_Sheet.html)
- [GitHub Docs: About secret scanning (scans whole history; rotate an exposed credential immediately)](https://docs.github.com/en/code-security/secret-scanning/introduction/about-secret-scanning)
- [GitHub Docs: About push protection](https://docs.github.com/en/code-security/secret-scanning/introduction/about-push-protection)
- [GitHub Docs: Setting repository visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility)
- [Claude Help Center: API key best practices](https://support.claude.com/en/articles/9767949-api-key-best-practices-keeping-your-keys-safe-and-secure)

## Questions people ask

### What are the downsides of vibe coding?

You end up with code you haven't read. On a plain page of text and links that usually costs little. The cost grows with every script, form, login, payment or paid service you add, since those are the parts where a mistake you can't see affects other people or your money.

### Can you trust vibe coding?

Trust it as far as you can check it. You can read a plain page and click its links yourself. You can't confirm by looking that a login or payment system is safe, so for those, use a service built for the job or ask someone who does this for a living.

### What to avoid when vibe coding?

Never paste a password or API key into your site's files, and don't add features you don't need. A visible email address or phone number does the job of a contact form, and the site itself stores nothing.

### How do I make sure my vibe-coded site is secure?

Do the checks in this post before you upload. Keep any keys in your host's secret settings, never in the files. If your site takes payments or passwords, send that part to a service built for it.

### Is a website built by AI safe to put live?

A plain page of text, pictures and links usually is, once you've read every word and clicked every link. Anything that runs scripts on what visitors type, collects details, takes payments or calls a paid service needs the matching check in this post first.
