Newer
Older
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-1 or higher)
**Task**: Exposing system-level APIs through JavaScript bridges without strict controls creates critical vulnerabilities that can lead to arbitrary code execution, data exfiltration, or complete system compromise. Malicious web content could exploit unrestricted file system access to read sensitive files, execute arbitrary commands to take control of the host system, or load native modules to escalate privileges. Path traversal attacks could bypass directory restrictions, and unbounded network socket access could enable attackers to pivot to internal systems, making proper security controls on system-level APIs absolutely essential for embedded browser security.
**Verification**:
1. Review all APIs exposed via the JavaScript bridge
2. Identify any system-level capabilities: file system access, process/command execution, native module loading, network socket access, registry access
3. For each system-level API, verify additional security controls exist: capability-based permissions, path allowlisting, command allowlisting, sandboxing, user consent
4. Attempt to use exposed file system APIs to access sensitive paths (/etc/passwd, C:\\Windows\\System32, application data directories)
5. Attempt to execute arbitrary commands or load arbitrary native modules
6. Test that path traversal sequences (../, ..\\) are blocked or neutralized
7. Verify that system-level operations are logged extensively
8. Confirm that least-privilege principles are enforced (minimal necessary access)
9. System-level APIs either not exposed or have strict security controls
10. File system access is restricted to specific allowlisted directories
11. Command execution is restricted to specific allowlisted commands or completely prohibited
12. Native module loading is restricted or prohibited
13. Path traversal attacks are prevented
14. System-level operations require elevated permissions or user consent
15. All system-level operations are logged with full details
16. Security controls cannot be bypassed
**Pass Criteria**: No unrestricted system-level APIs are exposed AND all system APIs have additional security controls AND controls are enforced effectively
**Fail Criteria**: Any system-level API is exposed without restrictions OR security controls can be bypassed OR arbitrary file/command access is possible
**Evidence**: API documentation, code review of exposed APIs, penetration test results, logs showing blocked system access attempts, security architecture documentation
**References**:
- CWE-78: OS Command Injection: https://cwe.mitre.org/data/definitions/78.html
- CWE-22: Path Traversal: https://cwe.mitre.org/data/definitions/22.html
- OWASP Command Injection: https://owasp.org/www-community/attacks/Command_Injection
- Electron Security Best Practices - Shell Execution: https://www.electronjs.org/docs/latest/tutorial/security#6-do-not-use-shellexecuteshellopen-or-related-methods-with-user-content
- Android File System Security: https://developer.android.com/training/data-storage
### Assessment: EMB-REQ-7 (Immutable bridge configuration)
**Reference**: EMB-REQ-7 - JavaScript bridge configurations shall be immutable after WebView initialization to prevent runtime tampering
**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-1 or higher)
**Task**: Immutable bridge configuration prevents runtime tampering attacks where malicious code attempts to dynamically modify the JavaScript bridge to add new attack surfaces, remove security controls, or replace legitimate APIs with malicious implementations. If configuration can be changed after initialization, attackers could exploit race conditions, code injection vulnerabilities, or confused deputy scenarios to inject malicious APIs, escalate privileges, or disable security restrictions. Configuration immutability ensures that the security boundary established at initialization time cannot be undermined during runtime.
**Verification**:
1. Initialize the embedded browser with a specific JavaScript bridge configuration
2. After initialization, attempt to modify the bridge configuration from host application code
3. From web content, attempt to add new APIs to the bridge dynamically
4. Test if existing bridge APIs can be removed or replaced at runtime
5. Verify that configuration changes after initialization either fail or require browser restart
6. Test that web content cannot influence bridge configuration through any means
7. Review code to confirm configuration is set during initialization phase only
8. Verify that attempting to modify configuration triggers security logging
9. Bridge configuration is set during initialization and cannot be changed afterward
10. Host application cannot add or remove bridge APIs after initialization
11. Web content cannot influence bridge configuration
12. Attempts to modify configuration fail with appropriate errors
13. Configuration immutability is enforced at the code level
14. Any attempted configuration changes are logged as security events
15. Browser restart is required for configuration changes (if supported at all)
**Pass Criteria**: Bridge configuration is immutable after initialization AND modification attempts fail AND attempts are logged
**Fail Criteria**: Configuration can be modified after initialization OR web content can influence configuration
**Evidence**: Code review showing configuration immutability enforcement, test results showing failed modification attempts, security logs showing configuration change attempts, API documentation
**References**:
- Android WebView Configuration Best Practices: https://developer.android.com/reference/android/webkit/WebSettings
- iOS WKWebView Configuration Immutability: https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
- Electron Security - Immutable Configuration: https://www.electronjs.org/docs/latest/tutorial/security
- CWE-732: Incorrect Permission Assignment: https://cwe.mitre.org/data/definitions/732.html
### Assessment: EMB-REQ-8 (Host credential protection)
**Reference**: EMB-REQ-8 - Embedded browsers shall prevent web content from accessing host application credentials, tokens, or cryptographic keys
**Given**: A conformant embedded browser with context isolation (EMB-1 or higher)
**Task**: Protecting host credentials from web content access is essential to prevent credential theft attacks where malicious web content attempts to steal authentication tokens, API keys, or cryptographic keys stored by the host application. If web content can access host credentials through JavaScript bridge APIs, shared storage, or side channels, attackers can impersonate the host application, access protected resources, or decrypt sensitive data. This credential isolation requirement prevents scenarios where a compromised web page loaded in the embedded browser could steal the host's authentication credentials and use them for unauthorized access.
**Verification**:
1. Store test credentials/tokens in the host application's secure storage (keychain, keystore, credential manager)
2. Load web content in the embedded browser
3. Attempt to access host credentials through various methods: JavaScript bridge APIs, localStorage inspection, cookie inspection, memory inspection
4. Verify that credentials stored by the host are isolated from web content storage
5. Test that shared storage mechanisms (if any) do not leak credentials
6. Attempt to extract credentials by triggering host application features that use them
7. Verify that authentication tokens are not exposed in error messages or logs accessible to web content
8. Test that cryptographic operations using host keys cannot be triggered arbitrarily by web content
9. Host application credentials are completely isolated from web content
10. No JavaScript bridge API exposes credentials directly or indirectly
11. Web content storage (localStorage, cookies, IndexedDB) is separate from host credential storage
12. Shared storage mechanisms do not leak credentials
13. Authentication tokens are not exposed in error messages or debug output
14. Host cryptographic keys cannot be accessed or used arbitrarily by web content
15. Credential isolation is maintained even for trusted origins
**Pass Criteria**: Web content has no access to host credentials AND credential storage is completely isolated AND cryptographic keys are protected
**Fail Criteria**: Any credential or token is accessible to web content OR cryptographic keys can be misused
**Evidence**: Penetration test results, code review of credential storage isolation, test attempts to access credentials, memory dumps showing isolation, security audit reports
**References**:
- Android Keystore System: https://developer.android.com/training/articles/keystore
- iOS Keychain Services: https://developer.apple.com/documentation/security/keychain_services
- CWE-522: Insufficiently Protected Credentials: https://cwe.mitre.org/data/definitions/522.html
### Assessment: EMB-REQ-9 (JavaScript bridge security review)
**Reference**: EMB-REQ-9 - All JavaScript bridge implementations shall be reviewed for injection vulnerabilities before production deployment
**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-1 or higher)
**Task**: Security reviews for JavaScript bridge implementations are critical because bridges represent the most dangerous attack surface in embedded browsers, where improper input validation can lead to injection attacks, privilege escalation, or arbitrary code execution. Without formal security reviews, subtle vulnerabilities like SQL injection through bridge parameters, command injection in system-level APIs, or XSS through improperly sanitized return values can go undetected. Comprehensive security assessments by qualified professionals ensure that all bridge APIs are properly validated, sanitized, and protected against common attack vectors before they can be exploited in production.
**Verification**:
1. Obtain documentation of the security review process for JavaScript bridge implementations
2. Verify that a formal security code review was conducted before production deployment
3. Review security assessment reports for the JavaScript bridge implementation
4. Verify that common injection vulnerabilities were tested: SQL injection, command injection, path traversal, XSS, code injection
5. Confirm that automated security scanning tools were used (static analysis, dynamic analysis)
6. Verify that findings from security reviews were remediated before deployment
7. Confirm that security reviews are repeated after significant bridge changes
8. Verify that third-party security assessments were conducted (if applicable)
9. Documented security review process exists for JavaScript bridge code
10. Security code reviews were conducted by qualified security professionals
11. Common injection vulnerability types were specifically tested
12. Automated security scanning tools were applied
13. Security findings were tracked and remediated
14. Re-reviews occur after significant code changes
15. Security review reports are available for audit
**Pass Criteria**: Formal security review was conducted AND injection vulnerabilities were specifically tested AND findings were remediated
**Fail Criteria**: No security review was conducted OR injection vulnerabilities were not tested OR findings were not remediated
**Evidence**: Security review reports, code review checklists, penetration test reports, static analysis tool outputs, vulnerability remediation tracking records, security sign-off documentation
**References**:
- OWASP Code Review Guide: https://owasp.org/www-project-code-review-guide/
- CWE Top 25 Most Dangerous Software Weaknesses: https://cwe.mitre.org/top25/archive/2023/2023_top25_list.html
- NIST SP 800-53 - Security Assessment: https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final
- OWASP Mobile Application Security Verification Standard: https://github.com/OWASP/owasp-masvs
### Assessment: EMB-REQ-10 (Bridge API rate limiting)
**Reference**: EMB-REQ-10 - Host applications shall implement rate limiting on JavaScript bridge API calls to prevent abuse
**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-2 or higher)
**Task**: Rate limiting on JavaScript bridge APIs prevents abuse scenarios where malicious web content floods the bridge with excessive API calls to perform denial-of-service attacks, exhaust system resources, or brute-force security controls. Without rate limits, attackers can rapidly probe for vulnerabilities, overwhelm logging systems to hide their tracks, or cause performance degradation that impacts legitimate users. Proper rate limiting also prevents reconnaissance attacks where malicious scripts systematically enumerate all available APIs or attempt to bypass security controls through repeated high-frequency attempts.
**Verification**:
1. Identify rate limits for each JavaScript bridge API (requests per second, burst limits)
2. Create test scripts that invoke bridge APIs at high frequency
3. Verify that rate limits are enforced: excessive calls are rejected or throttled
4. Test that rate limit violations trigger logging and security alerts
5. Verify that rate limits are per-origin (different origins have independent quotas)
6. Test that rate limits reset appropriately (per second, per minute, per session)
7. Attempt to bypass rate limits by using multiple execution contexts (iframes, workers)
8. Verify that legitimate use cases are not blocked by rate limits
9. Rate limits are defined and documented for all bridge APIs
10. Excessive API calls are rejected or throttled
11. Rate limit violations trigger security logging and alerts
12. Rate limits are enforced per-origin or per-context
13. Rate limits reset on appropriate time boundaries
14. Multiple contexts cannot bypass rate limits
15. Legitimate high-frequency use cases are accommodated
16. Rate limit parameters are configurable by host application
**Pass Criteria**: Rate limits are enforced on all bridge APIs AND violations are logged AND limits cannot be bypassed
**Fail Criteria**: No rate limiting exists OR rate limits are bypassable OR legitimate use is blocked
**Evidence**: Rate limit configuration documentation, test results showing throttling behavior, security logs showing rate limit violations, performance test results
**References**:
- OWASP API Security - Rate Limiting: https://owasp.org/API-Security/editions/2023/en/0xa4-unrestricted-resource-consumption/
- CWE-770: Allocation of Resources Without Limits: https://cwe.mitre.org/data/definitions/770.html
- NIST SP 800-95: Guide to Secure Web Services: https://csrc.nist.gov/publications/detail/sp/800-95/final
- Rate Limiting Best Practices: https://cloud.google.com/architecture/rate-limiting-strategies-techniques
### Assessment: EMB-REQ-11 (Granular capability-based permissions)
**Reference**: EMB-REQ-11 - JavaScript bridges shall support granular capability-based permissions rather than all-or-nothing access
**Given**: A conformant embedded browser with advanced bridge capabilities (EMB-2 or higher)
**Task**: Granular capability-based permissions prevent over-privileged access scenarios where granting access to one API inadvertently exposes all bridge functionality to potentially malicious web content. All-or-nothing permission models force developers to choose between denying all access or granting excessive privileges, creating security risks. Fine-grained permissions enable the principle of least privilege, allowing each origin to access only the specific APIs it needs while preventing lateral movement attacks where compromise of one feature leads to unauthorized access to unrelated sensitive functionality.
**Verification**:
1. Review the permission model for the JavaScript bridge
2. Verify that permissions can be granted at individual API level rather than all-or-nothing
3. Test different permission configurations: grant some APIs but deny others to the same origin
4. Verify that capability tokens or permissions can be scoped by origin, time, or usage count
5. Test that temporary permissions expire correctly
6. Verify that permission grants are logged with full context
7. Test that users or administrators can configure granular permissions
8. Verify that the principle of least privilege is enforced by default
9. Permission system supports individual API-level grants
10. Different origins can have different permission sets
11. Permissions can be scoped by time, usage count, or other constraints
12. Temporary permissions expire as configured
13. Permission grants and revocations are logged
14. Users/administrators have control over granular permissions
15. Default configuration follows least-privilege principle
16. Permission model is clearly documented
**Pass Criteria**: Granular per-API permissions are supported AND permissions are properly scoped AND least-privilege is enforced by default
**Fail Criteria**: Only all-or-nothing permissions exist OR no permission scoping is available OR overly permissive defaults
**Evidence**: Permission configuration files, permission model documentation, test results showing granular control, user/admin permission management interface screenshots, audit logs
**References**:
- Capability-Based Security: https://en.wikipedia.org/wiki/Capability-based_security
- Principle of Least Privilege (NIST): https://csrc.nist.gov/glossary/term/least_privilege
- W3C Permissions API: https://www.w3.org/TR/permissions/
- Android Permission Model: https://developer.android.com/guide/topics/permissions/overview
### Assessment: EMB-REQ-12 (Storage isolation from host)
**Reference**: EMB-REQ-12 - Embedded browsers shall isolate storage (cookies, localStorage, IndexedDB) from the host application's native storage
**Given**: A conformant embedded browser (EMB-0 or higher)
**Task**: Storage isolation between embedded browsers and host applications prevents data leakage attacks where malicious web content attempts to access sensitive application data stored in native storage mechanisms. Without proper isolation, compromised web content could read authentication tokens from host storage, modify application configuration data, or exfiltrate user information. Storage namespace collisions could also enable web content to poison host application data, leading to privilege escalation or application malfunction. Proper isolation ensures that the web security model and native application security model remain separate and cannot be used to undermine each other.
**Verification**:
1. Store data in the host application's native storage (SharedPreferences, UserDefaults, native database)
2. Load web content and attempt to access host storage through web APIs (localStorage, IndexedDB, cookies)
3. Verify that web content cannot read native host storage
4. Store data in web content storage and attempt to access it from host application
5. Verify that host application code cannot directly access web storage without explicit bridge APIs
6. Test that different embedded browser instances have isolated storage
7. Verify that clearing host application data does not affect web storage (unless explicitly configured)
8. Test that malicious web content cannot pollute host storage namespace
9. Web content storage (localStorage, IndexedDB, cookies) is isolated from host native storage
10. Host native storage is not accessible from web APIs
11. Web storage is not directly accessible from host code (without explicit bridge)
12. Multiple embedded browser instances have independent storage
13. Storage isolation is maintained even for same-origin content in different instances
14. Storage clearing operations are properly scoped
15. No namespace collisions between web and native storage
**Pass Criteria**: Complete storage isolation between web content and host application AND no cross-contamination is possible
**Fail Criteria**: Web content can access host storage OR host can access web storage without proper APIs OR storage namespaces collide
**Evidence**: Code review of storage isolation implementation, test results showing blocked access attempts, storage dump comparisons, penetration test results
**References**:
- Android WebView Data Storage: https://developer.android.com/reference/android/webkit/WebView#getDataDir()
- Chromium Embedded Framework Storage Isolation: https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage
- Web Storage API: https://html.spec.whatwg.org/multipage/webstorage.html
### Assessment: EMB-REQ-13 (CSP enforcement for embedded content)
**Reference**: EMB-REQ-13 - Host applications shall implement Content Security Policy (CSP) enforcement for all embedded web content
**Given**: A conformant embedded browser (EMB-1 or higher)
**Task**: Content Security Policy enforcement for embedded web content provides defense-in-depth protection against XSS attacks, malicious script injection, and unauthorized resource loading that could be used to exfiltrate data or establish command-and-control channels. Without CSP, compromised or malicious web content can inject inline scripts, load external malicious resources, or use eval() to execute attacker-controlled code. Host-configured CSP ensures that even if web content is compromised, the attack surface is constrained by preventing dangerous JavaScript patterns and restricting where content can be loaded from.
**Verification**:
1. Configure the embedded browser with a restrictive CSP policy
2. Load web content and verify CSP is enforced: inline scripts blocked, external resource loading restricted
3. Test that CSP violations trigger browser console errors and violation reports
4. Verify that CSP cannot be bypassed by web content
5. Test that meta tag CSPs are respected but cannot weaken configured policy
6. Verify that CSP applies to all content including iframes
7. Test CSP report-uri or report-to functionality
8. Verify that host application can configure CSP policy programmatically
9. CSP policy is configurable by host application
10. CSP is enforced for all embedded web content
11. Inline scripts, eval, and other dangerous features are blocked per policy
12. CSP violations generate console errors and reports
13. Web content cannot bypass or weaken CSP policy
14. CSP applies to all nested contexts (iframes)
15. Violation reports are sent to configured endpoints
16. Default CSP is restrictive following security best practices
**Pass Criteria**: Host-configured CSP is enforced for all content AND violations are reported AND policy cannot be bypassed
**Fail Criteria**: CSP is not enforced OR can be bypassed OR violations are not reported
**Evidence**: CSP configuration code, browser console showing CSP violations, violation report logs, test results demonstrating CSP enforcement, penetration test results
**References**:
- Content Security Policy Level 3: https://www.w3.org/TR/CSP3/
- CSP Best Practices (OWASP): https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html
- Android WebView CSP: https://developer.android.com/reference/android/webkit/WebSettings#setMixedContentMode(int)
- iOS WKWebView CSP Support: https://webkit.org/blog/7929/content-security-policy-for-webkit/
### Assessment: EMB-REQ-14 (Encrypted cross-process bridge)
**Reference**: EMB-REQ-14 - JavaScript bridge communications shall be encrypted when crossing process boundaries
**Given**: A conformant embedded browser with multi-process architecture (EMB-2 or higher)
**Task**: Encrypted cross-process bridge communications protect against local privilege escalation attacks where a malicious process on the same system attempts to intercept or tamper with JavaScript bridge messages passing between the browser process and host application process. Without encryption, attackers with local access could use debugging tools, IPC monitoring utilities, or memory inspection to capture sensitive bridge data including authentication tokens, API parameters, or user data. Message integrity protection prevents tampering attacks, while anti-replay mechanisms prevent attackers from capturing and reusing legitimate bridge messages to perform unauthorized operations.
**Verification**:
1. Identify whether the embedded browser uses a multi-process architecture
2. Verify that JavaScript bridge messages cross process boundaries
3. Analyze inter-process communication (IPC) mechanisms used for bridge messages
4. Verify that IPC channels are encrypted or use secure transport
5. Attempt to intercept bridge messages using debugging tools or IPC monitoring
6. Verify that message integrity is protected (authentication, MACs)
7. Test that replay attacks are prevented (nonces, sequence numbers)
8. Verify that encryption keys are securely managed and rotated
9. Multi-process architecture uses encrypted IPC for bridge messages
10. Bridge messages are not observable in plaintext during IPC
11. Message integrity is cryptographically protected
12. Replay attacks are prevented through anti-replay mechanisms
13. Encryption keys are properly generated and managed
14. IPC interception does not reveal sensitive bridge data
15. Encryption meets current cryptographic standards (AES-256, authenticated encryption)
**Pass Criteria**: Bridge IPC is encrypted AND integrity-protected AND replay-protected when crossing process boundaries
**Fail Criteria**: Plaintext bridge messages observable in IPC OR no integrity protection OR replay attacks possible
**Evidence**: Architecture documentation showing multi-process design, IPC traces showing encrypted messages, code review of encryption implementation, penetration test results, cryptographic audit reports
**References**:
- Chromium Mojo IPC Security: https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md
- Electron IPC Security: https://www.electronjs.org/docs/latest/tutorial/ipc
- NIST SP 800-52: TLS Guidelines: https://csrc.nist.gov/publications/detail/sp/800-52/rev-2/final
- CWE-319: Cleartext Transmission of Sensitive Information: https://cwe.mitre.org/data/definitions/319.html
### Assessment: EMB-REQ-15 (Native UI overlay prevention)
**Reference**: EMB-REQ-15 - Embedded browsers shall prevent web content from triggering native UI overlays or permission prompts that could mislead users
**Given**: A conformant embedded browser (EMB-1 or higher)
**Task**: Native UI overlay prevention protects users from social engineering attacks where malicious web content attempts to display fake permission prompts, system dialogs, or security warnings that appear to originate from the operating system or host application. Without proper controls, attackers can create convincing spoofed UI elements to trick users into granting permissions, entering credentials, or taking dangerous actions. Preventing web content from triggering misleading native UI and ensuring clear origin identification helps users make informed trust decisions and prevents clickjacking attacks that overlay malicious content on top of legitimate security prompts.
**Verification**:
1. Attempt to trigger native UI elements from web content: system dialogs, permission prompts, notifications
2. Verify that all UI elements clearly identify their source (host app vs. web content)
3. Test that web content cannot create UI elements that appear to be from the OS or host app
4. Attempt clickjacking attacks using iframes and native UI
5. Verify that permission prompts clearly show the requesting origin
6. Test that web content cannot programmatically trigger permission prompts in rapid succession
7. Verify that native UI elements cannot be overlaid or obscured by web content
8. Test that fullscreen mode does not hide native UI security indicators
9. Web content cannot trigger misleading native UI elements
10. All UI clearly indicates whether it originates from web content or host/OS
11. Permission prompts show the requesting origin clearly
12. Clickjacking attempts are prevented by UI design
13. Rapid permission prompt abuse is prevented
14. Native security indicators cannot be hidden or spoofed
15. Fullscreen mode maintains critical security UI
16. Users can distinguish web content UI from native UI
**Pass Criteria**: Web content cannot trigger misleading native UI AND all prompts clearly show origin AND security indicators are protected
**Fail Criteria**: Misleading UI can be triggered OR origin is not clear OR security indicators can be hidden
**Evidence**: Screenshots of UI elements showing origin indicators, test results of UI spoofing attempts, clickjacking test results, user study results on UI clarity, security audit reports
**References**:
- OWASP Clickjacking Defense: https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html
- Android UI Security: https://developer.android.com/topic/security/risks/tapjacking
- CWE-1021: Improper Restriction of Rendered UI Layers: https://cwe.mitre.org/data/definitions/1021.html
### Assessment: EMB-REQ-16 (API surface allowlisting over denylisting)
**Reference**: EMB-REQ-16 - Host applications shall implement allowlists for JavaScript bridge API surface rather than denylists
**Given**: A conformant embedded browser with JavaScript bridge (EMB-1 or higher)
**Task**: Allowlist-based API surface control is critical for preventing unauthorized access to internal APIs that were never intended for web content exposure. Denylist approaches are inherently insecure because they require developers to anticipate and block every dangerous API, while inevitably missing newly added functionality or overlooking indirect access paths. With allowlisting, only explicitly registered APIs are accessible, ensuring that refactoring, new feature development, or internal API additions cannot accidentally expand the attack surface. This prevents attackers from discovering and exploiting unintended API endpoints through reflection, code analysis, or brute-force enumeration.
**Verification**:
1. Review the JavaScript bridge implementation to determine if it uses allowlist or denylist approach
2. Verify that only explicitly registered APIs are accessible (allowlist approach)
3. Attempt to discover and call APIs that are not in the allowlist
4. Test that new APIs require explicit registration before becoming accessible
5. Verify that the absence of an API from a denylist does not make it accessible
6. Review code to confirm allowlist-based access control logic
7. Test that reflection or introspection cannot enumerate unlisted APIs
8. Verify that the allowlist is the sole source of truth for API accessibility
9. JavaScript bridge uses allowlist-based access control
10. Only explicitly allowlisted APIs are accessible from web content
11. APIs not in allowlist are not accessible regardless of denylist status
12. New APIs require explicit allowlist registration
13. Denylists (if present) are used only as an additional layer, not primary control
14. Reflection/introspection cannot discover non-allowlisted APIs
15. Code review confirms allowlist-first architecture
16. Security documentation clearly describes allowlist approach
**Pass Criteria**: Allowlist-based access control is implemented AND only allowlisted APIs are accessible AND denylisting is not the primary control
**Fail Criteria**: Denylist-based access control is used as primary mechanism OR non-allowlisted APIs are accessible
**Evidence**: Code review showing allowlist implementation, security architecture documentation, test results showing blocked non-allowlisted API access, API registration procedures
**References**:
- OWASP Access Control: https://cheatsheetseries.owasp.org/cheatsheets/Access_Control_Cheat_Sheet.html
- Allowlist vs Denylist Best Practices: https://owasp.org/www-community/vulnerabilities/Improper_Data_Validation
- CWE-183: Permissive List of Allowed Inputs: https://cwe.mitre.org/data/definitions/183.html
- Electron Context Bridge Allowlisting: https://www.electronjs.org/docs/latest/api/context-bridge
### Assessment: EMB-REQ-17 (Certificate validation for remote content)
**Reference**: EMB-REQ-17 - Embedded browsers shall validate SSL/TLS certificates for all remote content sources with certificate pinning for critical origins
**Given**: A conformant embedded browser loading remote content (EMB-1 or higher)
**Task**: Certificate validation and pinning for remote content protects against man-in-the-middle attacks where attackers intercept network traffic to inject malicious content into the embedded browser. Without proper certificate validation, attackers on compromised networks can present fraudulent certificates to serve malicious JavaScript that exploits bridge APIs or steals sensitive data. Certificate pinning for critical origins provides additional protection against certificate authority compromises and ensures that only the expected server certificates are trusted, preventing sophisticated attacks using rogue or compromised CAs to issue valid but malicious certificates for trusted domains.
**Verification**:
1. Configure the embedded browser to load content from HTTPS origins
2. Attempt to load content from a server with an invalid certificate (expired, self-signed, wrong hostname)
3. Verify that certificate validation errors block content loading
4. Test that user/host cannot bypass certificate errors for critical origins
5. Configure certificate pinning for critical origins used by the application
6. Attempt to use a valid but non-pinned certificate for a pinned origin
7. Verify that pinning violations block content loading and trigger alerts
8. Test that certificate transparency information is validated
9. Verify that pin backups exist to prevent lockout
10. All HTTPS content undergoes full certificate validation
11. Invalid certificates block content loading
12. Certificate errors generate clear error messages and logs
13. Certificate pinning is enforced for configured critical origins
14. Pinning violations prevent content loading and trigger security events
15. Backup pins exist to allow pin rotation without lockout
16. Certificate Transparency validation is performed
17. No user/host bypass options for certificate errors on critical origins
**Pass Criteria**: Full certificate validation is enforced AND certificate pinning works for critical origins AND no bypasses exist for pinned origins
**Fail Criteria**: Certificate validation can be bypassed OR pinning is not enforced OR no backup pins exist
**Evidence**: Certificate validation test results, pinning configuration, test results with invalid certificates, security logs showing validation failures, Certificate Transparency logs
**References**:
- RFC 6797: HTTP Strict Transport Security (HSTS): https://datatracker.ietf.org/doc/html/rfc6797
- OWASP Certificate Pinning: https://owasp.org/www-community/controls/Certificate_and_Public_Key_Pinning
- Android Network Security Config: https://developer.android.com/training/articles/security-config
- iOS App Transport Security: https://developer.apple.com/documentation/security/preventing_insecure_network_connections
- RFC 6962: Certificate Transparency: https://datatracker.ietf.org/doc/html/rfc6962
### Assessment: EMB-REQ-18 (Trusted origin allowlisting)
**Reference**: EMB-REQ-18 - Host applications shall implement allowlists of trusted content origins and reject content from unapproved sources
**Given**: A conformant embedded browser (EMB-1 or higher)
**Task**: Trusted origin allowlisting prevents the embedded browser from loading malicious or untrusted content that could exploit JavaScript bridge APIs or compromise user data. Without origin restrictions, the browser could be tricked into loading attacker-controlled content through phishing links, open redirects, or DNS rebinding attacks. Enforcing a strict allowlist ensures that only vetted, trusted origins can execute in the privileged embedded browser context, preventing attackers from injecting malicious web pages that would have access to sensitive bridge functionality or user information intended only for legitimate application content.
**Verification**:
1. Review the host application's origin allowlist configuration
2. Attempt to load content from allowlisted origins and verify it loads successfully
3. Attempt to load content from non-allowlisted origins and verify it is blocked
4. Test redirect chains that exit allowlisted domains and verify they are blocked
5. Verify that allowlist enforcement applies to main frame, iframes, and XHR/fetch requests
6. Test that URL parameters or fragments cannot be used to bypass allowlist
7. Verify that allowlist configuration is immutable by web content
8. Test that allowlist violations trigger logging and security alerts
9. Origin allowlist is configured and documented
10. Only allowlisted origins can load in the embedded browser
11. Non-allowlisted origins are blocked with appropriate error messages
12. Redirect chains exiting allowlisted domains are blocked
13. Allowlist applies to all resource types and contexts
14. URL manipulation cannot bypass allowlist enforcement
15. Allowlist violations generate security events and logs
16. Users/administrators can configure the allowlist
**Pass Criteria**: Origin allowlist is enforced for all content AND violations are blocked and logged AND allowlist cannot be bypassed
**Fail Criteria**: Non-allowlisted origins can load OR allowlist can be bypassed OR violations not logged
**Evidence**: Origin allowlist configuration, test results with blocked non-allowlisted origins, security logs showing violations, redirect chain test results, penetration test reports
**References**:
- OWASP Content Security Policy: https://owasp.org/www-community/controls/Content_Security_Policy
- Android WebView URL Filtering: https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20android.webkit.WebResourceRequest)
- iOS WKNavigationDelegate: https://developer.apple.com/documentation/webkit/wknavigationdelegate
- CSP frame-ancestors directive: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors
### Assessment: EMB-REQ-19 (Subresource Integrity for external scripts)
**Reference**: EMB-REQ-19 - Embedded browsers shall enforce Subresource Integrity (SRI) for all external scripts loaded by trusted content
**Given**: A conformant embedded browser loading trusted content with external dependencies (EMB-2 or higher)
**Task**: Subresource Integrity enforcement protects against supply chain attacks where compromised CDNs or third-party script providers serve malicious code to embedded browsers. Without SRI, attackers who compromise external script sources can inject malicious JavaScript that would execute with full access to JavaScript bridge APIs and user data. SRI ensures that external scripts match their expected cryptographic hashes, preventing execution of modified or substituted content even if the hosting server is compromised, providing critical defense-in-depth protection for embedded browsers that load resources from external origins.
**Verification**:
1. Configure trusted content pages to load external scripts from CDNs
2. Add SRI integrity attributes to script tags: `<script src="..." integrity="sha384-..." crossorigin="anonymous">`
3. Verify that scripts with correct integrity hashes load successfully
4. Modify the external script content and verify that integrity validation fails and blocks execution
5. Attempt to load scripts without integrity attributes from external origins and verify policy enforcement
6. Test that integrity validation applies to CSS, scripts, and other subresources
7. Verify that SRI failures trigger console errors and CSP violation reports
8. Test that the host application can enforce SRI policy via CSP require-sri-for directive
9. SRI integrity checking is enforced for external scripts
10. Scripts with correct integrity hashes load and execute
11. Scripts with incorrect or missing hashes are blocked per policy
12. SRI violations generate console errors and logs
13. SRI applies to scripts, stylesheets, and other subresources
14. Host application can mandate SRI via CSP policy
15. Cryptographic hash algorithms used are secure (SHA-384, SHA-512)
**Pass Criteria**: SRI is enforced for external scripts AND integrity violations block resource loading AND policy can be mandated by host
**Fail Criteria**: SRI is not enforced OR can be bypassed OR weak hash algorithms are accepted
**Evidence**: HTML source showing SRI attributes, browser console showing integrity check results, test results with modified scripts, CSP headers mandating SRI, security logs
**References**:
- Subresource Integrity specification: https://www.w3.org/TR/SRI/
- SRI Best Practices (MDN): https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
- CSP require-sri-for: https://www.w3.org/TR/CSP3/#directive-require-sri-for
- OWASP Secure Headers Project: https://owasp.org/www-project-secure-headers/
### Assessment: EMB-REQ-20 (Certificate pinning with backup pins)
**Reference**: EMB-REQ-20 - Certificate pinning configurations shall include backup pins and pin rotation mechanisms to prevent lockout
**Given**: A conformant embedded browser with certificate pinning (EMB-2 or higher)
**Task**: Backup pins and pin rotation mechanisms are essential to prevent application lockout scenarios where certificate rotation or CA changes leave deployed applications unable to connect to pinned origins. Without backup pins, a single certificate expiration or key compromise could render all deployed applications non-functional until users install updates. Proper pin management with backup pins and documented rotation procedures ensures that certificate pinning provides strong security against MITM attacks while maintaining operational resilience, preventing scenarios where security controls inadvertently cause widespread application failures that force emergency unpinning and reduce overall security posture.
**Verification**:
1. Review certificate pinning configuration for all pinned origins
2. Verify that at least one backup pin exists for each pinned origin
3. Test that the primary pin is enforced correctly
4. Simulate primary certificate rotation and verify backup pin is accepted
5. Verify that pin rotation procedures are documented
6. Test that pin expiration dates are configured appropriately (not too distant future)
7. Verify that pin updates can be delivered to deployed applications
8. Test fallback behavior when all pins fail (should block, not fall back to unpinned)
9. Each pinned origin has at least one backup pin configured
10. Primary and backup pins are both enforced correctly
11. Certificate rotation can occur using backup pins without lockout
12. Pin rotation procedures are documented and tested
13. Pin expiration/rotation schedules are reasonable
14. Pin updates can be delivered via app updates or dynamic configuration
15. Total pin failure blocks connections rather than falling back to no pinning
16. Pins include Subject Public Key Info (SPKI) hashes, not just certificates
**Pass Criteria**: Backup pins exist for all pinned origins AND pin rotation is supported AND lockout scenarios are prevented
**Fail Criteria**: No backup pins exist OR pin rotation is not supported OR lockout is possible OR insecure fallback behavior
**Evidence**: Certificate pinning configuration files, pin backup documentation, pin rotation test results, pin expiration monitoring, security architecture documentation
**References**:
- OWASP Certificate Pinning Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Pinning_Cheat_Sheet.html
- RFC 7469: Public Key Pinning Extension for HTTP: https://datatracker.ietf.org/doc/html/rfc7469
- Android Network Security Config - Pin Backup: https://developer.android.com/training/articles/security-config#CertificatePinning
- iOS Certificate Pinning Best Practices: https://developer.apple.com/news/?id=g9ejcf8y
### Assessment: EMB-REQ-21 (Mixed content prevention)
**Reference**: EMB-REQ-21 - Embedded browsers shall prevent mixed content (HTTPS pages loading HTTP resources) in all configurations
**Given**: A conformant embedded browser (EMB-1 or higher)
**Task**: Mixed content prevention protects against downgrade attacks where attackers intercept insecure HTTP resources loaded by HTTPS pages to inject malicious code or steal sensitive data. Even a single HTTP script loaded by an HTTPS page undermines the entire security model, allowing network attackers to execute arbitrary JavaScript with full access to the page's privileges and JavaScript bridge APIs. Blocking mixed content ensures that the security guarantees of HTTPS connections cannot be bypassed through insecure subresources, preventing attackers from using unencrypted channels to compromise otherwise secure embedded browser sessions.
**Verification**:
1. Load an HTTPS page in the embedded browser
2. Attempt to load HTTP subresources from the HTTPS page: images, scripts, stylesheets, XHR, fetch
3. Verify that passive mixed content (images, media) is blocked or triggers warnings
4. Verify that active mixed content (scripts, stylesheets, iframes) is always blocked
5. Test that mixed content blocking cannot be disabled by web content
6. Verify that host application cannot weaken mixed content protection
7. Test that browser console shows clear mixed content errors
8. Verify that CSP upgrade-insecure-requests directive is supported
9. Active mixed content is always blocked
10. Passive mixed content is blocked or triggers prominent warnings
11. Mixed content errors appear in browser console with details
12. Web content cannot disable mixed content protection
13. Host application cannot weaken mixed content blocking
14. upgrade-insecure-requests CSP directive automatically upgrades HTTP to HTTPS
15. No configuration option exists to allow mixed content on HTTPS pages
**Pass Criteria**: Active mixed content is always blocked AND passive mixed content protection is enforced AND cannot be disabled
**Fail Criteria**: Mixed content loads successfully OR protection can be disabled OR insufficient warnings
**Evidence**: Browser console showing mixed content errors, test results with blocked HTTP resources, CSP header analysis, security configuration review, network traffic captures
**References**:
- W3C Mixed Content specification: https://www.w3.org/TR/mixed-content/
- Mixed Content (MDN): https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content
- CSP upgrade-insecure-requests: https://www.w3.org/TR/upgrade-insecure-requests/
- Chromium Mixed Content Policy: https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins
### Assessment: EMB-REQ-22 (Trust decision logging)
**Reference**: EMB-REQ-22 - Trust decisions shall be logged with sufficient detail to detect trust boundary violations
**Given**: A conformant embedded browser with trust management (EMB-1 or higher)
**Task**: Trust decision logging is critical for detecting and investigating attacks that attempt to cross trust boundaries in embedded browsers, such as untrusted origins trying to access privileged JavaScript bridge APIs or certificate validation bypasses. Without comprehensive logging of trust decisions, security teams cannot identify patterns of attack attempts, investigate security incidents, or detect compromised trusted origins that begin exhibiting suspicious behavior. Detailed trust logs enable security monitoring systems to flag anomalies like repeated origin allowlist violations, certificate pinning failures, or unusual patterns of bridge API access that may indicate reconnaissance or active exploitation attempts.
**Verification**:
1. Configure logging for trust-related decisions in the embedded browser
2. Load content from trusted and untrusted origins
3. Review logs and verify they contain: origin, timestamp, trust decision outcome, reason for decision
4. Attempt trust boundary violations (untrusted origin accessing privileged APIs)
5. Verify that violations are logged with full context
6. Test that certificate validation decisions are logged
7. Verify that origin allowlist enforcement is logged
8. Test that logs are stored securely and cannot be tampered with by web content
9. Verify log retention policies for security-relevant events
10. All trust decisions are logged with sufficient detail
11. Logs include origin, timestamp, decision, and rationale
12. Trust boundary violations are logged with full context
13. Certificate validation results are logged
14. Origin allowlist enforcement is logged
15. Logs are protected from tampering
16. Log retention balances security needs and privacy
17. Logs are accessible for security monitoring and incident response
**Pass Criteria**: All trust decisions are logged with sufficient detail AND violations are logged AND logs are tamper-protected
**Fail Criteria**: Trust decisions are not logged OR insufficient detail OR logs can be tampered with
**Evidence**: Log samples showing trust decisions, log configuration documentation, test results showing violation logging, log integrity verification, log retention policy documentation
**References**:
- OWASP Logging Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html
- NIST SP 800-92: Guide to Computer Security Log Management: https://csrc.nist.gov/publications/detail/sp/800-92/final
- CWE-778: Insufficient Logging: https://cwe.mitre.org/data/definitions/778.html
### Assessment: EMB-REQ-23 (Cryptographic signature verification for local content)
**Reference**: EMB-REQ-23 - Embedded browsers loading local/bundled content shall verify cryptographic signatures before execution
**Given**: A conformant embedded browser loading bundled/local content (EMB-2 or higher)
**Task**: Cryptographic signature verification for local content protects against tampering attacks where attackers with file system access attempt to modify bundled HTML, JavaScript, or CSS files to inject malicious code. Without signature verification, local privilege escalation or compromised backup/restore processes could allow attackers to silently modify embedded browser content that executes with full JavaScript bridge API access. Digital signatures ensure content integrity from build time through deployment, detecting any unauthorized modifications and preventing execution of tampered local resources that could otherwise compromise the entire host application through bridge exploitation.
**Verification**:
1. Identify local/bundled content loaded by the embedded browser (HTML, JS, CSS files)
2. Verify that all bundled content is cryptographically signed
3. Review signature verification implementation in the browser initialization code
4. Attempt to modify bundled content and verify that signature verification fails
5. Test that signature verification failures prevent content loading
6. Verify that signature verification uses secure algorithms (RSA-2048+, ECDSA P-256+)
7. Test that signature verification cannot be bypassed or disabled
8. Verify that signing keys are properly protected in the host application
9. All local/bundled content has cryptographic signatures
10. Signature verification occurs before content execution
11. Modified content fails signature verification
12. Signature verification failures block content loading
13. Secure signature algorithms are used
14. Signature verification cannot be bypassed
15. Signing keys are protected from extraction
16. Verification process is logged
**Pass Criteria**: All local content is signed AND signatures are verified before execution AND verification cannot be bypassed
**Fail Criteria**: Unsigned content can be loaded OR signature verification is bypassable OR weak signature algorithms
**Evidence**: Signed content bundles, signature verification code review, test results with modified content, cryptographic algorithm analysis, key protection documentation
**References**:
- Code Signing Best Practices (NIST): https://csrc.nist.gov/publications/detail/sp/800-183/final
- Android APK Signature Scheme: https://source.android.com/docs/security/features/apksigning
- Authenticode for Windows: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/authenticode
### Assessment: EMB-REQ-24 (Redirect chain trust enforcement)
**Reference**: EMB-REQ-24 - Host applications shall implement mechanisms to detect and prevent redirect chains that exit trusted domains
**Given**: A conformant embedded browser with origin allowlist (EMB-1 or higher)
**Task**: Redirect chain trust enforcement prevents open redirect attacks where trusted origins inadvertently redirect to attacker-controlled domains, potentially exposing JavaScript bridge APIs to malicious content. Without redirect validation, attackers can exploit legitimate redirects on trusted sites to bypass origin allowlists, tricking the embedded browser into loading malicious content that appears to come from a trusted source. Multi-hop redirect chains are particularly dangerous because each hop in the chain could be manipulated to eventually land on an untrusted domain, requiring comprehensive validation of the entire redirect path to prevent trust boundary violations.
**Verification**:
1. Configure trusted origin allowlist in the embedded browser
2. Load a page from a trusted origin that redirects to another trusted origin
3. Verify that trusted-to-trusted redirects are allowed
4. Load a page from a trusted origin that redirects to an untrusted origin
5. Verify that trusted-to-untrusted redirects are blocked
6. Test multi-hop redirect chains: trusted → trusted → untrusted
7. Verify that all redirects in the chain are validated against allowlist
8. Test that redirect blocking triggers security logging
9. Verify that JavaScript-based redirects are also subject to trust enforcement
10. Redirect chain validation is enforced
11. Trusted-to-trusted redirects are allowed
12. Any redirect to untrusted origin is blocked
13. Multi-hop redirect chains are fully validated
14. Both HTTP and JavaScript redirects are subject to enforcement
15. Blocked redirects trigger error pages and security logs
16. Users are notified when redirects are blocked
17. No bypass mechanism exists for redirect enforcement
**Pass Criteria**: Redirect chains are fully validated AND untrusted redirects are blocked AND enforcement covers all redirect types
**Fail Criteria**: Redirects to untrusted origins succeed OR JavaScript redirects bypass enforcement OR multi-hop validation is incomplete
**Evidence**: Redirect test results, browser console showing blocked redirects, security logs, network traffic captures showing redirect chains, error page screenshots
**References**:
- OWASP Open Redirect: https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html
- CWE-601: URL Redirection to Untrusted Site: https://cwe.mitre.org/data/definitions/601.html
- Android WebView shouldOverrideUrlLoading: https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20android.webkit.WebResourceRequest)
- iOS WKNavigationDelegate decidePolicyFor: https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview
### Assessment: EMB-REQ-25 (HSTS enforcement for trusted origins)
**Reference**: EMB-REQ-25 - Embedded browsers shall enforce strict transport security (HSTS) for all trusted content origins
**Given**: A conformant embedded browser (EMB-1 or higher)
**Task**: HSTS enforcement for trusted origins protects against SSL stripping attacks where network attackers intercept initial HTTP requests and prevent upgrade to HTTPS, allowing interception of all subsequent traffic. Without HSTS, embedded browsers are vulnerable during the brief window between application launch and the first HTTPS connection, when attackers can downgrade connections to HTTP and conduct man-in-the-middle attacks. HSTS ensures that all connections to trusted origins use HTTPS, with non-bypassable certificate validation, preventing network-level attackers from intercepting or modifying content loaded by the embedded browser even on compromised networks.
**Verification**:
1. Configure trusted content origins with HSTS headers: `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
2. Make initial HTTPS request to trusted origin and verify HSTS header is received and cached
3. Attempt to make HTTP request to same origin and verify automatic upgrade to HTTPS
4. Test that HSTS enforcement continues after browser restart (persistence)
5. Verify that HSTS includeSubDomains flag is respected for subdomains
6. Test that HSTS preload list is supported and enforced
7. Attempt to bypass HSTS through direct IP access or hosts file manipulation
8. Verify that certificate errors on HSTS hosts cannot be bypassed
9. HSTS headers are parsed and cached correctly
10. HTTP requests to HSTS hosts are automatically upgraded to HTTPS
11. HSTS state persists across browser sessions
12. includeSubDomains flag applies to all subdomains
13. HSTS preload list is maintained and enforced
14. HSTS cannot be bypassed through IP access or other means
15. Certificate errors on HSTS hosts are non-bypassable
16. HSTS enforcement is logged
**Pass Criteria**: HSTS is enforced for all trusted origins AND HTTP is automatically upgraded AND certificate errors are non-bypassable
**Fail Criteria**: HSTS can be bypassed OR HTTP connections succeed to HSTS hosts OR certificate errors are bypassable
**Evidence**: Network traffic captures showing HTTPS upgrades, HSTS cache inspection, test results with HTTP requests, certificate error bypass attempts, HSTS preload list verification
**References**:
- RFC 6797: HTTP Strict Transport Security (HSTS): https://datatracker.ietf.org/doc/html/rfc6797
- HSTS Preload List: https://hstspreload.org/
- OWASP HSTS: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Strict_Transport_Security_Cheat_Sheet.html
- Chromium HSTS Implementation: https://www.chromium.org/hsts
### Assessment: EMB-REQ-26 (Certificate validation failure notification)
**Reference**: EMB-REQ-26 - Certificate validation failures for trusted content sources shall trigger immediate user notification and content blocking
**Given**: A conformant embedded browser loading trusted remote content (EMB-1 or higher)
**Task**: Immediate notification and blocking on certificate validation failures for trusted content prevents silent man-in-the-middle attacks where users unknowingly interact with compromised content. Without clear error notifications and strict blocking, users might not realize that certificate validation has failed, allowing attackers to serve malicious content that appears to come from trusted origins. Non-bypassable certificate error handling for trusted origins ensures that even sophisticated attacks using fraudulent certificates cannot trick the embedded browser into loading untrusted content, protecting the integrity of the JavaScript bridge API access model.
**Verification**:
1. Configure trusted content origins with valid certificates
2. Simulate certificate validation failures: expired certificate, hostname mismatch, untrusted CA, revoked certificate
3. Verify that each failure type triggers immediate error notification
4. Verify that content loading is completely blocked (no partial loading)
5. Test that error notifications clearly explain the problem to users
6. Verify that no "continue anyway" option exists for trusted origin failures
7. Test that certificate failures are logged to security event log
8. Verify that host application is notified of certificate failures via callback
9. Certificate validation failures are detected for all failure types
10. User receives immediate, clear error notification
11. Content loading is completely blocked on validation failure
12. Error messages explain the specific certificate problem
13. No bypass mechanism exists for certificate errors on trusted origins
14. Certificate failures are logged with full details
15. Host application can register for certificate failure callbacks
16. Failure handling differs for trusted vs. untrusted origins
**Pass Criteria**: All certificate failures block content AND trigger immediate user notification AND are non-bypassable for trusted origins
**Fail Criteria**: Any certificate failure allows content loading OR notifications are missing/unclear OR bypass options exist
**Evidence**: Error page screenshots, certificate failure logs, test results with various failure types, user notification interface documentation, host callback implementation
**References**:
- RFC 5280: Certificate Validation: https://datatracker.ietf.org/doc/html/rfc5280
- CA/Browser Forum Baseline Requirements: https://cabforum.org/baseline-requirements-documents/
- Android WebView onReceivedSslError: https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedSslError(android.webkit.WebView,%20android.webkit.SslErrorHandler,%20android.net.http.SslError)
- iOS WKNavigationDelegate didReceive challenge: https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview
### Assessment: EMB-REQ-27 (Network security configuration)
**Reference**: EMB-REQ-27 - Host applications shall implement network security configurations that prevent cleartext traffic to trusted domains
**Given**: A conformant embedded browser (EMB-1 or higher)
**Task**:
1. Review network security configuration for the embedded browser (Android Network Security Config, iOS App Transport Security, or equivalent)
2. Verify that cleartext HTTP traffic is disabled for trusted domains
3. Attempt to make HTTP requests to trusted domains and verify they are blocked
4. Test that HTTPS-only enforcement cannot be disabled at runtime
5. Verify that network security configuration applies to all network APIs (WebView, XHR, fetch, WebSocket)
6. Test that certificate pinning configuration is integrated with network security config
7. Verify that configuration is declarative and cannot be modified by web content
8. Test that cleartext traffic blocking is logged
**Verification**:
- Network security configuration enforces HTTPS-only for trusted domains
- Cleartext HTTP traffic is blocked at the network layer
- HTTPS enforcement applies to all network APIs uniformly
- Configuration is declarative and immutable at runtime
- Certificate pinning is integrated into network security config
- Blocked cleartext traffic is logged
- Configuration is documented and auditable
- Platform-specific security features are properly utilized (NSConfig, ATS)
**Pass Criteria**: Cleartext traffic to trusted domains is blocked at network layer AND configuration is immutable AND applies to all network APIs
**Fail Criteria**: Cleartext traffic succeeds to trusted domains OR configuration can be modified OR inconsistent enforcement across APIs
**Evidence**: Network security configuration files, network traffic captures showing blocked HTTP, test results with various network APIs, configuration documentation, platform security feature usage audit
**References**:
- Android Network Security Configuration: https://developer.android.com/training/articles/security-config
- iOS App Transport Security: https://developer.apple.com/documentation/security/preventing_insecure_network_connections
- CWE-319: Cleartext Transmission of Sensitive Information: https://cwe.mitre.org/data/definitions/319.html
### Assessment: EMB-REQ-28 (CSP enforcement for third-party content)
**Reference**: EMB-REQ-28 - Embedded browsers shall prevent trusted content from loading untrusted third-party content without explicit CSP declarations
**Given**: A conformant embedded browser with CSP support (EMB-1 or higher)
**Task**:
1. Configure trusted content page with restrictive CSP that allows only specific third-party domains
2. Attempt to load third-party content from CSP-allowed domains and verify success
3. Attempt to load third-party content from non-allowed domains and verify blocking
4. Test that inline scripts from third-party content are blocked unless allowed by CSP
5. Verify that CSP applies to all third-party resource types (scripts, styles, images, frames)
6. Test that CSP violations are reported via report-uri or report-to
7. Verify that web content cannot weaken or disable CSP policy
8. Test that host-configured CSP takes precedence over page-specified CSP
**Verification**:
- CSP restricts third-party content loading to explicitly allowed domains
- Non-allowed third-party content is blocked
- CSP applies consistently across all resource types
- CSP violations generate reports to configured endpoint
- Web content cannot bypass or weaken CSP restrictions
- Host-configured CSP cannot be overridden by page CSP
- CSP enforcement is logged
- Default CSP policy is restrictive (deny by default)
**Pass Criteria**: Third-party content loading is restricted by CSP AND violations are blocked and reported AND policy cannot be weakened by web content
**Fail Criteria**: Third-party content bypasses CSP OR policy can be weakened OR violations not reported
**Evidence**: CSP policy headers, browser console showing CSP violations, violation reports, test results with blocked third-party content, network traffic analysis
**References**:
- Content Security Policy Level 3: https://www.w3.org/TR/CSP3/
- CSP script-src directive: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
- CSP Reporting: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#reporting
- OWASP CSP Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html
### Assessment: EMB-REQ-29 (Per-instance trust policies)
**Reference**: EMB-REQ-29 - Trust policies shall be configurable per embedded browser instance to support multi-tenant applications
**Given**: A conformant embedded browser supporting multiple instances (EMB-2 or higher)
**Task**:
1. Create multiple embedded browser instances within the same host application
2. Configure different trust policies for each instance: different origin allowlists, different certificate pins, different CSP policies
3. Load content in each instance and verify that instance-specific policies are enforced
4. Verify that instances cannot access each other's storage or state
5. Test that trust policy configuration is isolated per instance
6. Attempt to modify one instance's trust policy from another instance
7. Verify that instance destruction cleans up trust policy state
8. Test that host application can dynamically create instances with custom policies
**Verification**:
- Trust policies can be configured independently per instance
- Each instance enforces its own trust policy correctly
- Instances are isolated from each other (no cross-instance access)
- Trust policy configuration is scoped to individual instances
- Instance creation accepts custom policy configuration
- Instance destruction cleans up policy state
- No interference between instances' trust enforcement
- Multi-tenant scenarios are properly supported
**Pass Criteria**: Per-instance trust policies are supported AND enforced correctly AND instances are isolated from each other
**Fail Criteria**: Policies cannot be configured per-instance OR instances interfere with each other OR policy isolation is broken
**Evidence**: Code showing per-instance policy configuration, test results with multiple instances, storage isolation verification, policy enforcement logs per instance, multi-tenant test scenarios
**References**:
- Android WebView Multiple Instances: https://developer.android.com/reference/android/webkit/WebView
- iOS WKWebView Configuration: https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
- Electron BrowserView Isolation: https://www.electronjs.org/docs/latest/api/browser-view
- Multi-tenancy Security Best Practices: https://owasp.org/www-project-application-security-verification-standard/
### Assessment: EMB-REQ-30 (Certificate Transparency verification)
**Reference**: EMB-REQ-30 - Embedded browsers shall implement certificate transparency verification for trusted content origins
**Given**: A conformant embedded browser with Certificate Transparency support (EMB-2 or higher)
**Task**:
1. Configure trusted content origins that require Certificate Transparency
2. Load content from origins with valid SCTs (Signed Certificate Timestamps) in certificates or via TLS extension
3. Verify that content loads successfully when valid SCTs are present
4. Attempt to load content with certificates lacking SCTs from CT-required origins
5. Verify that missing or invalid SCTs block content loading for CT-required origins
6. Test that SCTs are validated against known CT logs
7. Verify that CT enforcement can be configured per-origin or globally
8. Test that CT validation failures are logged
**Verification**:
- Certificate Transparency verification is supported
- Valid SCTs allow content loading from CT-required origins
- Missing or invalid SCTs block content loading
- SCTs are validated against known CT logs
- CT enforcement policy is configurable (per-origin or global)
- CT validation failures generate clear error messages and logs
- CT log list is kept up-to-date
- CT enforcement integrates with certificate validation flow
**Pass Criteria**: CT verification is implemented AND enforced for configured origins AND invalid SCTs block content loading
**Fail Criteria**: CT verification not implemented OR can be bypassed OR invalid SCTs are accepted
**Evidence**: Network traffic captures showing SCTs, CT validation logs, test results with missing SCTs, CT log list version verification, CT enforcement configuration
**References**:
- RFC 6962: Certificate Transparency: https://datatracker.ietf.org/doc/html/rfc6962
- Chromium CT Policy: https://www.chromium.org/Home/chromium-security/certificate-transparency/
- Certificate Transparency Logs: https://www.certificate-transparency.org/
- Google CT Policy: https://github.com/GoogleChrome/CertificateTransparency/blob/master/ct_policy.md
### Assessment: EMB-REQ-31 (DNS rebinding attack prevention)
**Reference**: EMB-REQ-31 - Host applications shall detect and prevent DNS rebinding attacks targeting trusted local/internal origins
**Given**: A conformant embedded browser with local/internal origin access (EMB-2 or higher)
**Task**: