Skip to content

Australia’s journal of technology & business

Mobile App Security Best Practices: Preventing Data Breaches in Your Apps

A practical security checklist for teams building or commissioning a mobile app, mapped to the OWASP Mobile Top 10 and Australian privacy law.

Developer reviewing code on a laptop beside a smartphone showing a padlock icon

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.

Get the Briefing, free →

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.

OWASP Mobile Top 10 (2024) and the first control to check
RiskWhat it looks likeFirst control to check
M1 Improper Credential UsageAPI keys or passwords hard-coded in the appNo secrets in the binary; issue short-lived tokens from the server
M2 Inadequate Supply Chain SecurityA compromised or outdated SDKMaintain an SDK inventory and scan dependencies on every build
M3 Insecure Authentication/AuthorizationHidden screens or APIs that skip login checksEnforce every permission on the server
M4 Insufficient Input/Output ValidationInjection through forms, deep links or WebViewsValidate all input on the server and sanitise output
M5 Insecure CommunicationTraffic sent without TLS or with certificate errors ignoredTLS everywhere, with no cleartext exceptions
M6 Inadequate Privacy ControlsCollecting more personal data than neededData minimisation and clear consent
M7 Insufficient Binary ProtectionsApp easily decompiled or modifiedObfuscation, integrity checks and attestation
M8 Security MisconfigurationDebug flags, exported components or open backupsRelease build review against a checklist
M9 Insecure Data StorageTokens or personal data in plain files or logsKeychain or Keystore, encrypted databases, no sensitive logs
M10 Insufficient CryptographyHome-made or outdated algorithmsPlatform 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

  1. OWASP Mobile Top 10 OWASP Foundation, 2024
  2. OWASP MASVS OWASP Mobile Application Security
  3. Security best practices Android Developers, Google
  4. What is a notifiable data breach Office of the Australian Information Commissioner
  5. RFC 8252: OAuth 2.0 for Native Apps IETF, 2017
Share this article
Muhammad Muzammil Qureshi, co-founder and Editor-in-Chief of TechTimes.com.au

About Muhammad Muzammil Qureshi

Muhammad Muzammil Qureshi is the co-founder and Editor-in-Chief of TechTimes.com.au. He has spent 17 years building software for businesses, from lead developer to chief technology officer. He writes about AI, SaaS, cloud and the technology decisions business owners face.

More from Muhammad Muzammil Qureshi →

Questions and answers

Frequently asked questions

Straight answers to the questions readers ask most about this topic.

Want more like this?

Get five stories that matter to Australian business and tech in your inbox every weekday morning.

How to secure mobile apps on a small budget?
Focus on the controls that cost little but prevent the most harm. Keep secrets off the device, use the iOS Keychain and Android Keystore, force TLS, check permissions on the server and scan dependencies with free tools. Then spend your budget on one independent penetration test before launch, aimed at the API and login flows.
What is the OWASP MASVS?
The Mobile Application Security Verification Standard is a free OWASP standard that defines security controls for iOS and Android apps. It groups them into storage, cryptography, authentication and authorisation, network, platform, code, resilience and privacy. Teams use it to set requirements, while testers use the companion MASTG guide to check each control in a repeatable way.
Is certificate pinning still recommended?
Certificate pinning can stop attackers from intercepting traffic with a fraudulent certificate, but it can also break your app when certificates change. It suits high-risk apps such as banking. If you use it, pin to a public key, include backup pins and plan how you will update the app before a certificate expires.
Do I need to report a data breach from my app?
If your organisation is covered by the Privacy Act 1988 and the breach is likely to cause serious harm, you must notify the affected people and the OAIC. You should take all reasonable steps to assess a suspected breach within 30 days. Get legal advice early, because the rules depend on your circumstances.
How often should a mobile app have a penetration test?
Test before the first public release, after any major change to login, payments or data handling, and at least once a year for apps that hold sensitive information. Automated scans should run on every build in between. Retest after fixes so you know each finding has actually been closed rather than only marked as done.
Are cross-platform apps less secure than native apps?
Not inherently. Frameworks such as Flutter and React Native can reach the same platform storage, cryptography and network protections as native code through plugins. The risks come from poorly maintained plugins, secrets embedded in JavaScript bundles and debug settings left on. Review every plugin the way you would review any other third-party SDK.
What does security for mobile applications cost?
Costs vary with the app’s risk and size, so there is no reliable standard price. Building good habits into normal development adds modest effort, while independent penetration tests and ongoing monitoring are separate expenses. Ask several qualified testers for written quotes based on your scope, and weigh them against the cost of a breach.
Should an app work on jailbroken or rooted phones?
For most apps, detecting a jailbroken or rooted phone is useful as a warning signal rather than a hard block, because checks can be bypassed and blocking may frustrate legitimate users. High-risk apps, such as banking or health apps, often limit sensitive features on these devices. Pair any detection with server-side checks and attestation.
Where can I read more cybersecurity guides on TechTimes?
TechTimes publishes practical security coverage in its CyberSecurity section, alongside Artificial Intelligence, Software & SaaS, Cloud Computing, IoT, Robotics & Automation, and Startups & Business. Every article has a named author, facts are checked against primary sources, and any corrections are noted at the end of the article so you can see what changed.
How can I get TechTimes security stories by email?
Subscribe to the Briefing, the free TechTimes newsletter. It sends five stories that matter to Australian business and tech every weekday at 7am AEST, including security news and guides. If you are a security expert with an original, unpublished article idea, you can also pitch it through the Write For Us page.