Five places to check for data exposure
-
On the phone
Trace private data into offline storage, logs and backups. Check what stays behind after sign-out.
-
At the server
Use two test accounts to verify each can see only its own private data. Include downloads and exports.
-
After account recovery
From a second device, confirm a revoked session loses access and can’t renew.
- The downloadable app
- Keep keys that can spend money or read private data on the server. Check the build you plan to distribute.
- Libraries added during development
- Review new and changed packages, including those added by an AI coding tool. Keep a record of what ships.
Scope. These are engineering checks for iOS, Android, and the services behind them. For offline apps, start with device storage, backups, and the release build. See the mobile legal guide for privacy and breach-notice requirements.
What to check before release
Start with three checks. Look for privileged keys in the final app. Confirm one test account cannot access another’s private data. Inspect what leaves the app in logs, notifications, and third-party requests.
- Keys and the release build
- Check what ships. Scan source history, build logs, and the signed iOS and Android releases for privileged keys. Check what any client-visible key can actually do.
- Contain exposed keys. Revoke or rotate them at the provider and check for unexpected access or charges. Key checklist and leak response.
- Verify dependencies. Check what you install, record the versions you ship, and know how to contain a bad release. Dependency checks.
- Accounts and private records
- Enforce access on the server. Use a managed sign-in service or a maintained library. Require permission for the exact record, file, or action on every request.
- Use two test accounts. Confirm they stay separate on searches, downloads, exports, and shared devices. Check what happens after sign-out or removal from a team. Account and backend checks.
- Account recovery and official support
- Test a lost phone. Verify users can recover safely and that changing a recovery phone or email requires fresh verification. Confirm the old session loses access when revoked.
- Make support easy to verify. Let people check unexpected alerts and report scams from inside the app. Make official help reachable while signed out. Support should never ask for passwords or one-time codes. Account takeover and scam checks.
- User data from collection to deletion
- Follow one real flow with sample data. Check the phone, cloud database, logs, crash reports, support tools, and any AI provider. Verify what gets backed up and what gets deleted.
- Protect what the phone keeps. Store credentials in iOS Keychain or storage protected by Android Keystore. Keep private content out of lock-screen messages and routine diagnostics. Storage and privacy checks.
- Connections, links, and device permissions
- Use HTTPS with certificate validation. Check the release build for test-only exceptions. Ask for device permissions when the feature needs them.
- Verify where links lead. Private screens and downloads still need an access check when opened from a link or built-in browser. Network and device checks.
- Bots, costly requests, and purchases
- Set backend limits. Bound sign-in attempts, uploads, exports, and paid API or AI calls. Alert when traffic, denied requests, or spending changes sharply.
- Verify paid access with the store or provider. Test refunds, expiry, and duplicate notifications. Abuse and purchase checks.
- AI features and coding agents
- Inside the app. Restrict what an AI feature can read and do. Check permission outside the model and require confirmation for sensitive actions.
- While building. Run coding agents with test data and limited access. Review changes to permissions, dependencies, and release automation before merging. AI feature checks · Coding agent checks.
- Release and recovery
- Protect publishing access. Use strong multi-factor authentication for staff. Limit who can sign, deploy, or change production settings.
- Rehearse containment. Know who can revoke keys, stop an expensive feature, restore a backup, and alert users. Release and recovery checks.
Engineering references checked November 21, 2026. Start with OWASP’s mobile security standard for the app and the OWASP API Security Top 10 for services.
How to verify each check
Separate public app identifiers from secretsInspect what a key can do, where it lives, and how to revoke it.
Treat values packed into a downloadable app as readable. A build-time environment variable can end up in the release binary or bundled JavaScript. Hiding a value in the app or moving it into remote configuration still gives the app access to it.
| What the app uses | Where it belongs |
|---|---|
| Public client identifier or provider-approved public key | Include it only where the provider documents client use. Restrict it to the intended service or app where supported. Enforce access to data separately. |
| User session credential | Give it the scope and lifetime that user needs. Store it with platform protections, and make it possible to revoke. |
| Privileged provider key, database admin credential, signing key, or store server key | Keep it in the backend or release system’s protected credential store with tightly scoped access. For paid provider calls, use app → authenticated backend → provider. The backend checks the user and the request before paying for it. |
A Firebase-only API key can identify a project in a mobile app. Database and file access still depend on Security Rules and other configured controls. Inspect the key’s allowed APIs. Use a separate server-side credential for Gemini and other privileged services. Firebase key guidance · Gemini key guidance · Android API guidance.
- Limit what a server credential can do. Use separate credentials for test and production. Give each service only the permissions it needs. Prefer short-lived service credentials when the host and provider support them. Keep long-lived keys in a managed secrets store and restrict who can read or rotate them.
- Before shipping. Scan Git history, the artifacts users actually install, CI logs and build artifacts, and places people might paste credentials, including support or AI chat. Use secret scanning and push protection where available. Verify a finding against the provider’s credential type and configuration. Record the owner, permitted use, and rotation path without recording the secret. GitHub secret scanning.
- If a privileged key leaked. Revoke it at the provider promptly. If continuity requires a replacement, issue a restricted key, switch dependent services, then verify the exposed key is disabled. Check provider access logs, usage, and billing for abuse and preserve incident evidence. Revoke downstream sessions or credentials if they were exposed too. Clean up source, artifacts, and any places the value was pasted after containing access. People who already downloaded the app may still have the old value. GitHub leaked-secret response.
- Set limits your backend can enforce. Cap expensive requests per account and across the service. Check request sizes, timeouts, and bounded retries. Test the response at the limit, including costs from repeated requests. Mandiant reported unauthorized model use causing large charges after credentials were compromised in 2026. Mandiant’s November 2 incident analysis · Mobile AI costs guide.
Verify packages, native SDKs, and build toolsKnow who supplied each dependency, what it can reach, and which app versions use it.
A package can be risky even when the name and publisher are familiar. Two malicious releases of the legitimate Microsoft Agent Framework package appeared in November 2026. Code that runs during installation or a build can reach developer or build credentials before an app is ever published. November 18 GitHub advisory · Mandiant’s build-pipeline guidance.
- Verify the source before installing. Compare the exact package name, publisher, and registry with the maintainer’s official instructions. Review packages, build plugins, and tool connectors suggested by an AI agent before allowing installation or execution. Coding models can suggest a plausible package name that never existed. USENIX study of package suggestions.
- Separate building from signing and publishing. Review changes to installed versions, including libraries pulled in by other libraries and scripts that run during installation. Use locked versions where supported. Install and test in an isolated environment with sample data and no production credentials or signing keys. Give only the release step the credentials it needs, and require a separate approval for publishing. Mandiant’s build-pipeline guidance.
- Record the actual release. Keep an inventory of resolved package and SDK versions against each signed build, including native SDKs bundled by cross-platform plugins. Verify that you can match a dependency advisory to affected app versions. Check any new permissions and data transfers, review applicable Apple privacy manifests and SDK signatures, and check Google Play’s SDK warnings where available. Apple SDK guidance · Google Play SDK Index.
- Rehearse a bad release. Pause affected builds and isolate any developer machine or build environment where the package ran. Check which credentials and sessions it could reach, revoke affected access, and preserve evidence. Rebuild from reviewed versions in a clean environment and identify any app versions people already installed. If the feature uses a backend, test whether you can pause the affected operation while users update. Mandiant’s containment guidance.
Protect the data the phone keeps and sharesCheck device storage, backups, permissions, network behavior, and what appears outside the app.
Follow a sample record to every copy
- Map the copy and its owner. Use a fake sensitive record with distinctive sample values. Follow it through local files, sync, caches, analytics, crash reports, support tickets, and vendors. Record what is sent, why it is needed, who can read it, when it expires, and who can remove it. Inspect what your app and its SDKs send before it reaches a dashboard. Remove sensitive fields at the source and compare actual collection with your store disclosures. OWASP logging guidance · Mobile store submission.
- Choose device storage and backup deliberately. Keep private records in app-private storage with appropriate file protection. Use iOS Keychain for credentials and Android Keystore to protect cryptographic keys used to secure local data. Check backup and device migration behavior on both platforms. Test sign-out, account switching, and restoring onto a second device. Make sure the next user on a shared phone cannot see the previous user’s cached files. Apple Keychain protection · Android Keystore · Android backup rules.
- Check the quiet copies. Look at lock-screen previews, notification payloads, temporary files, share exports, clipboard use, and app-switcher snapshots. Use a generic message such as “You have a new result” for private notifications, then load the result after an access check. Apple notification payload guidance.
- Test deletion and recovery together. Verify which data disappears immediately from active storage and which backup copies expire later. Apply deletion and access changes again after a restore so cached or older copies cannot silently bring deleted records back. Include provider copies where your app sends data externally. Mobile legal and privacy reference.
Limit device access and check network behavior
- Ask when needed. Use system photo or file pickers when users only need to choose one item. Test denial and revocation. Review background permissions and the permissions contributed by included SDKs.
- Open links safely. Use verified Universal Links or Android App Links where appropriate. Validate the destination and parameters, and check the signed-in user’s rights before opening private content. Limit domains and native privileges in embedded browsers. Apple associated domains · Android App Links · Android WebView security.
- Verify the production build. Use HTTPS and the OS’s certificate checks. Remove debug certificates, cleartext exceptions, and testing endpoints from the release. Consider certificate pinning when the risk justifies it and you can maintain spare pins and a recovery path. Apple transport security · Android network security configuration.
Prove that users, devices, and services have only the access they needExercise real permissions with sample accounts, including signed-out and removed users.
Keep accounts and private records separate
- Use proven sign-in and recovery. Use a maintained identity provider or library. For native OAuth use the external browser or platform authentication session and Authorization Code with PKCE, which lets the app prove it started the sign-in request when it exchanges the code. Treat the app as a public OAuth client. Use short-lived access credentials as appropriate, revoke refresh sessions after compromise, and test when existing access actually ends. Require fresh verification for sensitive account changes. RFC 8252 · OAuth Security BCP.
- Check every route to the same data. Scope reads and changes by signed-in identity, account or organization, role, and the specific record. Cover files, search, notifications, exports, and staff access as well as the main API. Keep file storage private. Issue short-lived download links only after authorization, and account for links that remain valid until expiry. OWASP API Security.
- Verify managed-backend rules. Start with private data and grant only the actions each role needs. Test the real rules in an emulator or test project, including a signed-out user and two users in different organizations. In Firestore, client Security Rules and the server’s IAM permissions are separate checks. Test both paths if you use them. Firebase security checklist · Firestore rules testing.
- Collect evidence before launch. Record which signed build and backend configuration you tested. Confirm allowed actions work, denied actions return no private data, user removal takes effect, and legitimate users can recover. Repeat after changing access rules or adding a second route to the same data.
Control abuse and paid actions
- Set limits before expensive work. Validate input types and sizes on the server, use parameterized database queries, and isolate uploaded files until the app can handle them safely. Limit bulk requests, exports, and model calls by user and across the service. Maintain an inventory of old API versions and close staging or debug routes that should be private. OWASP file upload guidance · OWASP API Security.
- Verify purchases at the provider. Check store-signed transactions or verify purchase tokens through the store’s server API before granting access. Verify payment notifications and update access safely if notifications arrive twice, late, or out of order. Exercise pending, refunded, expired, and restored purchases. Apple App Store Server Notifications · Google Play billing security.
- Consider app integrity for fraud-prone features. Apple App Attest and Google Play Integrity let the backend use app and device signals alongside user sign-in and authorization. Measure legitimate traffic before enforcing a new policy, and decide what happens on unsupported devices or if the service is temporarily unavailable. Apple App Attest · Play Integrity.
Protect users from account takeovers and scamsTest account recovery, support messages, connected-app access, and verification texts.
- Test recovery as carefully as sign-in. Offer passkeys where supported. Require fresh verification with an existing method before replacing a recovery phone or email. Notify the user through a previously verified channel. Test a lost phone and an unavailable phone number with a supported fallback, such as a saved recovery code. If an account may be compromised, test that revoking its sessions stops both access and token renewal. NIST account recovery guidance · Canadian Anti-Fraud Centre on account takeover.
- Give people a reliable way to verify support. Link to official help from the app and its store listing so users can find it while locked out. Show important account alerts in the app so users can check them without following a link in an unexpected text or email. State in help and verification messages that staff will never ask for passwords or one-time codes. Let users report suspicious contact. Spoofed numbers, fake alerts, and AI-cloned voices can make impostors sound familiar. Google’s October 2026 mobile scam report · Canadian Anti-Fraud Centre on verification codes.
- Make connected-app access visible and revocable. If users connect a calendar, inbox, or cloud drive, ask for only the permissions the feature needs and show what each connection can access. When the user disconnects, revoke the grant where the provider supports it, remove stored tokens, and stop background sync. Test that the next scheduled sync cannot read new data. A fraudulent grant can survive a password change. FBI consent-phishing advisory · OAuth token revocation.
- Limit how often the app sends verification texts. Apply resend cooldowns and limits per destination and across the service before requesting a text. Turn on your provider’s fraud controls where supported. Watch for spikes in sends or cost without a matching increase in successful verifications. Test what a legitimate user sees at the limit and how they can recover. Fraudulent sends can generate charges before anyone signs in. Twilio verification fraud protection.
Limit what AI inside the app can see and doSeparate text generation, access to private content, and permission to take an action.
- Send only what the task needs. Map prompts, uploaded files, chats, stored search indexes, and logs. Check the provider and plan’s actual retention, training, access, and deletion settings. Remove identifiers or keep processing on-device when the feature can work with less data. Include stored AI copies when users delete content.
- Check permissions before the model sees data. If the feature searches documents or chat history, filter results by the current user’s access on the server before sending anything to the model. Check the same boundary for shared caches and saved conversations. Test that one sample account’s private text never enters a second account’s model context.
- Keep decisions about authority outside the model. Text from a user, file, webpage, or model can contain directions to take an unintended action. This is commonly called prompt injection. Let a small set of backend tools enforce the user’s permissions, validate each action and destination, and ask for explicit confirmation before sending, sharing, buying, or deleting. Test with sample content containing an unexpected instruction and verify that it cannot trigger an unauthorized action. OWASP prompt injection · OWASP on excessive tool permissions.
- Bound the feature. Set request, time, and spend limits. Treat generated links and outputs as untrusted when rendering them or passing them to another service. Log action type, outcome, and approval without recording private prompt text by default. Give the owner a way to suspend AI actions if costs or unauthorized attempts spike.
Keep coding agents away from production credentials and user dataA coding agent can inherit access to anything its tools can reach.
Google Threat Intelligence reported on November 16 that attackers are using agents to accelerate parts of real intrusions. Its investigation also described cases where altered coding-assistant configurations were used to spread a compromise. For a small team, focus on how quickly you can patch exposed services, contain stolen keys, and review changes before they can reach a release. Google Threat Intelligence, November 16, 2026.
- Separate the workspace. Give the agent the repo, commands, and network destinations it needs. Work in an isolated environment using synthetic data and staging credentials. Keep production secrets, real customer records, and publishing credentials outside that environment. Use read-only access as the starting point for reviews.
- Review what can run. Treat unfamiliar dependencies, repository instructions, hooks, and tool connectors as code that can affect your machine. Review changes before enabling them, including changes introduced by an agent. Require separate approval for credential access, role changes, production actions, signing, or publishing.
- Verify high-risk edits against evidence. Check generated changes to login, database permissions, storage policies, dependency lockfiles, and CI workflows. Run tests that cover rejected requests and account separation. Keep an independent review before merge for changes that affect access, credentials, or releases. GitHub guidance for coding agents · NIST Secure Software Development Framework.
Protect the release and rehearse incident responseMake it possible to contain a problem while installed versions are still in use.
- Lock down release access. Restrict store consoles, CI, signing, and production to named roles. Prefer phishing-resistant MFA, such as passkeys or security keys, where supported. Verify an urgent request for access through a known channel. Require approval before privileged release jobs run. Inventory SDKs and build dependencies and review changes to their versions, permissions, and data collection. Track which versions have shipped and patch exposed backend services promptly. CISA phishing-resistant MFA guidance · NIST SSDF · GitHub Actions secure use.
- Watch signals that someone will act on. Alert on unexpected sign-in failures, large exports, privileged changes, secret alerts, or sudden usage and cost spikes. Send a test alert to the actual responder. Give alerts enough context to investigate while keeping secrets and private content out of the event. Mobile monitoring guide.
- Rehearse containment and restoration. Assign someone to disable affected access, rotate credentials, preserve logs, and confirm service recovery. Know how to pause a risky backend operation while older apps are still installed. Restore an encrypted backup in isolation and verify it can be read and still respects deletion and access rules. For offline apps, test local upgrades and exports on real devices. Keep a monitored channel for reports, and check which notices apply if user data was affected. CISA recovery guidance · Mobile legal and privacy reference.
Add controls for the app’s highest-risk featuresUse the rows that match the data and actions your app handles.
| If the app has… | Add these controls |
|---|---|
| Offline journals, photos, or documents | Isolate sensitive files. Test locked-screen behavior, exports, upgrades, erase, and restore with sample data. |
| Messaging, community, dating, or games | Enforce blocking and private channel membership on the service. Limit repeated invitations and restrict who can read abuse reports. |
| Workspaces, school tools, or teams | Scope files, searches, exports, and notifications to the organization. Test offboarding and log privileged changes. |
| Health, finance, or sensitive location | Minimize retention and limit access by role and purpose. Keep sensitive records out of general analytics. Require stronger confirmation for high-impact changes. |
| Commerce, paid downloads, or game rewards | Verify paid status on the server. Test retries, pending payments, refunds, and expiry. Confirm repeat events cannot grant a reward twice. |
| AI or other third-party processing | Verify vendor retention and access, isolate user data, and limit which actions the integration can take. AI feature checks. |
| Smart devices or home access | Give devices their own identities, authenticate setup and updates, and revoke old access when a device changes owners. |