Security

    Does Apple check for hardcoded AWS S3 credentials?

    An iOS developer reviewing strings extracted from a compiled IPA, hunting for hardcoded AWS access keys and S3 bucket URLs before submitting the build to App Store Connect

    For the iOS developer staring at an AWS access key still in their Xcode project at 11pm before submission, the worry is whether App Review will catch it before customers do. The honest answer matches what independent researchers keep finding inside compiled IPAs already on the store.

    Short answer

    No. Apple's App Review process does not run a static analysis pass that flags hardcoded AWS access keys, secret access keys, or S3 bucket credentials inside iOS binaries. According to Symantec's threat intelligence on cloud credentials in mobile apps, 1,859 mobile apps were found shipping with hardcoded AWS credentials, the vast majority of them iOS, with 77% carrying valid tokens. The checks App Review actually performs target policy and runtime behavior, not credential hygiene.

    What you should know

    • Apple's review focuses on policy and behavior. Per the App Store Review Guidelines, checks center on user-facing safety, performance, business model, and design, not on secrets management inside the bundle.
    • Live AWS keys regularly pass review. Symantec named Crumbl (3.9 million ratings, ranked No. 5 in Food and Drink), Eureka, and Videoshop as iOS apps shipping with plain-text AWS credentials.
    • Most leaks ride in on SDKs. More than half of the leaked tokens Symantec traced reused the same value across multiple apps, pointing to shared SDKs and starter kits rather than original developer code.
    • The IPA is just a zip file. Anyone with the binary can run strings, class-dump, or Hopper and read every embedded value in minutes.
    • OWASP MASVS owns this gap. MASVS-STORAGE-1 puts the responsibility for keeping credentials out of the bundle on the developer, not on the store.

    Does Apple's automated review actually scan binaries for AWS keys?

    No, not in any documented way. Apple's automated layer in App Store Connect runs static checks for things like UIRequiredDeviceCapabilities, deprecated APIs, App Transport Security misconfiguration, and the SDKs listed in Apple's required reason API list. None of those checks publish an AWS access key detected failure mode, and there is no developer-facing rejection code that names hardcoded cloud credentials.

    The deeper signal is the data. Cybernews crawled the App Store and reported 156,000 iOS apps exposing more than 815,000 hardcoded secrets, with 71% of analyzed apps leaking at least one. If Apple's pipeline searched binaries for the AKIA prefix used by AWS access keys, those numbers would not survive a sustained review process. They survive because review does not look there.

    This sits in a directional certainty lane: well measured by independent vendors, not officially confirmed by Apple. Apple does not document a list of binary string patterns it scans for. Researchers infer the absence from outcomes, year after year, and the outcomes stay consistent.

    What kinds of binary strings does App Review actually flag?

    A small set, and the set is policy-driven rather than security-driven. Documented triggers include strings referencing private APIs (Guideline 2.5.1), references to App Tracking Transparency without a matching purpose string (Guideline 5.1.2), the absence of a privacy policy URL where one is required, and missing required-reason declarations for APIs on the Required Reason API list.

    A hardcoded AKIA access key, a wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY style secret, an S3 bucket URL with embedded credentials, none of these map to a published guideline. App Review treats them the way it treats any other configuration data inside the bundle: as the developer's problem.

    What it isCaught by App Review?Caught by store policy text?Caught by an OWASP MASVS scan?
    Hardcoded AWS access key (AKIA...)NoNo specific clauseYes, MASVS-STORAGE-1
    S3 bucket URL with credentials in query stringNoNo specific clauseYes, MASVS-STORAGE-1
    Missing privacy manifest for a listed SDKYes, automatedGuideline 5.1.2Indirectly
    Use of UIPasteboard with no purpose stringSometimes flagged in review notesGuideline 5.1.1Yes, MASVS-PRIVACY
    Disabled App Transport Security on production hostsSometimes flaggedATS policyYes, MASVS-NETWORK-1
    Hardcoded Stripe live keyNoStripe terms of service, not AppleYes, MASVS-STORAGE-1

    The pattern across the table is consistent. Apple polices the contract between app and user. The OWASP Mobile Application Security Verification Standard polices what the binary actually contains.

    How did Crumbl, Eureka, and Videoshop ship with live AWS S3 credentials?

    By passing the only checks that ran, which were checks for something else. Per Symantec's report on hardcoded cloud credentials, Crumbl initialized an AWSStaticCredentialsProvider with plain-text access and secret keys, Eureka stored credentials inside an INMAWSCredentials object visible to anyone who unpacked the IPA, and Videoshop embedded the values inside its setup method.

    All three apps passed App Review repeatedly. All three apps were updated multiple times after launch. None of those reviews surfaced the keys, because the keys never broke any guideline the review process knows how to read. The same report points to the pattern across 1,859 apps and notes that more than half of the apps reused the same AWS tokens found in other apps maintained by other developers, which is the SDK supply chain signature.

    That is the gap. Apple's gate watches the user experience. The cloud account behind the app sits somewhere else entirely, and review never opens that door.

    Where do hardcoded AWS S3 credentials usually come from in an iOS build?

    Five paths cover almost everything researchers find inside IPAs.

    1. A tutorial or sample app. A developer copies an AWSStaticCredentialsProvider snippet, ships it with the values still inside, forgets it.
    2. A third-party SDK. An analytics, identity, or biometric SDK initializes its own S3 client and hardcodes the vendor's developer account key, which propagates into every app shipping the SDK.
    3. A debug branch that never got reverted. The team used a personal AWS account during testing, then merged the temporary key into main.
    4. A no-code or AI-coded export. Some builders and AI coding agents inline backend credentials into the binary for convenience, including agents that quote .env values into source files when asked to set up a feature.
    5. A configuration file pulled at build time. A config.plist or JSON resource baked into the bundle with access key, secret key, and bucket name in plain text.

    The common thread is that the developer thought the binary was a closed box. It is not. Any reverse engineer with iOS tooling, including class-dump, Hopper, Ghidra, or strings from the command line, can read the bundle in minutes.

    Per AWS's IAM best practices guide, AWS itself recommends never embedding long-term access keys in client applications. The recommended pattern is to use Amazon Cognito or AWS STS to vend temporary, scoped credentials from a backend, and to keep the long-term keys on a server the app never sees directly.

    How can a developer catch an AWS key before App Review does not?

    The honest version of this question is, what fills the gap that Apple does not. Three controls stack cleanly.

    The first is a pre-build secret scan on source. Tools like gitleaks, trufflehog, and git-secrets flag AKIA-prefixed keys, ASIA temporary tokens, and S3 bucket URL patterns at commit time. They miss anything inlined by a third-party SDK the developer does not own.

    The second is a pre-submission scan on the compiled IPA, which is what catches the SDK case. A static analysis pass against the binary inspects strings, embedded property lists, and embedded JSON for AWS key patterns, including the IAM access key regex paired with adjacent secret-key entropy. For builders who want that scan against an OWASP MASVS-aligned baseline before they upload to App Store Connect, PTKD.com (https://ptkd.com) is one of the platforms focused on pre-submission analysis of the IPA, APK, and AAB.

    The third is the design decision behind both scans. Where possible, move the long-term AWS key off the device entirely. Sign a request server-side, return a short-lived STS credential or a pre-signed S3 URL, and ship a binary that has no AWS key to find.

    What to watch out for

    The first myth to drop is that App Review is a security gate. Per the App Store Review Guidelines, the review is a fitness check against Apple's published rules, weighted toward user safety, business model integrity, and design quality. The guidelines do not commit Apple to finding hardcoded cloud credentials inside a binary, and the record shows they do not.

    The second is that obfuscation buys safety. Base64, XOR, simple key rotation, all of them collapse against a reverse engineer with time. The Symantec analysis pulled live keys out of binaries with no special tooling beyond what ships on a researcher laptop.

    The third is that AWS itself will catch the leak before the customer does. AWS does scan public sources for exposed access keys and revokes them when found, but compiled IPAs are not a public source AWS crawls. The leak often gets noticed when the bill spikes or when a third party reports the key. The customer is sometimes the source of that report.

    Key takeaways

    • Apple's App Review process is not a static analysis pipeline for cloud credentials. A hardcoded AWS S3 access key, secret key, or bucket URL inside an IPA will almost always pass review.
    • Independent researchers, including Symantec and Cybernews, have repeatedly published evidence that live AWS credentials, including ones granting S3 access, ship inside iOS apps already on the App Store.
    • Most exposed keys arrive through third-party SDKs or starter templates rather than developer-authored code, which means a source-level scan alone misses the dominant failure mode.
    • For builders who want an independent read on the compiled IPA before upload, PTKD.com (https://ptkd.com) is one of the platforms focused on OWASP MASVS-aligned scans for hardcoded secrets including AWS, S3, Stripe, Firebase, and similar credential patterns.
    • The structural fix is to remove long-term AWS keys from the binary entirely, using Cognito, STS, or a backend signing endpoint, so there is nothing inside the bundle for a reverse engineer to find.
    • #aws s3
    • #hardcoded credentials
    • #ios app review
    • #owasp masvs
    • #secret scanning
    • #mobile security
    • #app store connect

    Frequently asked questions

    Does App Store Connect's automated upload scan reject IPAs that contain an AWS access key?
    No. The automated checks at upload validate provisioning, entitlements, declared SDK manifests, and binary architecture. None of them flag an AKIA-prefixed access key, an S3 bucket URL, or an embedded secret access key. The 1,859 apps Symantec catalogued in 2024 all passed those checks. If the upload scan caught hardcoded AWS credentials, the public corpus of leaks would not exist at the scale independent researchers keep reporting year after year.
    If my AWS key is base64 or XOR-encoded inside the IPA, does that hide it from anyone?
    Not from anyone running a static analysis pass. Base64 strings stand out by their character set, and short XOR keys fall to entropy analysis quickly. Reverse engineers use strings, Hopper, and class-dump on iOS binaries every day. Obfuscation buys a small amount of attacker time. It does not buy review-time invisibility, and it does not satisfy OWASP MASVS-STORAGE-1, which treats the credential as exposed either way.
    Can an attacker actually find my S3 bucket from a compiled IPA on the App Store?
    Yes. Downloading an IPA from a jailbroken device or from a re-signed copy puts the binary in their hands. From there, unzip on the .ipa file, strings against the main binary, and a few minutes with class-dump typically surface bucket names, region hints, and IAM access key patterns. If the key has S3 read and write, they read or write objects until AWS revokes it or the developer rotates.
    Does Apple ever email developers when AWS or a researcher reports a leaked key?
    There is no published Apple workflow for notifying developers about cloud credential leaks. AWS itself runs automated scans on public sources and sometimes quarantines compromised keys with the AWSCompromisedKeyQuarantine managed policy, but that signal goes to the AWS account owner, not to App Store Connect. The notification path for an iOS leak is usually AWS Trust and Safety, a researcher disclosure, or a customer report on social media.
    Is AWS STS or Amazon Cognito the only way to avoid hardcoded S3 credentials in a mobile app?
    It is the cleanest pattern AWS itself recommends. The IAM best practices guide says long-term access keys should not live in client applications. STS or Cognito vends short-lived credentials scoped to the user, and a backend signing endpoint can return pre-signed S3 URLs for upload or download. Either pattern keeps the long-term key on a server the app never carries inside its bundle.

    Keep reading

    Scan your app in minutes

    Upload an APK, AAB, or IPA. PTKD returns an OWASP-aligned report with copy-paste fixes.

    Try PTKD free