A security checklist for a student project
Tracked test credentials, loose environment variables and trusting the browser: a practical checklist from auditing my own library project.
LMSTLL is a library management project: a React front end, an Express API and Firestore security rules. When I audited the repository, I found test credentials tracked in version control, and I removed them and separated the environment variables. That small audit taught me a checklist I now run on every project.
I want to be clear about status: LMSTLL is still a planned project. The security baseline exists, and the data and recommendation work has not been measured yet.
The checklist
1. Secrets are not in the repository
- Search the files and the history for keys, passwords and tokens.
- Keep secrets in environment variables, and commit only an example file with fake values.
- Add the real environment files to
.gitignorebefore the first commit.
2. A committed secret is a leaked secret
Deleting a file in a new commit does not remove it from history. If a real key was ever committed, treat it as exposed and replace it. Test credentials are lower risk, but removing them stops the habit.
3. Do not trust the browser
Anything in the browser can be edited by the person using it. The server must decide who can do what. A common mistake is accepting a field like role from the request body when someone registers. The server should assign roles itself.
4. Database rules matter
With Firestore, security rules are the last line of defence. Write them so a user can only read and write what they own, and test them.
5. Separate configuration from code
Use different values for development and production, loaded from the environment, so the same code runs in both without edits.
6. Add automatic scanning
Secret scanning on pull requests catches a leaked key before it merges. At FrancoBuddy I set this up in continuous integration.
7. Write down what you checked
A short list of what was reviewed and what was not is more honest than saying "secure".
What an audit like this does not mean
Removing test credentials and tidying environment variables is a baseline. It does not make an application secure, and I do not claim it does. It is the first pass, the one that is cheap and catches the obvious things.
If you are starting a project, do the checklist on day one. It is much easier than fixing it later.