[wpt-sync] Sync PR 64060 - CSP: Enforce Trusted Types in embedded CSP
Categories
(Core :: DOM: Security, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64060 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64060
Details from upstream follow.
Viktoria Zlatinova <vizlatin@microsoft.com> wrote:
CSP: Enforce Trusted Types in embedded CSP
Include Trusted Types directives when checking whether a response
satisfies an iframe's required CSP. Combine enforcing response policies
before conservatively comparing normalized Trusted Types restrictions,
and ignore report-only policies.The initial trusted-types implementation compares normalized enforcement
configurations using exact equality. This is conservative and may reject
stricter returned subsets while richer subsumption is deferred.Flag: CSPEmbeddedEnforcementTrustedTypes (disabled by default) When
disabled, CSP:EE preserves its existing source-list-only subsumption
behavior and skips Trusted Types checks.
Chrome status entry: https://chromestatus.com/feature/5199775795380224
I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/H-i9_ZsT6CU/m/p9t7nrn1AwAJ
Spec issue: https://github.com/w3c/webappsec-csp/issues/628
Bug: 40912894
Change-Id: Ic1f887cce8f075306c78fd78a71cba7344604193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8237933
Reviewed-by: Antonio Sartori \<antoniosartori@chromium.org>
Reviewed-by: Reilly Grant \<reillyg@chromium.org>
Reviewed-by: David Baron \<dbaron@chromium.org>
Commit-Queue: Viktoria Zlatinova \<vizlatin@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1723352}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=110960
| Assignee | ||
Comment 2•29 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 24 tests
Status Summary
Firefox
OK : 1
PASS: 13
FAIL: 8
Chrome
OK : 1
PASS: 14
FAIL: 7
Safari
OK : 1
PASS: 13
FAIL: 8
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /content-security-policy/embedded-enforcement/allow_csp_from-header.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/blocked-iframe-are-cross-origin.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/change-csp-attribute-and-history-navigation.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/idlharness.window.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/iframe-csp-attribute.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/required-csp-header-cascade.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/required_csp-header-crlf.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/required_csp-header.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-general.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-hashes.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-hosts.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-paths.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-ports.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-protocols.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-nonces.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-none.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-self.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-source_list-wildcards.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-strict_dynamic.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-trusted_types.tentative.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:OK, Safari:OK)- require-trusted-types-for present in required, absent in returned.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types stricter returned subset is not an exact match.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types '*' required but returned has an explicit list only.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types 'allow-duplicates' required but missing in returned.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types intersection of several returned policies differs from required.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types present in required, absent from all returned policies.:
FAIL(Chrome:FAIL, Safari:FAIL) - Combined requirement: script-src mismatches even though require-trusted-types-for matches.:
FAIL(Chrome:PASS, Safari:FAIL) - Combined requirement: require-trusted-types-for mismatches even though script-src matches.:
FAIL(Chrome:FAIL, Safari:FAIL)
- require-trusted-types-for present in required, absent in returned.:
- /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_eval.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_hashes.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html?9-last [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html?1-8 [wpt.fyi]:
SKIP
Tests Disabled in Gecko Infrastructure
- /content-security-policy/embedded-enforcement/allow_csp_from-header.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/blocked-iframe-are-cross-origin.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/change-csp-attribute-and-history-navigation.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/idlharness.window.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/iframe-csp-attribute.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/required-csp-header-cascade.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/required_csp-header-crlf.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/required_csp-header.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-general.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-hashes.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-hosts.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-paths.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-ports.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-host_sources-protocols.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-nonces.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-none.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-self.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-source_list-wildcards.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-strict_dynamic.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-trusted_types.tentative.html [wpt.fyi]:
OK[GitHub],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] (Chrome:OK, Safari:OK) - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_eval.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_hashes.html [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html?9-last [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html?1-8 [wpt.fyi]:
SKIP
Comment 4•25 days ago
|
||
| bugherder | ||
Description
•