Guides

iOS codebase security review checklist: find release risks

By Evaldas Paulauskas · Last reviewed

When you inherit an iOS app, start by tracing one signed-in journey from the screen to storage and the API. That gives each security question a real input, boundary and consequence. A warning from a scanner is a lead to investigate, not a finding by itself.

Examples and diagrams are created for this guide and do not describe client findings. These checks draw on Apple’s platform guidance and OWASP MASVS. They are a starting point for a scoped source and release-configuration review. They do not replace penetration testing or establish GDPR compliance, and passing a checklist does not prove an app has no vulnerabilities.

Boundary diagram connecting an iOS app, device storage and a backend that checks session permissions.
Trace what the app stores and sends, then identify the server decision behind each sensitive action.

Check authorization at the API boundary

A hidden button or Face ID prompt can control local access, but it does not establish that an account may access a server record. Trace a sensitive request and identify where the backend validates the session and permissions.

  • Use approved dummy accounts to check the intended permission boundaries.
  • Treat record ownership and allowed actions as server decisions, including requests initiated by deep links.

Sources: OWASP MASVS: authentication and authorization

Triage the worst consequences first

After an acquisition or agency handover, check what could expose customer records or grant privileged access. A backend that accepts another account’s record identifier is a more urgent problem than a missing stack canary. Reproduce the unauthorized access before spending time on scanner hardening scores.

Use the table to order the investigation. Assign severity from demonstrated impact, required access and compensating controls. Record confidence in the evidence separately from the urgency of the fix.

Potential severityEvidence to investigateFirst practical response
Critical candidateA shipped credential permits administrative actions across accounts.Confirm its privileges with the service owner, revoke or rotate it, and remove the privileged operation from the app.
High candidateAn approved test account can read or change a second test account’s private record.Preserve a redacted reproduction and correct server authorization before relying on an app update.
High or medium candidateA reusable token reaches release telemetry or an unprotected storage path.Determine who can access it, remove the leak and assess session revocation with the backend owner.
Context dependentA binary scanner reports a missing canary or jailbreak check.Identify the binary, language and threat model before calling it a vulnerability.
  • Record the build, source revision, affected account role and reproduction conditions for every lead.
  • Mark each item confirmed, suspected, not reproduced or untested. Give each confirmed finding an owner and a retest condition.

Sources: OWASP MASVS: resilience controls and threat-specific protection

Define the handover scope before running tools

Write down which app, extensions, environments and flows you can review. For an inherited app, request the repository revision, a distributable build, dependency lockfiles and the release configuration. Establish who owns the backend and which endpoints are approved for testing. Use synthetic data and dedicated accounts.

A source review can identify dangerous client decisions while leaving a server question unresolved. Say that explicitly. If the app cannot build, capture the missing dependency or signing requirement as an access limitation. Do not present an unvisited screen or unavailable API as checked.

  • List the sensitive assets and actions, including account recovery, purchases, exports and administration where relevant.
  • Agree the accounts, devices, environment and permitted testing actions. Include any exclusions in the written scope.
  • Keep third-party services and production testing outside the work unless their owners have approved the specific activity.

See what the iOS codebase review covers and what access to prepare.

Sources: OWASP: selecting MAS testing profiles from a threat model

Trace tokens and choose Keychain access deliberately

Follow an access token and refresh token through sign-in, renewal and sign-out. Look for copies in UserDefaults, files, caches, debug exports and telemetry. A Keychain write does not remove an older plaintext copy. Give any migration a cleanup step and a failure path that preserves a usable account state.

For a credential needed only while the device is unlocked, kSecAttrAccessibleWhenUnlockedThisDeviceOnly is one possible choice. It prevents migration to another device during backup restoration. It does not require a passcode. Consider kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly when the product requires that stronger condition and can handle its restrictions.

A background refresh requirement may justify kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly. That makes the item available while locked after the first unlock following restart. Choose it for a documented background need. A biometric access-control policy is a separate decision that must fit the interaction.

The Swift example creates one generic-password item and reports every failure, including a duplicate. Use a stable service identifier for your app. Add an explicit update path, account separation, reads and deletion to the token store. Do not fix duplicates by deleting the existing credential before you know a replacement can be stored.

Create-only Keychain write for unlocked-device access

import Foundation
import Security

struct KeychainWriteError: Error {
    let status: OSStatus
}

func addRefreshToken(_ token: Data, accountID: String) throws {
    let item: [String: Any] = [
        kSecClass as String: kSecClassGenericPassword,
        kSecAttrService as String: "com.example.app.refresh-token",
        kSecAttrAccount as String: accountID,
        kSecAttrAccessible as String:
            kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
        kSecValueData as String: token
    ]

    let status = SecItemAdd(item as CFDictionary, nil)
    guard status == errSecSuccess else {
        throw KeychainWriteError(status: status)
    }
}
  • Exercise a fresh sign-in, refresh, account switch and sign-out with harmless test accounts.
  • Test locked-device and post-restart behaviour against the intended background workflow.
  • Check that sign-out clears the correct local credentials and that server session expiry or revocation behaves as designed.

Sources: Apple: restrict Keychain item accessibility · Apple: WhenUnlockedThisDeviceOnly behaviour · Apple: adding a password to the Keychain

Inspect release logs and diagnostic exports

A request logger can copy an Authorization header into a crash breadcrumb even when the token store is correct. Check analytics events, support exports, third-party crash reporting and server response logging. Inspect the release configuration because debug behaviour alone does not tell you what customers send.

Run a representative flow with synthetic values you can recognise. Follow those values to each configured destination. Prefer an error category, status or non-sensitive correlation reference when a full payload adds no diagnostic value. Document any telemetry destination that you cannot inspect.

  • Search the source for request dumps and public logging of sensitive values, then verify the configured runtime behaviour.
  • Remove secrets and personal payloads at the logging boundary. Check whether already collected data needs restricted access or deletion under the owner’s retention process.

Sources: OWASP MASWE-0005: sensitive data in logs

Review transport exceptions in the built app

Inspect NSAppTransportSecurity in the archived app’s Info.plist, including domain and web-content exceptions. Trace every exception to its current purpose. A broad allowance may survive long after the original server issue. Check redirects and uploads as well as the initial API URL.

ATS applies to the URL Loading System. It does not cover every lower-level connection. Review custom URLSession trust delegates and other network stacks separately. Accepting every certificate breaks server identity checks even when the URL begins with HTTPS. If pinning is part of the threat model, review rotation and failure handling with the service owner.

  • Correct the server TLS configuration where possible and narrow remaining exceptions to an explained need.
  • Confirm that custom trust code fails closed for an invalid server identity under the agreed test conditions.

Sources: Apple: prevent insecure network connections and understand ATS coverage

Look for privileged secrets in the release bundle

A value can stay out of Git and still ship through generated configuration, resources or build variables. Inspect the distributed artifact and its build inputs. Obfuscating a credential does not make a privileged service safe to expose to every app installation.

Distinguish an identifier intended for public clients from a credential that grants privileged access. Ask the service owner what the value authorizes and which restrictions apply. Avoid putting the full value into a report or ticket. If a privileged credential has shipped, removal from the next build alone leaves earlier copies in circulation.

  • Review bundle resources and generated configuration with redacted evidence.
  • Move privileged operations to an authorized server boundary and coordinate credential rotation with the owner.

Sources: OWASP MASWE-0004: sensitive data hardcoded in the app package

Constrain deep links and WebView bridges

Treat incoming links and page messages as untrusted input. Parse the scheme, host, path and parameters before routing. An allowed destination does not establish permission to export a record, approve a payment or change an account. Preserve server authorization when navigation reaches a sensitive action.

For WKWebView, list the origins it can load and the native functions exposed through script handlers. Inspect redirects and new-window navigation as well as the first page. A bridge designed for trusted content becomes dangerous if unrelated content can reach the same handler.

  • Remove unused script handlers and constrain navigation to intended origins.
  • Validate each message schema and its allowed action. Verify the sender context where the bridge relies on origin or frame restrictions.

Sources: OWASP MASTG: iOS WebViews

Check release protections with the binary and language in view

Review the archive that matches the release, its signing entitlements and bundled frameworks. Compare Keychain access groups and other capabilities with their actual use. Confirm that a development debugging entitlement has not reached the intended distribution build. Record dependency versions and investigate relevant advisories against the code paths the app uses.

Interpret binary scanner output before filing a finding. PIE applies to Mach-O executables, while dynamic libraries have a different binary type. Stack-canary symbol checks depend on the language and generated code. A missing symbol in a pure Swift component is not the same evidence as disabled stack protection in unsafe native code. Review Objective-C and C or C++ dependencies separately.

  • Keep the artifact identity with the report. An Xcode setting in source does not prove the shipped binary uses it.
  • Verify compiler protections appropriate to each component and trace scanner alerts to build settings or generated code.

Sources: Apple: diagnose entitlements in the built app · Apple TN3125: provisioning profiles and iOS entitlements · OWASP MASTG: iOS binary protections and language limitations · OWASP MASVS: code quality and dependencies

Map MASVS coverage and justify resilience controls

Use MASVS to name the security requirements, MASWE to describe weaknesses and MASTG for test guidance. Record the version, selected controls and actual tests. MASVS 2.x removed the old verification levels from the standard itself. Current MAS testing profiles include MAS-L1, MAS-L2, MAS-R and MAS-P. Select a profile or custom scope from the app’s threat model instead of calling every checklist an L2 audit.

Jailbreak detection, anti-debugging, obfuscation and tamper detection add resistance to specific client attacks. Their absence alone does not establish a vulnerability. For a high-value offline entitlement or fraud-sensitive workflow, they may deserve targeted assessment. Explain the protected asset, attacker capability and expected response.

Client checks can be bypassed on a device an attacker controls. Keep server authorization and credential handling independent of their result. If resilience work is in scope, assess bypass behaviour and operational consequences rather than counting checks. An automatic block can also affect legitimate users and testing.

  • Mark each selected control tested, partially tested, not applicable or untested, with the supporting reason.
  • State whether runtime instrumentation and resilience bypass testing were included. Source inspection alone cannot demonstrate resistance to those techniques.

Sources: OWASP: MASVS 2.0 removed verification levels from the controls · OWASP: current MAS testing profiles · OWASP MASVS: resilience is threat-specific defense in depth

Ask for evidence, fix priorities and explicit exclusions

The deliverable should help the next engineer make a change. Each finding needs an affected flow, source or artifact reference, redacted evidence, impact, confidence and the smallest practical remediation. Separate severity from delivery priority. A lower-severity fix may still be quick to ship, while a critical server change needs immediate ownership.

Include an executive risk summary, scope and access record, selected MASVS mapping, tested and untested areas, a prioritised action list and clear retest conditions. Label unresolved backend questions as unresolved. Agree separately whether implementation, a follow-up build review or retesting belongs in the engagement.

A scoped codebase review does not silently include a penetration test, a full backend or cloud assessment, production attack simulation, or legal compliance work. It also cannot predict App Review’s decision. If an inherited app has a submission problem, keep the review message and submission evidence with a separate release checklist.

  • Ask for reproducible evidence and a fix owner rather than an unexplained scanner export.
  • Keep secrets and customer data out of the deliverable. Describe the access needed to reproduce a finding safely.
  • Agree the delivery date after scope and access are clear, including any unavailable build or backend dependency.

Use the App Store rejection checklist when the immediate problem is a submission or review message.

See the App Store rejection review for help with a blocked release.

Sources: OWASP MASVS: assessment and certification boundaries

Frequently asked questions

What is MASVS?

The OWASP Mobile Application Security Verification Standard is a set of security requirements for mobile apps. Use it to define review coverage, then use MASTG for test guidance. MASVS 2.x removed the old verification levels from the controls; current MAS testing profiles help select coverage for the threat model.

How much does an iOS security review cost?

$1,250 for the standard iOS codebase review, including scoped security checks alongside maintainability findings. The reviewed flows, available access and exclusions are agreed before work starts. A specialist penetration test or full backend assessment requires a separate scope.

Is this security checklist the same as a penetration test?

No. This checklist guides a source and release-configuration review. A penetration test includes agreed attempts to exploit weaknesses in a running target, with defined authorization, methods and evidence. A source finding can justify a fix without proving every runtime attack path.

Does a MASVS mapping mean the app is certified?

No. A mapping records which requirements informed the work and what evidence supports each result. It is not an OWASP certification or a guarantee. MASVS 2.x controls and current MAS testing profiles must be distinguished from the older L1 and L2 labels used inside previous versions of the standard.

Can you review an iOS app without backend access?

Yes, within an agreed client scope. Source and release artifacts can reveal token storage, logging, transport configuration, shipped credentials and unsafe input handling. Server authorization and other backend behaviour remain unverified unless the required environment and approved accounts are available.

How long does an iOS app security review take?

There is no fixed duration for this review. The delivery date depends on repository size, extensions, sensitive workflows, build availability and backend access. Agree the reviewed flows and exclusions before work starts. Scope implementation and retesting separately.

Is jailbreak detection required for every iOS app?

No. Choose jailbreak detection and other resilience controls from the app’s threat model. High-value client logic may justify detection and tamper resistance. These controls can be bypassed and cannot replace backend authorization.

Decide the next step

For an inherited or acquired iOS app, start with the flows that protect customer records and privileged actions. Request a scoped written review at $1,250 to turn the evidence, access limitations and practical fixes into an action list. Scope and delivery are agreed after the repository, build and access are understood.

Request an iOS codebase review