feat(ios): secrets in UserDefaults, URL schemes and permissions of iOS apps (#479)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 5m51s
CI / Deploy Agent (push) Successful in 7m29s

This commit was merged in pull request #479.
This commit is contained in:
sharang committed 2026-10-05 23:35:23 +00:00
1 parent 5fdf80a1e0
commit 5b2deec9e8
19 files changed
+906 -5

No files matched your search

+23
View File
@@ -14,6 +14,10 @@ Prüfwerk runs the engine with **its own CRA rules only**:
plain `http://` requests, and (Python) hard-coded credentials.
- C and C++: unbounded string functions, non-literal format strings,
hard-coded credentials, broken hashes and ciphers, `rand()` for security.
- Swift and Objective-C (iOS apps): passwords, tokens and keys kept in
`UserDefaults` / `NSUserDefaults` (also through `@AppStorage`) instead of the
Keychain. The Objective-C rule is a text pattern, as Semgrep cannot parse
Objective-C.
The rules of the Semgrep registry (`--config=auto`, `p/...`) are not used:
their licence (Semgrep Rules License v1.0) allows internal use only, not a
@@ -55,6 +59,25 @@ 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`.
### iOS app settings
Prüfwerk reads every `Info.plist` and the `INFOPLIST_KEY_*` build settings of
the Xcode project (outside `Pods/` and `Carthage/`) itself, as findings with the
tool name `ios-config`:
- **Custom URL schemes** (`CFBundleURLTypes`, Low): any app can register the
same scheme and receive the URLs meant for this one; Universal Links avoid it.
- **Sensitive permissions** (`NS…UsageDescription`, Info): location, camera,
microphone, contacts, photos, calendars, Bluetooth, local network, health,
motion, speech, tracking. An inventory for the risk assessment and the privacy
notice, not a violation.
- **Permission requests without a usage string** (Low): code that asks for one
of these while no plist explains why; iOS terminates the app at that call.
Judged only when the repository holds a plist or an Xcode project.
The first two map to no CRA requirement: a minimal attack surface and data
minimisation are judged in the design review.
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.