DEV Community

Cover image for Mobile App Security Beyond HTTPS: What Developers Should Actually Test
株式会社SOTATEK JAPAN
株式会社SOTATEK JAPAN

Posted on

Mobile App Security Beyond HTTPS: What Developers Should Actually Test

A mobile app can use HTTPS, store tokens in a platform-provided secure storage mechanism, and pass functional tests while still exposing sensitive data.

That is because mobile application security is not a single feature. It is a collection of controls spanning the device, operating system, application code, network, and backend services.

For teams building Android and iOS applications, security testing needs to reflect those boundaries.

Here are the areas worth checking before shipping a production release.

1. Secure storage is more than choosing the right API

Sensitive information may exist in several places on a mobile device.

Authentication tokens, user preferences, cached responses, temporary files, and debugging logs can all contain information that should not be exposed.

On iOS, Keychain provides mechanisms for protecting sensitive items. On Android, Keystore helps protect cryptographic keys.

However, simply using these APIs does not automatically make an application secure.

Developers still need to consider:

  • Whether sensitive data needs to be stored at all
  • Which components can access it
  • Whether information is copied into less secure storage
  • How data is handled during logout
  • Whether logs, backups, or temporary files expose information

For example, an application may correctly store a token in a secure mechanism but accidentally write the same token to a debug log.

The storage API is not the problem. The surrounding data-handling logic is.

A useful security review follows the entire lifecycle of sensitive information: creation, storage, use, transmission, expiration, and deletion.

2. HTTPS does not replace certificate validation

Transport security is essential for mobile applications, but HTTPS alone is not a complete security assessment.

A mobile client must correctly validate the server certificate and avoid unsafe configurations that bypass verification.

During development, teams sometimes introduce debugging settings to make testing easier.

Those settings should not accidentally reach production.

For Android applications, the network security configuration deserves particular attention.

For iOS applications, App Transport Security settings and any exceptions should be reviewed.

Certificate pinning may provide additional protection in some threat models, but it introduces operational complexity and should not be treated as a universal requirement.

The important question is whether the application establishes trusted connections under the intended production configuration.

3. Authorization belongs on the backend

One of the most important mobile security principles is that the client cannot be trusted to enforce business permissions.

Consider an application that allows users to view their own orders.

The client requests:

GET /api/orders/12345
Authorization: Bearer <access-token>
Enter fullscreen mode Exit fullscreen mode

The server should not return an order simply because the request includes a valid access token.

It must also verify that the authenticated principal is authorized to access the requested order.

A conceptual server-side check might look like this:

def get_order(order_id, principal):
    order = database.find_order(order_id)

    if order is None:
        return not_found()

    if not authorization.can_read(principal, order):
        return not_found()

    return serialize_order(order)
Enter fullscreen mode Exit fullscreen mode

The exact response strategy depends on the application, but the authorization decision must be enforced on the server.

Disabling a button or hiding a screen in the mobile UI is not an adequate replacement.

This is especially important because mobile applications frequently share APIs with web clients or other integrations.

4. Review platform-specific attack surfaces

Android and iOS have different application models, so security testing should account for both.

Android

Relevant areas include:

  • Exported Activities, Services, and Broadcast Receivers
  • Content Providers and data exposure
  • Intent handling and deep links
  • WebView configuration
  • Network Security Configuration
  • Runtime permissions and local storage

For example, an Android component that is unnecessarily exported may expose functionality to other applications.

The security review should verify whether external access is required and whether appropriate permission checks exist.

iOS

Relevant areas include:

  • Keychain accessibility configuration
  • App Transport Security exceptions
  • URL schemes and Universal Links
  • App extensions and data sharing
  • Sensitive data exposure through logs or local files
  • Authentication state and session handling

A shared codebase does not eliminate these differences.

Flutter and React Native applications still rely on platform-specific configurations and native integrations.

5. Third-party SDKs are part of your attack surface

Mobile applications often include SDKs for analytics, payments, authentication, advertising, and notifications.

These dependencies can introduce security and privacy risks.

A dependency review should answer several questions.

Is the SDK maintained? Does the version contain known vulnerabilities? What permissions does it require? What information does it collect or transmit?

Dependency scanning is helpful, but it should be combined with an understanding of how each SDK is used.

A library without a known vulnerability may still create privacy problems if it is configured to collect more data than necessary.

6. Combine static and dynamic testing

Static analysis can identify suspicious code patterns, embedded secrets, insecure configurations, and problematic dependencies.

Dynamic testing examines the application while it is running.

For example, dynamic testing may help verify network behavior, authentication flows, data persistence, and interactions with backend APIs.

Neither approach provides complete coverage on its own.

A practical testing strategy can include:

Technique Main purpose
Static analysis Identify code and configuration risks
Dependency scanning Detect known issues in external components
Dynamic analysis Observe runtime security behavior
API authorization testing Verify server-side access controls
Manual review Examine business logic and platform-specific risks
Regression testing Confirm fixes remain effective

All active security testing should be performed against systems and environments where the team has authorization.

7. Use OWASP MASVS and MASTG to structure testing

OWASP provides two particularly useful resources for mobile application security.

The Mobile Application Security Verification Standard (MASVS) organizes security requirements into areas such as storage, cryptography, authentication, network communication, platform interaction, code quality, resilience, and privacy.

The Mobile Application Security Testing Guide (MASTG) provides technical guidance and testing approaches.

Together, they help teams move from a vague objective like "make the app secure" toward a more structured assessment.

A practical process is to map the application's features and data flows to relevant requirements, select appropriate tests, record findings, and verify remediation.

8. Make security testing part of the release workflow

Security testing is most effective when it is not treated as a last-minute activity.

A mobile release workflow might look like this:

Code Change
    |
    v
Unit & Integration Tests
    |
    v
Static Analysis
    |
    v
Dependency Review
    |
    v
Test Build
    |
    v
Mobile & API Security Testing
    |
    v
Remediation and Retesting
    |
    v
Release
Enter fullscreen mode Exit fullscreen mode

The appropriate depth of testing depends on the application's risk profile.

A simple informational application may require a different assessment scope from an application processing financial transactions or medical information.

Major authentication changes, new payment integrations, and significant SDK updates are useful triggers for additional security reviews.

Further reading

For a broader overview of mobile application vulnerability assessments, including Android and iOS differences, assessment costs, testing methods, and OWASP guidance, SotaTek Japan has published a detailed Japanese-language guide:

Mobile Application Vulnerability Assessment: Scope, Costs, and Methods — SotaTek Japan

It provides a useful starting point for teams defining the scope of a mobile security assessment.

Final thoughts

Mobile application security is not achieved by enabling HTTPS or selecting a secure storage API.

It requires consistent security controls across the device, application, operating system, and backend.

Developers should pay particular attention to sensitive data handling, certificate validation, authorization, platform-specific configuration, and third-party dependencies.

The goal is not simply to pass a security scan.

It is to identify meaningful risks, fix them, and verify that the application remains secure as it evolves.

Top comments (0)