Skip to content
EN-304-617.md.backup 1.17 MiB
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
20. Warning language calibrated to user understanding level

**Pass Criteria**: Privileged APIs show security warnings AND warnings explain specific risks AND visual distinction from normal prompts AND explicit acknowledgment required

**Fail Criteria**: No warnings shown OR warnings lack risk details OR warnings visually identical to normal prompts OR easy bypass available

**Evidence**: Permission prompt screenshots with security warnings, warning text analysis, user interaction flow documentation, bypass attempt testing, warning frequency verification

**References**:

- Security Warning Design: https://www.usenix.org/conference/soups2019/presentation/reeder
- Effective Permission Prompts: https://web.dev/permission-ux/
- User Security Indicators: https://www.w3.org/TR/security-privacy-questionnaire/

### Assessment: SYS-REQ-44 (Extended system access audit logging at SYS-3)

**Reference**: SYS-REQ-44 - Browser shall log all extended system access for security auditing at SYS-3 capability level

**Given**: A conformant browser with SYS-3 capability (native-equivalent system access)

**Task**: Native-equivalent system access at SYS-3 creates significant security risk requiring comprehensive audit logging for attack detection, forensic investigation, compliance verification, and insider threat monitoring. Without detailed logs capturing filesystem access, device interactions, API usage patterns, and permission changes, organizations cannot detect data exfiltration, identify compromised applications, investigate security incidents, or meet regulatory audit requirements. Tamper-resistant logs with complete metadata enable security visibility and accountability.

**Verification**:

1. Enable or verify audit logging is active for SYS-3 capability level
2. Grant filesystem access to a web application and access multiple files
3. Review audit logs and verify they contain entries for each file access with path, operation, timestamp
4. Connect and communicate with a USB device through WebUSB
5. Verify logs capture device connection, data transfer, and disconnection events
6. Open serial port connection and transmit data
7. Confirm logs document serial port access, configuration, and data transmission
8. Revoke a permission through browser settings
9. Verify permission revocation logged with timestamp, origin, and permission type
10. Test that logs include complete metadata: timestamp, origin, API, resource, operation, result, user context
11. All filesystem operations logged with paths
12. USB device interactions logged comprehensively
13. Serial port access and data transmission recorded
14. Permission changes logged with full context
15. Logs include complete metadata for each event
16. Log entries are timestamped with high precision
17. Logs protected from tampering or deletion
18. Enterprise administrators can export logs
19. Log retention meets security and compliance needs
20. Logs integrate with SIEM and security monitoring tools

**Pass Criteria**: All extended system access logged AND logs include complete metadata AND tamper protection enforced AND enterprise export available

**Fail Criteria**: System access not logged OR logs lack critical metadata OR logs can be tampered with OR no export capability

**Evidence**: Audit log exports showing system access events, log completeness verification, tamper protection testing, SIEM integration demonstration, retention policy documentation

**References**:

- Security Audit Logging: https://csrc.nist.gov/publications/detail/sp/800-92/final
- Browser Security Logs: https://chromium.googlesource.com/chromium/src/+/master/docs/security/audit-logging.md
- SIEM Integration: https://owasp.org/www-community/Log_Injection

### Assessment: SYS-REQ-45 (User permission review and revocation at SYS-3)

**Reference**: SYS-REQ-45 - Users shall be able to review and revoke all system permissions at SYS-3 capability level

**Given**: A conformant browser with SYS-3 capability (native-equivalent system access)

**Task**: Users must have complete visibility and control over all granted system permissions to manage their security posture, respond to threats, and maintain privacy. Without comprehensive permission review and revocation interfaces, users cannot identify over-privileged applications, remove access from compromised sites, or recover from accidental permission grants. Centralized permission management with per-origin listings, granular revocation, usage visibility, and immediate enforcement enables user control and security hygiene.

**Verification**:

1. Grant multiple system permissions (filesystem, USB, serial, notifications) to various web origins
2. Navigate to browser permission management interface
3. Verify interface displays all granted permissions organized by origin and permission type
4. Test that interface clearly identifies high-privilege permissions (filesystem, device access)
5. Select a permission and revoke it through the management interface
6. Immediately test that the web application can no longer access the revoked resource
7. Verify error or permission denial shown to application after revocation
8. Test bulk revocation of all permissions for a specific origin
9. Confirm all permissions removed and application loses all system access
10. Verify permission management UI shows usage history for each permission
11. All granted permissions visible in management UI
12. Permissions organized by origin and type
13. High-privilege permissions clearly marked
14. Individual permission revocation functional
15. Revocation takes effect immediately
16. Applications receive permission denial after revocation
17. Bulk revocation available per origin
18. Usage history shown for each permission
19. No hidden or unrevocable permissions exist
20. Interface accessible and user-friendly

**Pass Criteria**: All permissions visible in management UI AND individual revocation functional AND immediate enforcement AND usage history available

**Fail Criteria**: Permissions not listed OR revocation doesn't work OR delayed enforcement OR no usage visibility

**Evidence**: Permission management UI screenshots, revocation testing showing immediate effect, usage history exports, bulk revocation verification, hidden permission audit

**References**:

- Permissions API: https://www.w3.org/TR/permissions/
- Permission Management UX: https://web.dev/permission-ux/
- Browser Privacy Controls: https://www.w3.org/TR/privacy-controls/

### Assessment: SYS-REQ-46 (Enterprise restriction of native-equivalent features at SYS-3)

**Reference**: SYS-REQ-46 - Enterprise administrators shall be able to restrict native-equivalent features at SYS-3 capability level

**Given**: A conformant browser with SYS-3 capability supporting native-equivalent system access and enterprise policy management

**Task**: Enterprise environments require centralized control to restrict native-equivalent features that pose unacceptable risk to organizational security, intellectual property, or compliance requirements. Without enterprise policy controls, users at SYS-3 can grant unrestricted filesystem access, device control, or system integration to web applications, enabling data exfiltration, malware installation, or regulatory violations. Group policy integration with capability blocking, origin restrictions, and forced denials enables IT security governance.

**Verification**:

1. Access enterprise policy configuration interface (Group Policy, MDM, policy JSON)
2. Configure policy to block File System Access API organization-wide
3. Attempt to use File System Access API as user and verify policy blocks access with clear error
4. Configure policy to allow WebUSB only for specific allowlisted origins
5. Test WebUSB from non-allowlisted origin and verify policy denies access
6. Test WebUSB from allowlisted origin and verify it functions
7. Configure policy to completely disable Serial API
8. Attempt serial port access and verify it is blocked by policy
9. Configure policy requiring administrator approval for any SYS-3 capability grants
10. Test that user permission grants require admin authorization workflow
11. File System Access API blocked by policy
12. Policy blocks API with clear error message
13. WebUSB restricted to allowlisted origins
14. Non-allowlisted origins denied device access
15. Allowlisted origins function normally
16. Serial API completely disabled by policy
17. Administrator approval workflow enforced
18. Users cannot bypass policy restrictions
19. Policy violations logged to enterprise monitoring
20. Policies centrally managed and enforced

**Pass Criteria**: Enterprise policies block native-equivalent features AND origin allowlists enforced AND administrator approval available AND policy violations logged

**Fail Criteria**: Policies not enforced OR users bypass restrictions OR allowlists ignored OR no violation logging

**Evidence**: Policy configuration documentation, API blocking verification, origin allowlist testing, admin approval workflow demonstration, policy bypass attempt results, violation logs

**References**:

- Chrome Enterprise Policies: https://chromeenterprise.google/policies/
- Firefox Enterprise Policies: https://github.com/mozilla/policy-templates
- Microsoft Edge Policies: https://docs.microsoft.com/en-us/deployedge/microsoft-edge-policies
- Enterprise Browser Management: https://www.chromium.org/administrators/

### Assessment: SYS-REQ-47 (Native integration audit documentation at SYS-3)

**Reference**: SYS-REQ-47 - All native integration exceptions shall be documented and auditable at SYS-3 capability level

**Given**: A conformant browser with SYS-3 capability (native-equivalent system access)

**Task**: Native integration exceptions that deviate from standard web security model must be comprehensively documented to enable security review, vulnerability assessment, compliance auditing, and risk management. Without documentation of security boundaries relaxed, APIs exposed beyond web standards, or sandbox exceptions granted, security teams cannot assess risk posture, auditors cannot verify compliance, and developers cannot understand security implications. Architecture documentation with threat models, exception justifications, and mitigation controls enables informed security governance.

**Verification**:

1. Review browser security documentation to identify documented native integration exceptions
2. Verify documentation explains each exception's purpose, risks, and mitigations
3. Confirm documentation includes threat model for native-equivalent API surface
4. Review code comments and design documents for File System Access API implementation
5. Verify implementation matches documented security model and exception handling
6. Test that browser provides runtime information about active native integration (developer tools, about:security)
7. Verify enterprise administrators can access detailed documentation of native features
8. Review security audit logs and confirm they align with documented native integration behavior
9. Test that documented exceptions are the only ones present (no undocumented backdoors)
10. Verify documentation is maintained and updated with browser releases
11. Native integration exceptions fully documented
12. Documentation explains purpose, risks, and mitigations
13. Threat models available for native APIs
14. Implementation aligns with documentation
15. Runtime information available about active integration
16. Enterprise admin documentation comprehensive
17. Audit logs align with documented behavior
18. No undocumented exceptions exist
19. Documentation kept current with releases
20. Security review process documented

**Pass Criteria**: All exceptions documented AND documentation includes threat models AND implementation matches documentation AND no undocumented exceptions

**Fail Criteria**: Exceptions not documented OR no threat models OR implementation deviates OR undocumented exceptions found

**Evidence**: Security documentation review, threat model analysis, code implementation verification, runtime security interface examination, audit log alignment testing, exception enumeration

**References**:

- Secure Development Lifecycle: https://www.microsoft.com/en-us/securityengineering/sdl/
- Threat Modeling: https://owasp.org/www-community/Threat_Modeling
- Security Documentation: https://cheatsheetseries.owasp.org/cheatsheets/Security_Documentation_Checklist.html

## 6.8 Embedded Browser Security Assessments

This section covers assessment procedures for requirements EMB-REQ-1 through EMB-REQ-32, addressing the unique security challenges of embedded browsers (WebView components, browser engines integrated into native applications). These assessments focus on JavaScript bridge security, native API exposure control, content source trust management, and host application boundary protection.

### Assessment: EMB-REQ-1 (JavaScript bridge API allowlists)

**Reference**: EMB-REQ-1 - JavaScript bridges shall implement explicit allowlists of exposed native APIs with per-API access controls

**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-1 or higher)

**Task**: JavaScript bridges expose native device APIs to web content, creating critical attack surfaces where unrestricted API exposure enables privilege escalation, data exfiltration, malware installation, and complete device compromise. Without explicit allowlists, malicious web content can invoke any native API through reflection or dynamic invocation. Explicit API allowlisting with per-API access controls, runtime immutability, reflection blocking, and comprehensive logging prevents bridge-based attacks while enabling controlled native functionality.

**Verification**:

1. Review the embedded browser's JavaScript bridge configuration and implementation code
2. Identify all native APIs exposed to web content through the JavaScript bridge
3. Verify that an explicit allowlist mechanism exists (configuration file, API declaration, or programmatic registration)
4. Attempt to call native APIs that are not in the allowlist from web content
5. Verify that per-API access controls exist (e.g., origin-based restrictions, permission requirements)
6. Test that the allowlist cannot be modified by web content at runtime
7. Attempt to use reflection or dynamic invocation to bypass the allowlist
8. Verify that the bridge logs all API access attempts including denied attempts
9. JavaScript bridge exposes only explicitly allowlisted native APIs
10. Configuration files or code clearly declare which APIs are accessible
11. Per-API access controls restrict which origins or contexts can call each API
12. Attempts to call non-allowlisted APIs result in errors or exceptions
13. Web content cannot modify the API allowlist at runtime
14. Reflection or dynamic method invocation does not bypass allowlist enforcement
15. All API access attempts are logged for security auditing

**Pass Criteria**: Only explicitly allowlisted APIs are callable from web content AND per-API access controls are enforced AND allowlist cannot be modified by web content

**Fail Criteria**: Any non-allowlisted API is callable OR access controls are bypassable OR web content can modify the allowlist

**Evidence**: JavaScript bridge configuration files, implementation code review, test results showing blocked API calls, security logs showing denied access attempts, penetration test reports

**References**:

- OWASP Mobile Top 10 - M1: Improper Platform Usage: https://owasp.org/www-project-mobile-top-10/
- Android WebView addJavascriptInterface Security: https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String)
- iOS WKWebView Configuration: https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
- Electron Context Bridge: https://www.electronjs.org/docs/latest/api/context-bridge
- CWE-749: Exposed Dangerous Method or Function: https://cwe.mitre.org/data/definitions/749.html

### Assessment: EMB-REQ-2 (JavaScript bridge input validation)

**Reference**: EMB-REQ-2 - All data crossing the JavaScript bridge shall be validated, sanitized, and type-checked on the native side

**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-1 or higher)

**Task**: JavaScript bridge parameters originate from untrusted web content and can contain injection payloads, type confusion attacks, buffer overflows, path traversal sequences, or prototype pollution that exploit native code vulnerabilities. Without comprehensive validation, attackers can achieve SQL injection into native databases, command injection for arbitrary code execution, or path traversal to access sensitive files. Native-side validation with type checking, sanitization, range checking, and path canonicalization prevents injection attacks across the trust boundary.

**Verification**:

1. Identify all native APIs exposed via JavaScript bridge that accept parameters
2. For each API, review the native-side validation and sanitization logic
3. Create test cases with malicious inputs: SQL injection strings, path traversal sequences, command injection payloads, excessively long strings, null bytes, Unicode exploits
4. Invoke bridge APIs with malformed data: wrong types, missing parameters, extra parameters, null values, undefined values
5. Attempt to pass JavaScript objects with prototype pollution characteristics
6. Test that numeric parameters are range-checked and validated
7. Verify that file paths are canonicalized and validated before use
8. Confirm that validation failures trigger errors and logging rather than silent failures
9. All bridge API parameters undergo validation on the native side before processing
10. Type checking rejects parameters of incorrect types
11. String sanitization removes or escapes dangerous characters
12. Numeric parameters are range-checked
13. File paths are validated and canonicalized
14. Malicious inputs trigger validation errors without causing security issues
15. Validation failures are logged with sufficient detail for security monitoring
16. No SQL injection, command injection, or path traversal vulnerabilities exist

**Pass Criteria**: All bridge parameters are validated, sanitized, and type-checked AND malicious inputs are rejected safely AND validation failures are logged

**Fail Criteria**: Any injection vulnerability exists OR type checking is missing OR validation can be bypassed

**Evidence**: Code review showing validation logic, penetration test results, fuzzing test results, validation error logs, security assessment reports

**References**:

- OWASP Input Validation Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html
- CWE-20: Improper Input Validation: https://cwe.mitre.org/data/definitions/20.html
- CWE-89: SQL Injection: https://cwe.mitre.org/data/definitions/89.html
- CWE-78: OS Command Injection: https://cwe.mitre.org/data/definitions/78.html
- Android WebView Security Best Practices: https://developer.android.com/develop/ui/views/layout/webapps/webview#security

### Assessment: EMB-REQ-3 (JavaScript bridge logging)

**Reference**: EMB-REQ-3 - JavaScript bridge communications shall be logged with sufficient detail for security auditing

**Given**: A conformant embedded browser with JavaScript bridge capability (EMB-1 or higher)

**Task**: JavaScript bridge logging is critical for detecting and investigating attacks where malicious web content attempts to exploit native APIs through the bridge. Without comprehensive audit logs, security teams cannot detect unauthorized API access, track attack patterns, or investigate security incidents. Proper logging of all bridge communications enables security monitoring systems to identify suspicious patterns such as repeated failed API calls, attempts to access restricted functionality, or unusual parameter values that may indicate injection attacks or reconnaissance activities.

**Verification**:

1. Configure the embedded browser to enable JavaScript bridge logging
2. Invoke various bridge APIs from web content
3. Review the generated logs and verify they contain: API name, timestamp, calling origin, parameters (with sensitive data redacted), return values, success/failure status
4. Attempt to call blocked or restricted APIs and verify denials are logged
5. Generate high-volume bridge traffic and verify logging continues without loss
6. Test that sensitive data (passwords, tokens) is redacted from logs
7. Verify logs are stored securely with appropriate access controls
8. Confirm log retention policies are documented and enforced
9. All JavaScript bridge API invocations are logged
10. Logs include sufficient context for security analysis (API, origin, timestamp)
11. Both successful and failed API calls are logged
12. Sensitive parameters are redacted or hashed in logs
13. Logs are tamper-resistant with integrity protection
14. Log retention policies balance security needs and privacy requirements
15. Logs are accessible to security monitoring systems

**Pass Criteria**: All bridge API calls are logged with sufficient detail AND sensitive data is redacted AND logs have integrity protection

**Fail Criteria**: API calls are not logged OR insufficient detail is recorded OR sensitive data appears in plaintext

**Evidence**: Log samples showing bridge API calls, log configuration files, security monitoring dashboards, 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-4 (Context isolation)

**Reference**: EMB-REQ-4 - Embedded browsers shall implement context isolation to prevent web content from accessing host application objects

**Given**: A conformant embedded browser with context isolation capability (EMB-1 or higher)

**Task**: Context isolation is essential to prevent malicious web content from breaking out of its sandbox and directly accessing host application objects, which could lead to privilege escalation, data theft, or code execution in the host application context. Without proper isolation, attackers can enumerate the JavaScript global namespace to discover and exploit unintended host APIs, access sensitive application data structures, or manipulate host application behavior through prototype pollution. This boundary violation represents one of the most critical security threats in embedded browser architectures.

**Verification**:

1. Load web content in the embedded browser
2. From web content JavaScript, attempt to access global objects that might belong to the host: `window.hostApp`, `window.native`, `window.android`, `window.nativeInterface`, etc.
3. Attempt to enumerate window properties to discover host-exposed objects
4. Test if web content can access Node.js globals (if applicable): `process`, `require`, `Buffer`, `global`
5. Verify that the JavaScript bridge API is the only official communication channel
6. Test that prototype pollution cannot affect host application objects
7. Confirm that context isolation is enforced even for trusted content origins
8. Verify that iframes inherit context isolation from the parent
9. Web content cannot access host application objects directly
10. Global namespace pollution from host application is prevented
11. Node.js globals (if applicable) are not accessible to web content
12. Only explicitly exposed JavaScript bridge APIs are accessible
13. Window property enumeration does not reveal internal objects
14. Prototype pollution attacks do not affect host application
15. Context isolation applies to all embedded content regardless of origin

**Pass Criteria**: Web content has no direct access to host objects AND only official bridge APIs are accessible

**Fail Criteria**: Any host application object is directly accessible from web content OR context isolation can be bypassed

**Evidence**: Penetration test results showing blocked access attempts, code review of context isolation implementation, test scripts attempting to access host objects, browser console showing security errors

**References**:

- Electron Context Isolation: https://www.electronjs.org/docs/latest/tutorial/context-isolation
- Chromium Isolated Worlds: https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/renderer/bindings/core/v8/V8BindingDesign.md#Isolated-World
- iOS WKWebView JavaScript Isolation: https://developer.apple.com/documentation/webkit/wkwebview
- Android WebView Isolation: https://developer.android.com/reference/android/webkit/WebView

### Assessment: EMB-REQ-5 (User consent for sensitive APIs)

**Reference**: EMB-REQ-5 - Native APIs exposed via JavaScript bridges shall require explicit user consent for sensitive operations

**Given**: A conformant embedded browser exposing sensitive APIs via JavaScript bridge (EMB-2 or higher)

**Task**: User consent for sensitive APIs is critical to prevent malicious web content from silently accessing privacy-sensitive functionality like camera, microphone, location, files, or contacts without the user's knowledge. Without explicit consent requirements, attackers can exploit JavaScript bridge APIs to exfiltrate sensitive data, track user location, or access private information. Proper consent mechanisms protect users from invisible attacks where compromised or malicious web content attempts unauthorized access to device capabilities that could violate user privacy or security expectations.

**Verification**:

1. Identify all sensitive operations exposed via the JavaScript bridge (e.g., file access, location, camera, contacts, payments)
2. Attempt to invoke sensitive APIs from web content without prior user consent
3. Verify that a clear, non-dismissible consent dialog appears for each sensitive operation
4. Test that consent dialogs clearly identify the requesting origin and the specific permission being requested
5. Verify that consent can be granted permanently, temporarily (session-only), or denied
6. Test that denied permissions are enforced consistently
7. Verify that users can revoke previously granted permissions
8. Confirm that consent state persists across browser sessions according to user choice
9. Sensitive API calls trigger user consent prompts before execution
10. Consent dialogs clearly identify the origin and permission type
11. Users can grant, deny, or revoke permissions
12. Denied permissions prevent API execution
13. Consent state is properly persisted and enforced
14. No sensitive operations occur without explicit user consent
15. Consent UI cannot be spoofed or bypassed by web content

**Pass Criteria**: All sensitive API calls require explicit user consent AND consent UI is clear and non-spoofable AND permission state is properly enforced

**Fail Criteria**: Any sensitive operation occurs without user consent OR consent UI is bypassable OR permissions are not enforced

**Evidence**: Screenshots of consent dialogs, test results showing blocked operations without consent, user consent audit logs, permission state persistence verification

**References**:

- Android Runtime Permissions: https://developer.android.com/training/permissions/requesting
- iOS Permission Prompts: https://developer.apple.com/design/human-interface-guidelines/patterns/accessing-private-data
- W3C Permissions API: https://www.w3.org/TR/permissions/

### Assessment: EMB-REQ-6 (No system-level API exposure without controls)

**Reference**: EMB-REQ-6 - Host applications shall not expose system-level APIs (file system, process execution, native module loading) through JavaScript bridges without additional security controls

**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