[wpt-sync] Sync PR 65059 - [CSP] Clarify embedded Trusted Types errors and expand WPT coverage
Categories
(Core :: DOM: Security, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65059 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65059
Details from upstream follow.
Viktoria Zlatinova <vizlatin@microsoft.com> wrote:
[CSP] Clarify embedded Trusted Types errors and expand WPT coverage
The frame-blocking diagnostic suggests that any stronger policy is
sufficient, but trusted-types currently requires normalized exact
matching. Explain this restriction when the feature is enabled and the
required policy contains trusted-types, preserving the existing message
otherwise. Cover both diagnostic paths with browser tests.Add 25 WPT cases covering multi-policy intersections, wildcard and
duplicate permissions, empty and missing directives, report-only
policies, and combined directive requirements.Follow-up to https://crrev.com/c/8237933.
Bug: 40912894
Change-Id: Iad811b6f3be4770c9a5e950eb0ac0c3594de91b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8786742
Commit-Queue: Viktoria Zlatinova \<vizlatin@microsoft.com>
Reviewed-by: Liam Brady \<lbrady@google.com>
Cr-Commit-Position: refs/heads/main@{#1742276}
| Assignee | ||
Updated•11 days ago
|
| Assignee | ||
Comment 1•11 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=123194
| Assignee | ||
Comment 2•11 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: 27
FAIL: 19
Chrome
OK : 1
PASS: 28
FAIL: 18
Safari
OK : 1
PASS: 27
FAIL: 19
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 looser returned superset is not an exact match.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types policy names are case-sensitive.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types '*' required but returned has an explicit list only.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types explicit list required but returned has '*'.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types 'allow-duplicates' required but missing in returned.:
FAIL(Chrome:FAIL, Safari:FAIL) - trusted-types 'allow-duplicates' absent in required but present 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) - trusted-types 'none' required but trusted-types is absent from returned.:
FAIL(Chrome:FAIL, Safari:FAIL) - Combined requirement: trusted-types is missing even though require-trusted-types-for matches.:
FAIL(Chrome:FAIL, Safari:FAIL) - Combined requirement: require-trusted-types-for is missing even though trusted-types matches.:
FAIL(Chrome:FAIL, Safari:FAIL) - Combined Trusted Types requirement is not satisfied by a report-only policy.:
FAIL(Chrome:FAIL, Safari:FAIL) - Combined requirement: report-only require-trusted-types-for does not fill a missing enforced directive.:
FAIL(Chrome:FAIL, Safari:FAIL) - Combined requirement: report-only trusted-types does not fill a missing enforced directive.:
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) - Combined requirement: trusted-types 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?1-8 [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html?9-last [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?1-8 [wpt.fyi]:
SKIP - /content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html?9-last [wpt.fyi]:
SKIP
Comment 4•10 days ago
|
||
| bugherder | ||
Description
•