feat(ios): secrets in UserDefaults, URL schemes and permissions of iOS apps (#479)
This commit was merged in pull request #479.
This commit is contained in:
1 parent
5fdf80a1e0
commit
5b2deec9e8
19 files changed
+906
-5
No files matched your search
@@ -17,9 +17,10 @@ names while the scan runs.
|
||||
- *Projekttyp bestimmen* -- firmware, PLC project, backend service, and so on.
|
||||
- *Firmware analysieren* -- for firmware, lists the libraries and toolchain the build uses.
|
||||
2. **Static code analysis** (*Statische Codeanalyse*) -- Semgrep with
|
||||
Prüfwerk's own rules (Python, JavaScript/TypeScript, C and C++; see
|
||||
[Tools](/reference/tools)); for Android and iOS apps mobsfscan (code,
|
||||
AndroidManifest and Info.plist); for C and C++ also cppcheck, which follows values through the code
|
||||
Prüfwerk's own rules (Python, JavaScript/TypeScript, C and C++, Swift and
|
||||
Objective-C; see [Tools](/reference/tools)); for Android and iOS apps
|
||||
mobsfscan (code, AndroidManifest and Info.plist), and for iOS apps the URL
|
||||
schemes and permissions the app declares; for C and C++ also cppcheck, which follows values through the code
|
||||
(out-of-bounds writes, uninitialised reads, null dereferences). Vendor and
|
||||
third-party code (HAL, CMSIS, vendored libraries) is left out of the code
|
||||
findings and listed under **Nicht ausgeführt**; it stays in the SBOM.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user