Guide
How to check code from Cursor or Claude Code before you ship it
Tools like Cursor and Claude Code write a lot of code quickly, and the code runs the same whether or not anyone read it closely. A short look at a few things before you share a project catches the mistakes that matter most.
This is a short checklist for projects written with an AI assistant: three things to check in the project's files, each with a way to check it yourself and what to do. You do not need to be a security expert, but you do need to be comfortable in a terminal.
1Keys typed into files
An assistant sometimes puts a key straight into the code to make something work, especially when you paste one into the chat. A key in a file is copied wherever the file goes: to your repository, to your host, and to every person who can read either.
Check it yourself: Search the project for words like key, secret, token and sk-, and read each hit. Look at the history too: git log -p -S"sk-" shows the commits that added or removed that text.
What to do: Move each key into an environment variable or your host's secret settings, then create a new key and delete the old one. Removing a key from the code does not remove it from the history.
2The .env file and git
A .env file holds the keys a project needs to run. If git is not told to ignore it, it is saved with the project and pushed along with it.
Check it yourself: Run git check-ignore .env. If it prints .env, git ignores the file. If it prints nothing, it does not. Then run git ls-files .env: if that prints the name, the file is already saved in the project.
What to do: Add .env to .gitignore, and if the file was already saved, remove it from the project with git rm --cached .env. Treat every key that was in it as leaked and replace it.
3Packages the assistant chose
An assistant can suggest a package name that is slightly misspelled or does not exist, because it is guessing from memory. Anyone can publish a package under such a name, and a package you install can run code on your computer and in your app.
Check it yourself: For each package you did not choose yourself, look it up on the package's registry. Is the name exactly the one you meant? How old is the package, how many people use it, and who publishes it? Be careful with a package that is new, has few users or has a name one letter away from a famous one.
What to do: Remove packages you cannot account for, and keep the exact versions you checked in your lock file, so that a later install does not quietly bring in something else.
What a check can and cannot tell you
Passing these checks does not prove an app is safe. It means these problems were not found. A full review also looks at how your app handles each person's data, and that takes someone who reads the code or tries to get past the sign-in.
Check them all from the outside
Hardex scans a live app the way a stranger on the internet would, with nothing to install. By default it only reads: it never changes anything in your app. It looks for the problems above where they apply to your app, and more, then reports what it found.
What each plan includes is on the plans page.
Scan your appHardex is an independent product made by AryonX. Cursor and Claude Code are named here only to say what this guide is about.