feat(sast): Android and iOS app analysis with mobsfscan
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m13s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m13s
mobsfscan (LGPL-3.0, used unchanged) checks Java, Kotlin, Swift and Objective-C code and the AndroidManifest and Info.plist settings, with a CWE and the OWASP MASVS requirement on each rule. It runs on the image's semgrep (installed --no-deps, its other dependencies pinned) with metrics off. Three of its defaults would mislead on a customer's tree, so: - docker/pruefwerk_mobsfscan.py clears its path ignores: libsast skips any path that merely contains 'spec' or 'fixtures', so code under inspection/ vanished. Ours are anchored as /name/ and passed with -c, which also stops it reading a .mobsf file from the repository. - --type auto configures the iOS rules only when there is no Android code, so a React Native or Flutter app was checked as Android only. It now runs once per platform present. - Manifest and plist matches report line 1; the line that sets the key is looked up. App-wide "missing protection" hints carry no location and are left out. The scan runs in scan_tree after cppcheck when the tree holds Java, Kotlin, Swift or Objective-C (`.m`/`.mm` now count as objc); a failure records a sast_mobile skip, which the CRA view treats like a failed semgrep. The control map binds mobsfscan by CWE to cra-ai-1, 7, 8, 9, 13, 14, 15, 16 and 20, each with only the languages it has rules for. Nightly: android-insecure and ios-insecure fixtures, and one flaw each in the React Native fixture's Java and Swift, so both platforms must run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
1 parent
3ad6cc538b
commit
043f3589bd
29 files changed
+961
-15
No files matched your search
@@ -33,6 +33,32 @@ finds the defects that matter in firmware: out-of-bounds writes, uninitialised
|
||||
reads, null dereferences and leaks. It parses the code and never runs it. Its
|
||||
findings are **Codeanalyse (SAST)** findings with the tool name `cppcheck`.
|
||||
|
||||
## mobsfscan -- Android and iOS Apps
|
||||
|
||||
[mobsfscan](https://github.com/MobSF/mobsfscan) (LGPL-3.0, used unchanged) runs
|
||||
on trees with Java, Kotlin, Swift or Objective-C code. It checks the code and
|
||||
the app settings:
|
||||
|
||||
- **AndroidManifest.xml:** `debuggable`, `allowBackup`, cleartext traffic, an
|
||||
outdated `minSdkVersion`, exported components, task hijacking.
|
||||
- **Info.plist:** App Transport Security exceptions (`NSAllowsArbitraryLoads`).
|
||||
- **Code:** WebViews with a JavaScript bridge or ignored TLS errors, weak hashes
|
||||
and ciphers, ECB mode and static IVs, `java.util.Random` for security,
|
||||
world-readable storage, trust-all certificate handling, command and SQL
|
||||
injection, unsafe deserialisation, sensitive data in logs.
|
||||
|
||||
Each finding carries its CWE and the OWASP MASVS requirement. mobsfscan runs
|
||||
once with the Android and once with the iOS rules when a repository holds both
|
||||
apps (React Native, Flutter); on its own it would check such a repository as
|
||||
Android only. It runs on the same Semgrep engine with metrics off, never reads
|
||||
a `.mobsf` file from your repository, and skips `Pods/`, `build/`, `.gradle/`,
|
||||
`DerivedData/`, `Carthage/` and `node_modules/`. Its findings are
|
||||
**Codeanalyse (SAST)** findings with the tool name `mobsfscan`.
|
||||
|
||||
Not reported: the app-wide "missing protection" hints (no certificate pinning,
|
||||
no root or jailbreak detection, no screenshot protection). They name no place in
|
||||
the code and are heuristics. Dart code (Flutter) has no rules yet.
|
||||
|
||||
## Vendor Code Exclusion
|
||||
|
||||
Firmware projects carry their silicon vendor's SDK (HAL, CMSIS, board support)
|
||||
|
||||
Reference in new issue
Block a user