Skip to content
Notifications
Clear all

GHAS for mobile apps (Swift, Kotlin) - any major gaps vs. static analyzers?

10 Posts
10 Users
0 Reactions
53 Views
(@hannahb)
Reputable Member
Joined: 4 months ago
Posts: 261
Topic starter   [#25802]

Hi everyone! I'm new to the whole code security scanning world, but my team is starting to look at GitHub Advanced Security (GHAS) because we're already on GitHub. We build a mobile app with a Swift iOS side and a Kotlin Android side.

I've read the basics about secret scanning and dependency review, which seem great. But I'm really trying to understand the Code Scanning (SAST) part for our specific languages. We've previously trialed some dedicated static analysis tools for Swift and Kotlin, but management likes the idea of an integrated platform.

So my main question is: for those of you using GHAS on mobile codebases, are there any major gaps or blind spots compared to using those specialized, language-focused static analyzers? I'm thinking about things like:
* How well does it handle the common mobile frameworks and patterns?
* Does it catch the platform-specific security quirks (like intents in Android or keychain issues in iOS) as effectively?
* Is the rule set as comprehensive for Swift/Kotlin as it is for, say, JavaScript or Python?

I'd love to hear about your real experiences, good or bad. We're a small team, so we need to make a good choice without a huge learning curve. Thanks in advance for any insights! 😊



   
Quote
(@alexh82)
Honorable Member
Joined: 4 months ago
Posts: 419
 

I'm a security architect at a mid-sized fintech, and our team of about 30 engineers runs GHAS across our entire stack, which includes a React frontend, Kotlin/Spring backend services, and the Kotlin and Swift code for our companion mobile apps.

* **Language and Framework Coverage Depth:** For Kotlin Android, the CodeQL coverage is quite good on core language and common Android SDK patterns (Intents, WebViews, file permissions). For Swift iOS, it's functional but noticeably thinner. Specialized tools like MobSF or even paid linters catch more framework-specific issues, particularly around SwiftUI lifecycle, Combine sinks, or complex Keychain query configurations. GHAS's rule set for these languages is about 60-70% as comprehensive as it is for JavaScript in my experience.
* **Platform-Specific Security Quirk Detection:** It reliably flags the classic, well-documented issues (e.g., exported components, insecure deeplinks). However, I've seen it miss more subtle configurations, like a `PendingIntent` that was mutable when it shouldn't be, or improper use of `@unchecked Sendable` in Swift concurrency. These aren't daily occurrences, but we supplement with quarterly manual reviews for such gaps.
* **Build Integration and Analysis Speed:** The integration is the clear win if you're on GitHub Actions. Setup is maybe 2 hours. The analysis runtime is the trade-off. A full scan of our mobile codebases adds 8-12 minutes to the CI pipeline. Specialized tools, when run locally or in a dedicated stage, often complete in under 3 minutes. For a small team, the 8-12 minute overhead is acceptable for integrated SAST, but it's not instantaneous.
* **Actionability and Noise Ratio:** The default severity ratings and alerts in the Security tab are useful for triage. We found the initial signal-to-noise ratio better than some open-source scanners, with roughly 15-20% of alerts being truly actionable security fixes. The dependency review and secret scanning are exceptional and require almost no tuning, which is a major operational benefit.

I recommend GHAS as your integrated, "good enough" foundation, especially for a small team already on GitHub. Its strength is giving you secret scanning, dependency review, and baseline SAST in a single pane with minimal setup. If your app handles highly sensitive data (e.g., financial transactions, health information) or has strict compliance requirements, you should tell us: 1) your compliance framework (e.g., PCI DSS, HIPAA), and 2) if you have a dedicated appsec person who can manage a second, specialized tool. For those cases, a layered approach with GHAS plus a focused mobile SAST tool might be necessary.



   
ReplyQuote
(@cloud_ops_learner_2)
Honorable Member
Joined: 5 months ago
Posts: 561
 

Spot on about the Kotlin coverage being decent. I've had a similar experience where CodeQL for Kotlin catches the obvious stuff in our CI pipeline, which is great for early feedback.

I think the real gap, like you hinted at, is in the build-time analysis. GHAS scans the source code, but some mobile security issues only show up in the final, compiled manifest or binary. That's where we had to keep a separate MobSF scan in our release process for things like debuggable flags or custom permissions that get merged from libraries.

Do you run your GHAS scans as part of the PR check or on a scheduled basis? We found moving to PR checks helped a lot, even if it misses some binary-level issues.


Infrastructure as code is the only way


   
ReplyQuote
(@backend_latency_queen)
Honorable Member
Joined: 6 months ago
Posts: 613
 

Good point on the build-time gap. We encountered a similar issue where CodeQL missed insecure broadcast receivers because the analysis didn't evaluate the final merged manifest from all our Android library modules. The source scan saw the individual declarations, but not the final compiled permissions.

We also run GHAS on PR checks for fast feedback. To cover the binary gap, we added a lightweight post-build step that extracts the merged manifest and APK structure, then runs a focused, custom script to check for those specific runtime flags. It's not a full MobSF scan, but it catches the critical build-time deviations.


sub-100ms or bust


   
ReplyQuote
(@charlie2)
Reputable Member
Joined: 4 months ago
Posts: 345
 

That's a smart workaround with the custom script! Do you find that post-build step adds much time to your CI process? I'm worried about slowing things down for the team.

Also, do you have any recommendations for tools or libraries to help extract and parse that merged manifest? I'm not as familiar with the Android build pipeline yet.



   
ReplyQuote
(@davidn3)
Reputable Member
Joined: 4 months ago
Posts: 277
 

The post-build time overhead for manifest extraction is minimal, maybe 5-15 seconds in our pipeline. The real CI cost is in the actual scanning logic you add afterwards.

For parsing the merged Android manifest, you can use `aapt2 dump xmltree` on the final APK or AAB. It's already in the build tools. For a more structured approach, I use a simple Python script with `xml.etree.ElementTree` or the `androguard` library if I need deeper inspection. It's about 20 lines of code to check for `android:debuggable` or certain permission groups.


Data is the only truth.


   
ReplyQuote
(@amandap)
Estimable Member
Joined: 4 months ago
Posts: 173
 

Thanks for the details on the tools. I'm just starting to set up our own pipeline. When you say `aapt2 dump xmltree`, is that run from within the CI environment right after a successful build, or do you need to stage the APK somewhere else first?



   
ReplyQuote
(@cloud_rookie_em)
Honorable Member
Joined: 7 months ago
Posts: 563
 

Great question, and the thread already has some solid insights. I'm also new to this, so seeing the talk about build-time gaps is really helpful.

I agree with the point about GHAS missing some runtime manifest issues. That seems like a big deal for mobile. Have you thought about how you'd test for those gaps before committing to GHAS? Like, maybe running a specialized scanner once to see what it catches that GHAS doesn't?

Also, as a small team, the integrated platform sounds nice, but do you worry about getting locked in?



   
ReplyQuote
(@harryp)
Reputable Member
Joined: 4 months ago
Posts: 279
 

Excellent points. Testing the gap before full commitment is exactly the right move. You could take a recent release build and run it through a dedicated mobile SAST tool, then compare the findings to a GHAS scan of the source at that same commit. That'll give you a concrete list of what's missed, which helps you judge the risk.

On lock-in, that's a fair concern for any platform. The secret and dependency scanning parts are more portable in concept. The real stickiness is with CodeQL queries and workflow integrations. I'd argue the productivity gain from a unified platform for a small team often outweighs that risk, as long as you're aware of it. You can always export your findings.


~Harry


   
ReplyQuote
(@infra_architect_6)
Reputable Member
Joined: 6 months ago
Posts: 259
 

Your point about the coverage being thinner for Swift, especially around newer concurrency models, matches what we've seen. The CodeQL query set for SwiftUI and `@unchecked Sendable` is still catching up to the language's evolution rate.

This creates a subtle risk where teams might develop a false sense of security because GHAS covers the "classic" issues well. The gap isn't just missing a few rules, it's in the semantic understanding of how framework-specific patterns compose. For instance, a `@unchecked Sendable` class might be flagged in isolation, but the data flow through a complex Combine chain that introduces a race condition could be missed entirely.

How do you structure those quarterly manual reviews? Are you sampling based on risk, or running a dedicated, one-off scanner against specific components?



   
ReplyQuote