App security guide: how to keep an app and its users safe

Short answer
- The current OWASP Mobile Top 10 is the 2024 edition. Its 10 risks run from M1 Improper Credential Usage to M10 Insufficient Cryptography, and OWASP rates 8 of the 10 as having a severe technical impact.
- The server side is where an app’s security is won or lost. Every request for private data has to be checked on the server, because anything on the phone can be changed by an attacker.
- NIST’s current password rules say a password used on its own needs at least 15 characters (8 if it’s one part of multi-factor login), with no forced symbols and no forced changes.
- Apple’s App Transport Security blocks connections below TLS 1.2 by default, and Android has blocked unencrypted HTTP by default for apps targeting Android 9 and later.
- In the UK, a personal data breach that puts people at risk has to be reported to the ICO within 72 hours of you becoming aware of it. You must record every breach, even the ones you don’t report.
- In the UK government’s 2025/2026 Cyber Security Breaches Survey, 43% of businesses reported a breach or attack in the past 12 months, but only 25% had a formal incident response plan and 13% had run a penetration test.
App security is the work of making sure the wrong people can’t read, change or delete your users’ data, run up bills in your name, or use your app to hurt anyone. It covers the app on the phone, the servers it talks to, the companies whose code you’ve bolted on, and the people who hold the passwords to all of it.
We’ve run an app platform since 2011 and published thousands of apps to the stores. The phone gets most of the attention, but the database and servers behind it are often where the damage is done.
This guide is the plain-English version of what professional security people check, built on primary sources I opened on 5 December 2026: OWASP, NIST, Apple, Google, the ICO, the PCI Security Standards Council, Stripe and the UK government. It’s written for founders, business owners and managers who commission apps as much as for the people who build them. If your app was built with an AI tool like Lovable or Bolt, read is vibe coding safe? alongside this, because it covers the problems specific to AI-built apps that I won’t repeat here.
Nothing here is legal advice. If your app handles health data, children’s data or money at scale, pay a specialist to look at it.
What does app security actually cover?
App security covers 4 things: the app installed on the phone, the backend (the servers, database and file storage the app talks to), the network connection between them, and the accounts and keys that control all of it. A weakness in any one of them can expose the rest.
A quick word on terms, because security writing is full of them.
- Authentication is proving who someone is (logging in). Authorisation is deciding what that person is allowed to see and do once they’re in. Most serious app leaks are authorisation failures: the login works, but user A can still read user B’s records.
- An API (application programming interface) is the set of addresses your app calls to fetch and save data. Anyone can call those addresses with their own tools, without your app at all.
- An SDK (software development kit) is a bundle of someone else’s code you add to your app, like an analytics, ads or crash-reporting library.
- Encryption scrambles data so only someone with the right key can read it. In transit means while it travels over the network. At rest means while it sits on a disk.
The single most useful idea in app security is this: treat the phone as enemy territory. An app can be downloaded, unpacked, read and modified.
OWASP’s own guidance on authentication says to assume any check done on the phone can be bypassed, and to have the backend verify each user’s role and permissions itself. Every section below comes back to that.
How much of this you handle yourself depends on how the app was built. On a no-code platform, the platform runs the backend and you mostly look after accounts and settings.
On a custom or AI-built app, you (or your developer) own every layer. Our guide to how apps are built explains the different setups.
How common are breaches?
Common enough that you should plan for one. In the UK government’s Cyber Security Breaches Survey 2025/2026, published on 30 April 2026, 43% of businesses said they’d had a breach or attack in the last 12 months.
The survey covers whole businesses and all their systems, so read it as a picture of how prepared firms are in general. The gaps it shows are the same ones I see in app projects: few teams test, few check their suppliers, and most have no written plan for a bad day.
| Measure (UK, last 12 months) | Businesses | Charities |
|---|---|---|
| Had any breach or attack | 43% | 28% |
| Had a breach or attack: micro / small / medium / large businesses | 42% / 46% / 65% / 69% | n/a |
| Experienced phishing | 38% | 25% |
| Have a formal incident response plan | 25% | 19% |
| Ran a penetration test | 13% | 7% |
| Ran a vulnerability audit | 18% | 10% |
| Reviewed risks from immediate suppliers | 15% | 9% |
| Hold Cyber Essentials certification | 5% | not reported |
Source: DSIT and Home Office, Cyber Security Breaches Survey 2025/2026, checked 5 December 2026.
Phishing (fake emails or messages that trick someone into handing over a password) hit 38% of businesses. That matters for apps because the accounts that control your app (your App Store Connect login, your cloud console, your payment dashboard) are exactly what a phisher wants.
What is the OWASP Mobile Top 10?
The OWASP Mobile Top 10 is a ranked list of the 10 most important security risks for mobile apps, published by OWASP, a non-profit that writes free security standards. The current edition is the 2024 final release.
Each risk has its own page on the OWASP Mobile Top 10 2024 list with ratings for how easy it is to exploit, how common it is, how easy it is to spot, and how bad the damage is. I’ve turned all 10 into a filterable table: tick “Severe business impact” or “Easy to exploit” to see where to start, or pick where the fix lives.
OWASP risk finder
OWASP Mobile Top 10 (2024) in plain English
Filter the 10 risks by how easy they are to exploit, how much damage they do, and whether you can check them yourself. Each row has the fix and a question to ask your developer.
| Risk | In plain words | The main fix |
|---|---|---|
| M1 Improper Credential Usage | Passwords or keys built into the app, or user passwords handled carelessly | No credentials in the app; use revocable tokens; rotate keys |
| M2 Inadequate Supply Chain Security | Bad code arriving through libraries, SDKs, or a hijacked build and signing process | Vet third-party code; protect signing; monitor and update |
| M3 Insecure Authentication/Authorization | Skipping login, or a normal user doing admin things | Check identity and permissions on the server for every request |
| M4 Insufficient Input/Output Validation | Data from users or the network isn’t checked, so attackers inject commands | Validate input, sanitise output, use parameterised queries |
| M5 Insecure Communication | Data travelling unencrypted or with weak certificate checks | TLS everywhere; never accept bad certificates |
| M6 Inadequate Privacy Controls | Personal data leaked through storage, logs, backups or traffic | Collect less; delete on schedule; protect what’s left |
| M7 Insufficient Binary Protections | The app file is unpacked or tampered with to pull out secrets or skip checks | Keep secrets out; make high-value apps harder to read (obfuscation); check on the server |
| M8 Security Misconfiguration | Debug left on, too many permissions, files readable by other apps | Least permissions; debug off in release; review defaults |
| M9 Insecure Data Storage | Sensitive data saved where other apps, malware or a thief can reach it | Keychain or Keystore; encrypt at rest; store less |
| M10 Insufficient Cryptography | Weak or home-made encryption, poor key handling, unsalted password hashes | Standard libraries, current algorithms, salted slow hashing |
A few things jump out when you filter. OWASP rates M1, M3, M5, M7 and M9 as “easy” to exploit.
And three of the five (M1, M3 and M7) come down to the same root cause: trusting the app on the phone to keep a secret or enforce a rule. Fix that habit and you’ve dealt with a big slice of the list.
Two caveats. The Top 10 is an awareness list, and the full testing standard is OWASP’s Mobile Application Security Verification Standard (MASVS), which I cover in the testing section.
The Top 10 is also written for native mobile apps, so a web app wrapped for the stores needs the web-side checks OWASP publishes separately as well.
How should an app handle logins and passwords?
Do the checking on the server, follow NIST’s current password rules, and offer a stronger option than passwords where you can: passkeys, Sign in with Apple or Google, or a second factor. Never store a user’s password on the phone.
NIST (the US National Institute of Standards and Technology) publishes the most widely copied password rules. Its SP 800-63B, revision 4, threw out a lot of habits people still build into sign-up forms.
| Rule | What NIST SP 800-63B-4 says |
|---|---|
| Minimum length, password used alone | At least 15 characters (a “SHALL”) |
| Minimum length, password as one part of multi-factor login | At least 8 characters |
| Maximum length | Should allow at least 64 characters |
| Composition rules (must include a symbol, a capital and so on) | Shall not be imposed |
| Forced periodic changes | Shall not be required; force a change only when there’s evidence of compromise |
| Blocklist | New passwords shall be checked against a list of common, expected or compromised passwords |
| Password managers and autofill | Shall be allowed; pasting should be allowed |
Source: NIST SP 800-63B-4, checked 5 December 2026.
If your sign-up form still demands “one capital, one number, one symbol, change it every 90 days”, it breaks NIST’s current rules and annoys everyone. The UK’s National Cyber Security Centre gives the user-side version of the same idea: three random words joined together.
Passkeys and social sign-in
A passkey replaces the password with a pair of cryptographic keys: a private one that stays on the user’s device and a public one your server keeps. Apple’s passkey page says servers only keep public keys, which makes them a less tempting target for hackers, and that a passkey is tied to the app or site it was made for, so people can’t be tricked into using it on a fake one.
For a small business app, passkeys or Sign in with Apple and Google move the hardest part of login (storing secrets safely) onto companies with much bigger security teams than yours. I’d take that trade almost every time.
What OWASP says to avoid
OWASP’s M3 guidance is specific, and most of it is about not trusting the phone:
- Don’t rely only on checks done on the device, because they can be bypassed on a jailbroken or rooted phone (one where the owner has removed the maker’s built-in restrictions).
- Never store the user’s password on the device, including for “remember me”.
- Use tokens (temporary access passes issued by your server) that the user can revoke from inside the app.
- Don’t use spoofable values like a device ID or location as proof of identity.
- Make staying logged in opt-in, and don’t use 4-digit PINs as passwords.
- Have the server check the user’s role and permissions on every request. Never trust a role sent from the app.
The last one is the big one. If the app sends “role: admin” and the server believes it, anyone with a free proxy tool (software that lets you read and edit the traffic between an app and its server) can become an admin.
Is it safe to store data on the phone or in the cloud?
Both can be safe, but only if you store as little as possible, put secrets in the phone’s protected storage, and lock the cloud database so each user can only reach their own records. OWASP lists insecure data storage as M9 and rates it easy to exploit and severe in impact.
On the device
Phones have a locked box built for small secrets. On iPhone it’s the Keychain, which Apple describes as an encrypted database for small bits of user data like passwords and keys. On Android it’s the Android Keystore, where Google says key material never enters the app’s own process and can be bound to secure hardware so it can’t be extracted from the device.
Login tokens belong there. They don’t belong in plain settings files, local databases, logs, screenshots or the clipboard. OWASP’s M9 page also says to encrypt sensitive data at rest, use timeouts and random session tokens, and keep libraries patched.
One setting people miss: OWASP’s M8 guidance recommends turning off Android’s app backup for data that shouldn’t end up in a device backup.
In the cloud
Your cloud database is where the real volume of data lives, so it’s where a mistake costs most. The fix there is access rules, which get their own section below.
Store less
The cheapest protection is data you never collected. OWASP’s M6 privacy guidance says to list every piece of personal data the app touches, ask whether each one is needed, use rougher versions where you can (a town instead of exact location), and delete data after a set period. UK data protection law points the same way, and our guide to app privacy policies covers what you have to tell users about it.
Where should API keys and secrets go?
Secret keys go on a server, in a secrets vault or environment variables, and never inside the app or its code repository. Only keys that a provider explicitly labels as safe to publish can ship in the app.
An API key is a long string that tells a service “this request comes from this account”. Some keys only identify you.
Others can spend money, read every customer’s data or delete things. The trouble starts when someone ships the second kind inside an app, where OWASP’s M1 and M7 entries say it can be pulled out of the downloaded file.
Each provider tells you which of its keys are which. Here are three common ones, from their own docs:
| Provider and key | Safe in the app? | What the provider says |
|---|---|---|
| Stripe publishable key (pk_…) | Yes | Safe to expose; can’t create charges or read account data |
| Stripe secret key (sk_…) | No | Unrestricted permissions on all Stripe APIs; Stripe recommends restricted keys instead |
| Stripe restricted key (rk_…) | No | Server-side only, with permissions you choose |
| Firebase API key | Yes | Keys restricted to Firebase services can sit in code; Security Rules and App Check protect the data |
| Supabase publishable key | Yes, if access rules are on | With row-level security on, it reaches no data until you write policies |
| Supabase secret key (and the legacy service_role key) | No | Bypasses row-level security; never use it in the browser or expose it to customers |
Sources: Stripe API keys, Firebase API keys, Supabase row-level security, all checked 5 December 2026.
The Firebase row surprises people. A key that’s “public” by design is fine; what protects the data is the rules behind it.
Firebase does make one exception: its docs say a Gemini Developer API key should never go in your code.
Stripe’s guidance on the dangerous kind is a good checklist for any provider: store keys in a secrets vault or environment variables, keep them out of anything checked into version control, rotate them when someone with access leaves, and never send them over email or chat.
If a secret does leak, the OWASP secrets management cheat sheet is blunt: revoke it immediately, issue a replacement, and remove the old value from code and logs. Deleting the line from your code isn’t enough, because the old key still works until you revoke it.
What are database access rules, and why do so many leaks start there?
Database access rules decide which user can read or change which rows of data, and they’re enforced by the database itself, so they still apply when someone skips your app and calls the database directly. When they’re missing or left in test mode, anyone who finds the address can read the lot.
Many modern apps let the phone talk straight to a hosted database, like Supabase or Firebase. That’s quick to build, and it’s safe only if the rules are right.
- Supabase uses row-level security (RLS): rules attached to each table that say, for example, “a user can only see rows where the owner is them”. Supabase’s own docs say to enable it on every table in an exposed schema (the part of the database the public API can reach), and warn that a table without it “is readable and writable by any role with a grant on it”.
- Firebase uses Security Rules. Its insecure rules page warns that the open ruleset should never be used in production because it lets anyone overwrite the whole database, and that without authentication and Security Rules anyone who guesses your project ID can steal, modify or delete the data.
The test I’d run on any app, whoever built it: make two accounts, put data in the first, sign in as the second, and try to see the first account’s data by changing any ID in the request. If you can, the rules are wrong. Our vibe coding safety guide walks through this test step by step, along with the public cases where AI-built apps shipped with these rules missing, so I won’t repeat them here.
What does encryption in transit and at rest mean for an app?
Encryption in transit means every connection between the app and a server uses TLS (the protocol behind the padlock in a browser), so another person on the same wifi can’t read or change the data. Encryption at rest means the data is scrambled while stored, on the phone and on the server, so a stolen disk or backup is useless without the key.
In transit: the platforms do most of the work
Both platforms now refuse insecure connections unless the developer switches the protection off.
- Apple’s App Transport Security (ATS) is on by default for apps built with the iOS 9 SDK or later. It requires TLS 1.2 or later, forward secrecy, SHA-256 certificates and AES encryption, and it blocks connections that fall short.
- Android’s network security configuration blocks cleartext (unencrypted HTTP) traffic by default for apps targeting Android 9 (API level 28) or higher.
So the question to ask is whether anyone has added an exception. On iOS that shows up in the app’s settings file as an ATS exception; on Android as cleartextTrafficPermitted=”true”.
Both are sometimes added during development and forgotten. OWASP’s M5 guidance also says to avoid switching off certificate checks even during development, never to allow bad certificates (self-signed, expired or untrusted ones), and never to send sensitive data by SMS or in a notification.
Certificate pinning (telling the app to trust only your server’s specific certificate) is an extra layer for higher-risk apps like banking. Android’s docs warn you to include a backup pin, or a certificate change can cut off every installed copy of the app until users update. For most small business apps I’d skip it and spend the effort on access rules.
At rest
On the phone, secrets go in the Keychain or Keystore, and OWASP’s M9 guidance says to encrypt any other sensitive data you keep there with keys managed securely. On the server, check your database and file storage provider’s documentation for how data is encrypted at rest, and ask your developer to show you where that’s stated.
Passwords are a special case. They should be hashed: turned into a one-way fingerprint that can’t be turned back into the password, even by you.
OWASP’s M10 page says to use a random salt (a unique random value mixed into each password before hashing) and a slow key-derivation function (a hashing method built to make mass guessing slow) such as PBKDF2, bcrypt or scrypt, and to use established crypto libraries instead of writing your own. If a developer tells you they wrote their own encryption, that’s a red flag.
The UK government’s voluntary Code of Practice for app store operators and app developers puts it in one line (provision 2.1): developers shall use industry standard encryption within their apps, for data in transit and wherever the app needs to encrypt data stored on the device.
How risky are third-party SDKs?
Risky enough that OWASP ranks supply chain security as M2, rating it severe in impact and hard to detect. Every SDK you add runs with your app’s permissions and can collect data under your name, and both Apple and Google hold you responsible for what it does.
Apple’s third-party SDK requirements page says it plainly: when you use a third-party SDK, you are responsible for all the code it includes in your app. Apple now requires a privacy manifest (a file describing what the SDK collects) for a long list of commonly used SDKs, including Firebase and Facebook components, when you submit a new app or an update that adds one, plus a signature when the SDK is added as a ready-built binary. Google’s Data safety form says your declarations must include data collected by the SDKs and libraries in your app.
In practice, SDK risk shows up 3 ways:
- Data leakage. An analytics or ad SDK collects more than you realised, and your privacy label is now wrong.
- Vulnerable code. A library has a known flaw, and your app ships it until you update.
- Compromised code. Someone tampers with a library or your build and signing process so a malicious version ships under your name.
The fixes are boring and they work. Keep a list of every SDK in the app, what data each one touches and who owns updating it.
Remove anything you don’t use. Update when a security fix ships: the UK Code of Practice (provision 4.2) says developers shall update their app when a third-party library or SDK gets a security or privacy update. And protect the signing keys and store accounts that publish your app, because OWASP’s M2 includes attackers signing and shipping a malicious build.
Only 15% of UK businesses reviewed the cyber risks from their immediate suppliers last year, according to the breaches survey above. An SDK is a supplier.
Do you need to worry about PCI DSS if your app takes payments?
Yes, but you can make it a small job. PCI DSS is the card industry’s security standard for anyone who stores, processes or transmits cardholder data, and the way to keep your share small is to make sure card numbers go straight from the user to your payment provider and never touch your servers.
The current version listed by the PCI Security Standards Council is v4.0.1. Its FAQ on outsourcing says that handing payments to a provider doesn’t remove your responsibility: you still have to make sure the provider is compliant and you still have to validate your own compliance, typically through a self-assessment questionnaire (the FAQ gives SAQ A as an example).
Stripe’s integration security guide puts numbers on the difference. A business that handles raw card numbers itself “might be required to meet more than 300 security controls in PCI DSS”.
Using one of Stripe’s low-risk integrations sends card details directly to Stripe and reduces your obligations, though you still attest to compliance every year. Stripe also says the card type, last 4 digits and expiry date it sends back are outside PCI scope, so you can store those.
Three app-specific payment rules I’d add:
- Set the price on the server. If the app tells the server what the customer owes, someone will change it.
- Verify webhooks. A webhook is the message a payment provider sends your server to say “this was paid”. Stripe says you must verify webhook signatures so you know each one really came from Stripe. Skip that check and anyone could send your server a fake “paid” message.
- Know which payment system the store requires. Apple and Google have their own rules on which purchases must go through their in-app purchase systems, where the card details never reach you at all. Our guide to in-app purchases covers when that applies.
For how payments fit into the wider business model, see our app monetisation guide.
What do Apple and Google already protect for you?
Quite a lot at the device and store level: sandboxing, secure storage, encrypted connections by default, malware scanning on Android and tools that let your server check it’s talking to a genuine copy of your app. None of it protects your server, your database rules or your account passwords.
| Protection | Apple (iOS) | Google (Android) |
|---|---|---|
| Secure storage for secrets | Keychain: an encrypted database for small secrets | Android Keystore: key material never enters the app’s process and can be bound to secure hardware |
| Encrypted connections by default | App Transport Security, TLS 1.2 or later, on by default since the iOS 9 SDK | Cleartext HTTP blocked by default for apps targeting Android 9 (API 28) and up |
| Is this a genuine copy of my app? | App Attest: a hardware-based key, certified by Apple and kept in the Secure Enclave (the phone’s built-in security chip), used to sign requests | Play Integrity API: checks for an unmodified app, a Play install and a certified device; 10,000 requests a day by default |
| Malware scanning on the device | Not covered on the pages checked | Google Play Protect, which Google says scans 200 billion apps a day |
| Store rule on security | Guideline 1.6: apps should implement appropriate security measures to prevent unauthorised use, disclosure or access to user data | Data safety form asks whether all user data is encrypted in transit and whether users can request deletion |
| Rule on downloaded code | Guideline 2.5.2: apps may not download or run code that introduces or changes features | Not compared here |
| Optional independent review | None found on the pages checked | Independent Security Review badge after testing against OWASP MASVS by a Google-authorised lab, paid for by the developer |
Sources: Keychain, App Transport Security, App Attest, App Review Guidelines, Android Keystore, Android network security config, Play Integrity, Play Protect, Data safety. All checked 5 December 2026.
App Attest and Play Integrity deserve a moment, because they answer a question a lot of owners ask: “can I stop people using a hacked copy of my app?”. Both let your server ask Apple or Google whether a request came from your real, unmodified app on a real device.
Apple’s docs explain why you need the server involved: a compromised app can falsify its own checks. Google is careful to say the Play Integrity API works best as one signal among several, with a range of responses (allow, allow with limits, deny) instead of a single yes or no.
Worth knowing too: Google notes that the independent security review badge may not check whether your Data safety answers are accurate, and that you stay responsible for them. A badge doesn’t replace doing the work.
For the store side of launching (accounts, review, listings), see our guide to publishing your app.
How do you test an app’s security, and do you need a penetration test?
Test in layers: run the owner-level checks yourself before every release, have a developer check the app against a published standard, and buy a penetration test when the app holds data or money that would really hurt to lose. A penetration test is a paid, authorised attempt by specialists to break into your app the way a real attacker would.
Start with a standard
The OWASP MASVS groups mobile security controls into 8 areas: storage, cryptography, authentication and authorisation, network communication, platform interaction, code quality, resilience against reverse engineering, and privacy. Its companion on the same OWASP site, the Mobile Application Security Testing Guide (MASTG), sets out tests for these areas on Android and iOS.
Ask any developer or tester which MASVS areas they covered. If they don’t recognise the name, that tells you something.
Run the owner checks yourself
Plenty of the most damaging problems can be found by a non-technical owner with two test accounts and a private browser window. The checklist below scores your app across 3 stages. Answer honestly: “not sure” counts against you, because it usually means the check was never done.
App security checklist
App security checklist: 17 checks from first user to bad day
Answer yes, no or not sure for each check. You get a score out of 100, what to fix first, and a report you can copy or print for your developer.
When a penetration test is worth it
The UK’s National Cyber Security Centre has a useful, slightly deflating, view of penetration testing. It describes a pen test as a way of gaining assurance, comparable to a financial audit, and says it shouldn’t be your primary way of finding vulnerabilities.
A test can only show you weren’t vulnerable to known issues on the day it ran. The NCSC also says tests should be done by qualified, experienced staff, and that you should scope them with the people who know the system.
My rule of thumb: get one before you launch an app that holds health, financial or children’s data, takes payments in volume, or will be used by a large organisation that will ask for the report. Make sure the scope includes the backend API as well as the app file, because the backend is where the data lives. And retest after big changes.
Prices vary with platforms, complexity and how much backend is in scope. As one published example, Software Secured lists mobile app pen tests from $10,800 USD and says a test can take from 3 days to 4 weeks depending on complexity, with most standard tests around 1 to 2 weeks. I haven’t compared enough published prices to give you a reliable range, so get 2 or 3 quotes against the same written scope.
Only 13% of UK businesses ran a penetration test last year. If you’re a small app, a structured review against MASVS plus the owner checks above will catch most of what matters for far less money. Our guide to how to test an app covers functional, device and beta testing alongside security.
If your app was built with an AI tool and you want a developer to look at one specific worry first, that’s what the Expert Review in our vibe code rescue service is for.
What should you do if your app is hacked or leaks data?
Contain it, work out what personal data was involved, and if the breach is likely to put people at risk, report it to your data protection regulator within 72 hours of becoming aware of it. In the UK that’s the ICO. If the risk to people is high, you also have to tell them directly.
Here are the duties as the ICO and the GDPR text set them out:
| Duty | What the rule says | Source |
|---|---|---|
| What counts as a breach | A security breach leading to accidental or unlawful destruction, loss, alteration, unauthorised disclosure of or access to personal data. It covers confidentiality, integrity and availability, whether accidental or deliberate | ICO |
| Report to the regulator | Without undue delay and not later than 72 hours after becoming aware, if the breach is likely to result in a risk to people. If you’re later than that, give reasons | ICO; EU GDPR Article 33 |
| When you don’t need to report | When the breach is unlikely to result in a risk to people’s rights and freedoms. Record your reasoning | ICO |
| Tell the people affected | Directly and without undue delay, if the breach is likely to result in a high risk to them | ICO; EU GDPR Article 34 |
| Keep records | Record all breaches, whether or not you report them | ICO |
| How to report | Online form, which the ICO says takes about 30 minutes and can’t be saved part-way | ICO |
| Inform others (voluntary UK code) | Developers should inform other relevant parties, such as app store operators and library or SDK developers | UK Code of Practice, provision 8.2 |
Sources: ICO personal data breaches guide, ICO breach reporting page, EU GDPR (Regulation 2016/679), UK Code of Practice, checked 5 December 2026.
The 72 hours start the moment you become aware. The ICO accepts that a full investigation may not fit in that window and lets you send the information in phases, as long as there’s no undue further delay. Outside the UK and EU the rules differ, so check with the regulator where your users live.
Write the plan before you need it
Only a quarter of UK businesses have a formal incident response plan. For an app, the plan fits on one page:
- Who decides. One named person who can take the app offline or disable a feature, plus a deputy.
- How to switch things off. Where the “maintenance mode” setting is, how to revoke every API key, and how to force all users to log in again.
- Who to call. Your developer, your hosting provider’s support route, and a lawyer or data protection adviser if you have one.
- What to collect. Logs, timestamps and what data the affected tables held, before anything is wiped.
- Who to tell. The ICO within 72 hours if there’s a risk to people, the users themselves if the risk is high, and your payment provider if card data might be involved.
- How to learn from it. Fix the cause, then test that the fix holds.
Two more things belong in place before launch. A backup you’ve actually restored from at least once.
And a published way for security researchers to report problems to you: the UK Code of Practice (provision 3.1) says every app shall have a vulnerability disclosure process, such as contact details or a contact form, accessible from the app store. A simple security@ email address on your support page is a decent start.
The legal side of running an app (privacy, consumer law, accessibility and the rest) is in our app legal requirements guide.
What should you ask a developer about security?
Ask questions that make them describe exactly what they did. “Yes, it’s secure” tells you nothing.
A good developer will enjoy these questions. A weak one will get vague.
- “Where is each permission check done?” You want “on the server, for every request”. Follow up: “If I change the user ID in a request, what happens?”
- “Which keys are in the app, and why is each one safe to be there?” They should be able to name each key and point to the provider’s docs saying it’s publishable.
- “Show me the database access rules.” For Supabase, ask whether row-level security is on for every table. For Firebase, ask to see the Security Rules and confirm test mode is gone.
- “How are passwords handled?” Look for a managed sign-in service or salted slow hashing (bcrypt, scrypt, PBKDF2), NIST-style length rules and no forced symbols.
- “What’s stored on the phone, and where?” Tokens in Keychain or Keystore, nothing sensitive in plain files or logs.
- “Have you added any exceptions to App Transport Security or allowed cleartext traffic?” The right answer is usually no.
- “Which SDKs are in the app, what does each collect, and who updates them?” Ask for the list in writing.
- “How does payment work end to end?” Card details should go straight to the provider, prices should be set on the server, and webhooks verified.
- “Which MASVS areas have you tested, and how?” Ask for the evidence, even if it’s a short document.
- “Who holds the admin logins, and do they all use 2-step verification?” That includes App Store Connect, Play Console, the cloud console and the payment dashboard.
- “What happens if we’re breached on a Saturday?” You want a name, a way to take the app offline and a way to revoke keys.
- “Who patches the app after launch, and what does that cost?” Get it into the contract.
Who is responsible for an app’s security?
You are, as the business that publishes the app and decides what data it collects, even if someone else wrote every line. Apple’s SDK page, Google’s Data safety rules, the PCI Council and the ICO all put that responsibility on the business behind the app.
The split of work changes with how the app was made:
- No-code app builder. The platform runs the servers, database and app code. Your job shrinks to strong passwords and 2-step verification on your accounts, deciding what data to collect, and keeping your privacy information accurate.
- AI-built app. You own every layer, including the parts the AI tool wrote that you haven’t read. This is where database rules and leaked keys bite hardest, and where bringing in a developer pays for itself.
- Agency or freelancer. They write the code, but the contract decides who patches it after launch, who holds the keys and who responds at 2am. Put that in writing, and make sure you own the store and cloud accounts. Our guide to who owns AI-generated code covers the ownership side.
Security also has a running cost. SDK updates, OS changes and new vulnerabilities keep coming after launch, which is part of why apps cost money to keep alive. Our app maintenance cost guide breaks that down.
For the rest of the hiring process (where to find developers, how to compare quotes, what to put in the contract), read our guide to hiring an app developer.
If you’re starting a new app that has to handle sensitive data from day one, custom development is the route I’d look at: you get a fixed quote first and you own the code at the end.
More in this guide
FAQ
What is the latest OWASP Mobile Top 10?
The current edition is the OWASP Mobile Top 10 2024 final release. Its 10 risks are improper credential usage, inadequate supply chain security, insecure authentication and authorisation, insufficient input and output validation, insecure communication, inadequate privacy controls, insufficient binary protections, security misconfiguration, insecure data storage and insufficient cryptography.
Are mobile apps more secure than websites?
They can be, but it depends on the backend. Apps get extra platform protections like sandboxing, Keychain or Keystore storage and encrypted connections by default, but they usually talk to the same kind of servers and databases as a website, and that’s where most serious breaches happen.
Is it safe to put an API key in my app?
Only if the provider says that key is safe to publish, like a Stripe publishable key or a Firebase API key restricted to Firebase services. Secret keys, such as Stripe secret keys or Supabase secret keys, must stay on a server, because anything inside an app can be extracted from the downloaded file.
How long do I have to report a data breach in the UK?
If the breach is likely to put people at risk, you must report it to the ICO without undue delay and within 72 hours of becoming aware of it. If the risk to people is high, you must also tell them directly, and you must record every breach even if you don’t report it.
Do I need a penetration test before launching an app?
Not always. Pay for one when the app holds health, financial or children’s data, takes payments in volume, or will be sold to organisations that ask for a report; for smaller apps a review against OWASP MASVS plus basic owner checks catches most problems for less.
Does using Stripe make my app PCI compliant?
It reduces your share of the work but doesn’t remove it. Stripe says businesses that handle raw card numbers may face more than 300 PCI DSS controls, while its low-risk integrations keep card data off your servers, and you still have to attest to compliance every year.
What is the most common app security mistake?
In my experience, it’s trusting the app on the phone to enforce rules the server should enforce, such as which user can see which data. OWASP rates insecure authentication and authorisation as easy to exploit and severe in impact.
Should passwords be encrypted or hashed?
Hashed, with a random salt and a slow function such as bcrypt, scrypt or PBKDF2, which is what OWASP recommends. Hashing can’t be reversed, so a stolen database doesn’t reveal the original passwords.
Is an app built with an AI tool less secure?
It can be, mostly because of missing database access rules and secret keys left in the code. Our guide to whether vibe coding is safe covers the specific risks and a checklist for AI-built apps.
Last Updated on December 5, 2026 by Ian Naylor