bexenel

Five security habits every small app team should start on day one

You don't need a security department to ship a safe app. You need a few habits, started early, before the shortcuts set in.

Pink and violet light with the Bexenel mark in the centre

Small teams move fast, and security often waits for "later". The trouble is that later arrives with real users, real data and a codebase full of shortcuts. These five habits cost very little on day one and a great deal to add after launch.

Keep secrets out of the app

Anything inside your app can be extracted by someone determined enough: API keys, tokens, hard-coded passwords. Treat the app as public.

Keys that grant real power belong on your server, which calls the third-party service on the app's behalf. Before every release, it's worth a quick search of the codebase for anything that looks like a credential:

git grep -nE "(api[_-]?key|secret|token|password)\s*[:=]" -- ':!*.md'

It won't catch everything, but it catches the most common mistake: a key pasted in "just for testing".

Encrypt every connection

Every request should use HTTPS, with no exceptions for "internal" or "temporary" endpoints. On Android you can make the system refuse unencrypted traffic entirely with a network security configuration:

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="false" />
</network-security-config>

iOS enforces a similar policy through App Transport Security by default. Leave it switched on.

Check important decisions on the server

The app can be modified, so it can't be the final judge of anything that matters: whether a purchase is real, whether a user may see some data, whether a score is legitimate. Verify these on your server, using the app store's or payment provider's own verification.

Ask for the fewest permissions

Every permission is a promise to handle something sensitive carefully. Ask only for what a feature needs, ask at the moment it's needed, and explain why in plain language. People are far more likely to say yes, and you have less to protect.

Keep dependencies up to date

Most apps are mostly other people's code. Turn on automated dependency updates in your repository, review them weekly, and remove libraries you no longer use. A smaller dependency list is a smaller attack surface.

Start before it feels necessary

None of these habits slows a team down once it's routine. The time to start is when the app is small and the fixes are easy, which is almost always now.