[wpt-sync] Sync PR 63448 - Update wpt tests for CSP script-src 'trusted-types-eval'
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 63448 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63448
Details from upstream follow.
Byungwoo Lee <blee@igalia.com> wrote:
Update wpt tests for CSP script-src 'trusted-types-eval'
Rewrite the 'trusted-types-eval' wpt tests to use a separate
promise_test() with a EventWatcher for each subtest. Previously,
all subtests shared securitypolicyviolation listeners, so a
subtest could pass or fail because of another subtest's
violation.Also add subtests for scripts injected via setTimeout() and
setInterval().Bug: 388437274
Force-WPT-Export: true
Change-Id: Ib76d9162b7438174f4ae7d9241297a925ce46900
Reviewed-on: https://chromium-review.googlesource.com/8529548
WPT-Export-Revision: 49d94419fb61c7a0589ddae55456b72e602a51cb
| 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=109446
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 97 tests and 6 subtests
Status Summary
Firefox
OK : 4[GitHub] 93[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 94[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]
PASS : 24[GitHub] 211[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 214[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]
FAIL : 32
TIMEOUT: 1[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-opt] 3[Gecko-windows11-64-25h2-debug]
ERROR : 1
Chrome
OK : 4
PASS : 20
FAIL : 4
Safari
OK : 3
PASS : 18
TIMEOUT: 2
NOTRUN : 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /content-security-policy/script-src/scriptnonce-basic-blocked.sub.html [wpt.fyi]:
SKIP - /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-service-worker.https.html [wpt.fyi]:
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-opt],TIMEOUT[Gecko-windows11-64-25h2-debug]- script-specific violation report contains correct urlHash in service worker:
TIMEOUT
- script-specific violation report contains correct urlHash in service worker:
- /content-security-policy/script-src/script-src-1_4_1.html [wpt.fyi]:
OK[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],SKIP[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /content-security-policy/script-src/script-src-strict_dynamic_modulepreload_parser_inserted_module.html [wpt.fyi]
- Parser-inserted external module script that is also
modulepreloaded is allowed withstrict-dynamic.:FAIL
- Parser-inserted external module script that is also
- /content-security-policy/script-src/script-src-trusted_types_eval_multiple_policies_blocked.window.html [wpt.fyi]
- Direct
evalis blocked by a second policy withouttrusted-types-eval.:FAIL new Functionis blocked by a second policy withouttrusted-types-eval.:FAIL
- Direct
- /content-security-policy/script-src/script-src-trusted_types_eval_multiple_policies_report_only.window.html [wpt.fyi]
evalis allowed but reported by a report-only policy withouttrusted-types-eval.:FAIL
- /content-security-policy/script-src/tentative/script-url-allowed-by-hash.https.html [wpt.fyi]
- script-src should allow script by its url hash - header:
FAIL - A parseable url-hash should ignore hostname allowlists - header:
FAIL - default-src should allow script by its url hash - header:
FAIL - script-src-elem should allow script by its url hash - header:
FAIL - url hashes should allow dynamically inserted script if allowlisted - header:
FAIL - url hashes should allow redirected scripts - header:
FAIL - dynamically inserted parser-inserted script should be allowed if strict-dynamic-url is present - header:
FAIL - dynamically inserted script inserted by an inline script should be allowed if strict-dynamic-url is present - header:
FAIL - script-src should allow script by its relative url's hash - header:
FAIL - script-src should allow script by its relative url's hash in child directory - header:
FAIL - script-src should allow script by its relative url's hash in an iframe in child dir - header:
FAIL - script-src should allow script in parent dir by its relative url's hash in an iframe in child dir - header:
FAIL - script-src should allow script by its url hash - metatag:
FAIL - A parseable url-hash should ignore hostname allowlists - metatag:
FAIL - default-src should allow script by its url hash - metatag:
FAIL - script-src-elem should allow script by its url hash - metatag:
FAIL - url hashes should allow dynamically inserted script if allowlisted - metatag:
FAIL - url hashes should allow redirected scripts - metatag:
FAIL - dynamically inserted parser-inserted script should be allowed if strict-dynamic-url is present - metatag:
FAIL - dynamically inserted script inserted by an inline script should be allowed if strict-dynamic-url is present - metatag:
FAIL - script-src should allow script by its relative url's hash - metatag:
FAIL - script-src should allow script by its relative url's hash in child directory - metatag:
FAIL - script-src should allow script by its relative url's hash in an iframe in child dir - metatag:
FAIL - script-src should allow script in parent dir by its relative url's hash in an iframe in child dir - metatag:
FAIL
- script-src should allow script by its url hash - header:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-dedicated-worker.https.html [wpt.fyi]
- script-specific violation report contains correct urlHash in dedicated worker:
FAIL
- script-specific violation report contains correct urlHash in dedicated worker:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-shared-worker.https.html [wpt.fyi]
- script-specific violation report contains correct urlHash in shared worker:
FAIL
- script-specific violation report contains correct urlHash in shared worker:
- /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash.https.html [wpt.fyi]:
ERROR- script-specific violation report contains correct urlHash:
TIMEOUT
- script-specific violation report contains correct urlHash:
- /content-security-policy/script-src/tentative/url-hash-in-header-and-meta.https.html [wpt.fyi]
- more lax meta tag should still allow script:
FAIL - multiple meta tags should apply most strict policy - both lax:
FAIL
- more lax meta tag should still allow script:
Tests Disabled in Gecko Infrastructure
- /content-security-policy/script-src/scriptnonce-basic-blocked.sub.html [wpt.fyi]:
SKIP - /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-service-worker.https.html [wpt.fyi]:
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-opt],TIMEOUT[Gecko-windows11-64-25h2-debug] - /content-security-policy/script-src/script-src-1_4_1.html [wpt.fyi]:
OK[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],SKIP[Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
Comment 4•1 month ago
|
||
| bugherder | ||
Description
•