Mobile app security best practices come down to five habits: keep sensitive data off the device or encrypted, protect every network call, check identity and permissions on the server, control third-party code, and test before and after release. Follow them from the first sprint and you cut the most common causes of app data breaches.
What Are Mobile App Security Best Practices?
They are the design, coding, testing and operating habits that stop an app from exposing user data or being abused. Good security for mobile applications covers the code on the phone, the APIs it talks to, the cloud services behind them and the people who run the release process. It is a programme of work, not a single tool.
The most useful public reference is the OWASP Mobile Application Security Verification Standard (MASVS), which groups controls into eight areas: storage, cryptography, authentication and authorisation, network, platform interaction, code quality, resilience and privacy. Its companion, the Mobile Application Security Testing Guide (MASTG), explains how to test each control on Android and iOS.
This checklist is written for two audiences: in-house teams building apps, and business owners commissioning one from an agency. If you are in the second group, use each section as a list of questions to ask before you sign off a release. You can find more guides like this in our CyberSecurity section.
Which Mobile Risks Cause the Most Data Breaches?
The OWASP Mobile Top 10 for 2024 ranks improper credential usage first, followed by supply chain weaknesses, insecure authentication and authorisation, and poor input and output validation. Insecure communication, weak privacy controls, missing binary protections, misconfiguration, insecure storage and weak cryptography complete the list.
The table below turns each risk into something a product owner can check. It is a short version, so use the OWASP pages for detail when you brief developers or testers.
| Risk | What it looks like | First control to check |
|---|---|---|
| M1 Improper Credential Usage | API keys or passwords hard-coded in the app | No secrets in the binary; issue short-lived tokens from the server |
| M2 Inadequate Supply Chain Security | A compromised or outdated SDK | Maintain an SDK inventory and scan dependencies on every build |
| M3 Insecure Authentication/Authorization | Hidden screens or APIs that skip login checks | Enforce every permission on the server |
| M4 Insufficient Input/Output Validation | Injection through forms, deep links or WebViews | Validate all input on the server and sanitise output |
| M5 Insecure Communication | Traffic sent without TLS or with certificate errors ignored | TLS everywhere, with no cleartext exceptions |
| M6 Inadequate Privacy Controls | Collecting more personal data than needed | Data minimisation and clear consent |
| M7 Insufficient Binary Protections | App easily decompiled or modified | Obfuscation, integrity checks and attestation |
| M8 Security Misconfiguration | Debug flags, exported components or open backups | Release build review against a checklist |
| M9 Insecure Data Storage | Tokens or personal data in plain files or logs | Keychain or Keystore, encrypted databases, no sensitive logs |
| M10 Insufficient Cryptography | Home-made or outdated algorithms | Platform crypto libraries and current algorithms |
Build Mobile App Development Risk Management In From Day One
Mobile app development risk management means deciding, before code is written, what data the app will handle, who might attack it and what failure would cost. A one-page threat model and a data inventory take a few hours, yet they shape every later decision about storage, logins and vendors. Fixing a design flaw after launch costs far more.
Start by listing every type of data the app collects, where it is stored and who can see it. Then rate each item by the harm a leak would cause. Health details, financial records, identity documents and precise location sit at the top of that list and need the strongest controls.
- Write down the app’s assets: user accounts, payment details, personal information and any business secrets.
- Name the likely attackers, from curious users and fraudsters to automated bots scraping your API.
- Pick a target MASVS level for the app and record it in the project brief or contract.
- Assign an owner for security decisions so issues are not lost between the agency and the client.
- Review the model whenever a major feature, SDK or data type is added.
How Do You Protect Data Stored on the Device?
Store as little as possible on the phone, and keep what you must store inside the platform’s secure storage. On iOS that means the Keychain and file data protection classes; on Android it means the Keystore system for keys. Never place tokens, passwords or personal records in plain preferences files, external storage or logs.
Lost and stolen phones are only part of the risk. Backups, screenshots in the app switcher, crash reports, analytics events and copy-and-paste can all leak data that developers assumed was private. A careful review of each of these paths is one of the cheapest wins available.
- Keep session tokens in the Keychain or in storage protected by a Keystore key, never in plain text.
- Encrypt local databases that hold personal information, using keys managed by the platform.
- Strip personal data from logs, analytics events and crash reports before they leave the device.
- Exclude sensitive files from cloud backups and hide sensitive screens when the app goes to the background.
- Clear cached data on logout, and let users delete their account and data from inside the app.
How Should an App Secure Its Network Traffic?
Every request should travel over TLS, with certificate validation left on and no exceptions for staging servers in the release build. Apple’s App Transport Security and Android’s Network Security Configuration both block cleartext traffic by default on current versions, so the main job is to avoid switching those protections off.
Certificate pinning adds protection against interception but can break the app when certificates rotate, so plan backup pins and a release process before you adopt it. For most business apps, strong TLS settings on the server, HTTP Strict Transport Security for web views and careful handling of tokens deliver most of the benefit.
Which Login and Access Controls Matter Most?
Authenticate users with a proven identity provider, issue short-lived access tokens, and check permissions on the server for every request. Passkeys and platform biometrics improve both security and convenience. On Android, Google recommends the Credential Manager library, which supports passkeys and other sign-in methods through one API.
Native apps that use OAuth 2.0 should follow RFC 8252, the IETF best current practice for native apps, which calls for the system browser and Proof Key for Code Exchange (PKCE) rather than embedded web views. Biometric checks on the device should unlock a key or token, not simply flip a true or false flag that an attacker can patch.
- Offer multi-factor authentication, and require it for administrator and high-value accounts.
- Rate-limit login, password reset and one-time code endpoints to slow down credential stuffing.
- Revoke refresh tokens on logout, password change and suspected compromise.
- Never trust a user ID or role sent from the app; derive it from the verified token on the server.
Why Is the Backend API the Real Target?
Attackers rarely need to break the app itself, because they can call its API directly with their own scripts. Any check that lives only in the app, such as hiding a button for non-paying users, can be bypassed in minutes. Mobile application protection therefore depends on a backend that assumes every request may be hostile.
The most damaging pattern is broken object-level authorisation, where changing an ID in a request returns another customer’s record. OWASP lists it first in its API Security Top 10. Test for it on every endpoint that returns user data, and add automated tests so it cannot creep back in later.
- Check that the signed-in user owns, or may access, every record a request asks for.
- Validate and size-limit all input, including file uploads and deep link parameters.
- Return only the fields the screen needs, not whole database rows.
- Monitor for unusual volumes, such as one account requesting thousands of records an hour.
How Do You Control SDKs, Libraries and Code Tampering?
Keep a list of every SDK and open-source library in the app, what data each one receives and who approved it. Analytics, advertising, chat and payments SDKs often collect more than teams expect. Scan dependencies for known vulnerabilities on every build and remove any SDK nobody can justify.
Protect the build and the binary too. Keep signing keys in a hardware-backed or managed key store, restrict who can publish to the App Store and Google Play, and enable obfuscation such as R8 on Android. For high-risk apps, Google’s Play Integrity API and Apple’s App Attest service let your server check that requests come from a genuine, unmodified copy of your app.
What Do Australian Privacy Rules Expect From Apps?
Organisations covered by the Privacy Act 1988 must take reasonable steps to protect personal information under Australian Privacy Principle 11, and must notify affected people and the OAIC of eligible data breaches. A breach is eligible when it is likely to cause serious harm and the harm cannot be prevented with remedial action.
The Office of the Australian Information Commissioner expects organisations to take all reasonable steps to assess a suspected breach within 30 days. Most businesses with annual turnover above $3 million are covered, along with some smaller ones such as health service providers. Check your position with a privacy lawyer rather than assuming you are exempt.
Mobile apps and security incidents also overlap with the rest of your organisation. Many breaches start with a staff member opening a malicious file, so pair app controls with email defences such as those in our guide to AI tools for identifying phishing in attachments, and with the ASD’s Essential Eight mitigation strategies for the devices and servers your team uses.
How Should You Test, Release and Monitor an App?
Test security at three points: automatically on every build, manually before each major release, and continuously once the app is live. Static analysis and dependency scanning catch common mistakes early. A penetration test against the MASTG test cases shows how a skilled attacker would approach your specific app and API.
After launch, monitoring and patching matter as much as the original build. Watch crash and error reports for signs of tampering, keep a published way for researchers to report bugs, and agree a target time for fixing critical issues. Platform guidance changes each year, so review the Android security best practices and Apple’s platform security documentation at least annually.
- Run static analysis and dependency scans in the build pipeline and block releases on critical findings.
- Commission an independent penetration test before launch and after major changes.
- Keep a data breach response plan that names who decides, who notifies and who speaks publicly.
- Ship security updates promptly, and set a minimum supported app version so old builds can be retired.
Want more practical security guides like this each weekday? Subscribe to the Briefing, our free 7am newsletter for Australian business and tech readers.
What Should You Ask a Developer Before You Commission an App?
If you are paying an agency or freelancer, put security into the contract rather than hoping it is included. Ask how they will secure the app, which standard they test against, who owns the signing keys and cloud accounts, and how quickly they will patch a critical flaw after launch. Clear answers are a good sign.
Security also shapes your business model and features. Apps that take payments or hold financial data carry more risk, so read our guides to mobile app monetization strategies and building a budget app before you lock in a scope.
- Which MASVS controls will you verify, and will you share the test results?
- Where will personal data be stored, and in which country are the servers?
- Which third-party SDKs will the app include, and what data will each receive?
- Who holds the App Store, Google Play, cloud and signing credentials, and how are they protected?
- What is your response time for critical vulnerabilities after launch?
Put These Practices Into Your Next Release
Mobile app security best practices work when they are routine: a threat model at the start, secure storage and TLS by default, server-side authorisation, a controlled SDK list, and testing on every release. You do not need to do everything at once. Start with the risks that touch the most sensitive data and work down.
Share this checklist with your developers, agree on the controls in writing and schedule your first test. For more on protecting your business, explore the CyberSecurity section, and get the Briefing free each weekday by subscribing at the Briefing.
Sources
- OWASP Mobile Top 10 OWASP Foundation, 2024
- OWASP MASVS OWASP Mobile Application Security
- Security best practices Android Developers, Google
- What is a notifiable data breach Office of the Australian Information Commissioner
- RFC 8252: OAuth 2.0 for Native Apps IETF, 2017





