OWASP MSTG Compliance Checklist — PPP Mobile App
Target assurance level: MASVS Level 2 (medical data application)
Scanner: mobsfscan — integrated into the weekly
security-scan.ymlGitHub Actions workflow.Last baseline: 2026-03-04
How the CI Gate Works
| Severity | CI Behaviour |
|---|---|
| High / ERROR | Blocks the workflow (exit 1) — mirrors the existing Semgrep gate |
| Warning / Medium | Creates or updates a GitHub issue automatically (label: security:mobile-mstg) |
| Info | Logged in the step summary; no action taken |
Running Locally
bash
pip install mobsfscan
mobsfscan mobile/ppp
# JSON output:
mobsfscan --json -o results.json mobile/pppMASVS Baseline Status
The following table maps each MASVS category to the current compliance status of the PPP mobile app. Items marked Automated are checked by mobsfscan on every weekly security scan. Items marked Manual require periodic human review.
MASVS-STORAGE — Data Storage
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-STORAGE-1 | App does not store sensitive data in system logs | Pending review | Automated | mobsfscan checks for console.log / NSLog with tokens |
| MSTG-STORAGE-2 | No sensitive data stored in backups | Partial | Manual | iOS UIFileSharingEnabled: true in app.config.js exposes documents to iTunes file sharing |
| MSTG-STORAGE-3 | App does not write sensitive data to application logs | Pending review | Automated | Covered by MSTG-STORAGE-1 scan rule |
| MSTG-STORAGE-5 | Keyboard cache disabled for sensitive inputs | Pending review | Manual | Not yet audited |
| MSTG-STORAGE-7 | No sensitive data in screenshots/snapshots | Pending review | Manual | No FLAG_SECURE (Android) or snapshot protection (iOS) |
| MSTG-STORAGE-12 | PII minimised in local storage | Gap | Manual | MMKV stores accessToken + user object unencrypted; see SECURITY.md |
MASVS-CRYPTO — Cryptography
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-CRYPTO-1 | No hardcoded cryptographic keys | Pass | Automated | mobsfscan rule; no keys found in source |
| MSTG-CRYPTO-3 | App uses proven cryptographic primitives | Pass | Manual | TLS via AWS Lambda; MMKV supports AES-256 (not yet enabled) |
| MSTG-CRYPTO-6 | No weak random number generators for security | Pending review | Automated | mobsfscan checks for Math.random() in security contexts |
MASVS-AUTH — Authentication
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-AUTH-1 | Authentication enforced at backend | Pass | Manual | Cognito JWT validated by tRPC middleware |
| MSTG-AUTH-2 | Session management handled server-side | Partial | Manual | Cognito manages sessions; no refresh token flow on mobile |
| MSTG-AUTH-8 | Biometric authentication (if used) is not event-bound only | N/A | Manual | Biometric auth not yet implemented |
MASVS-NETWORK — Network Communication
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-NETWORK-1 | All network traffic encrypted (TLS) | Pass | Automated | Lambda Function URL enforces HTTPS |
| MSTG-NETWORK-2 | TLS settings follow best practices | Pass | Automated | AWS-managed TLS 1.2+ |
| MSTG-NETWORK-3 | Certificate pinning implemented | Pass | Automated | withCertificatePinning plugin configured in app.config.js |
| MSTG-NETWORK-4 | App does not trust custom CAs | Pending review | Automated | mobsfscan checks for network security config issues |
MASVS-PLATFORM — Platform Interaction
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-PLATFORM-1 | App requests minimum necessary permissions | Gap | Manual | ACCESS_BACKGROUND_LOCATION, WRITE_EXTERNAL_STORAGE may be over-scoped |
| MSTG-PLATFORM-2 | Input from external sources validated | Pass | Manual | tRPC + Zod validates all API inputs server-side |
| MSTG-PLATFORM-3 | App does not export sensitive functionality via IPC | Pending review | Automated | mobsfscan checks exported components |
| MSTG-PLATFORM-5 | JavaScript disabled in WebViews unless necessary | Gap | Manual | WebView has javaScriptEnabled: true for Cognito auth |
| MSTG-PLATFORM-6 | WebView configured to allow minimum protocol handlers | Pending review | Manual | No originWhitelist restriction on auth WebView |
MASVS-CODE — Code Quality
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-CODE-1 | App signed with valid certificate | Pass | Manual | EAS Build handles signing |
| MSTG-CODE-2 | App built in release mode | Pass | Manual | EAS production profile uses release mode |
| MSTG-CODE-3 | Debug symbols removed from release | Pending review | Manual | Expo managed workflow; needs verification |
| MSTG-CODE-4 | No debugging code or verbose logging | Pending review | Automated | mobsfscan checks for debug patterns |
| MSTG-CODE-9 | Obfuscation applied (L2) | Gap | Manual | No Hermes bytecode obfuscation configured |
MASVS-RESILIENCE — Anti-Tampering (Level 2)
| # | Requirement | Status | Detection | Notes |
|---|---|---|---|---|
| MSTG-RESILIENCE-1 | Jailbreak/root detection | Gap | Manual | Not implemented; see SECURITY.md |
| MSTG-RESILIENCE-2 | App detects and responds to debugger | Gap | Manual | Not implemented |
| MSTG-RESILIENCE-3 | App detects and responds to tampering | Gap | Manual | Not implemented |
| MSTG-RESILIENCE-5 | App detects and responds to emulator | Gap | Manual | Not implemented |
Expected Baseline Findings
The following findings are expected on the initial mobsfscan run and represent known gaps documented in docs/site/mobile/security.md. These will be triaged and resolved through dedicated GitHub issues.
| Expected Finding | Severity | MSTG ID | Tracking |
|---|---|---|---|
| MMKV storage without encryption key | High | MSTG-STORAGE-12 | Documented in SECURITY.md |
UIFileSharingEnabled: true in iOS config | Warning | MSTG-STORAGE-2 | app.config.js |
| JavaScript enabled in WebView | Warning | MSTG-PLATFORM-5 | Required for Cognito auth flow |
| Background location permission | Warning | MSTG-PLATFORM-1 | Required for hospital proximity |
console.log statements in source | Info | MSTG-STORAGE-1 | Normal for development; stripped in production |
| No jailbreak/root detection | N/A (manual) | MSTG-RESILIENCE-1 | Documented in SECURITY.md |
Maintaining This Checklist
- Weekly scan — the
security-scan.ymlworkflow runs mobsfscan every Monday at 06:00 UTC - New findings — medium-severity findings auto-create GitHub issues with
security:mobile-mstglabel - Resolving findings — when a finding is fixed, the next clean scan auto-closes the issue
- Manual review — items marked "Manual" should be reviewed quarterly or before each production release
- Updating this doc — when a gap is resolved, update the Status column and add the PR reference