Closed Bug 2040086 Opened 6 months ago Closed 6 months ago

[wpt-sync] Sync PR 58783 - Include url and eval hashes in CSP violation reports for sites in OT

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 58783 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/58783
Details from upstream follow.

Carlos IL <carlosil@chromium.org> wrote:

Include url and eval hashes in CSP violation reports for sites in OT

Sites that are enrolled in the "URL and eval hashes in CSP
script-src" origin trial are supposed to get hashes included in
violation reports.

Fixed: 490022555
Change-Id: I674d6b4288abc7dcbb99fe9219be7b637ec0c688
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7675791
Auto-Submit: Carlos IL \<carlosil@chromium.org>
Commit-Queue: Carlos IL \<carlosil@chromium.org>
Reviewed-by: Mustafa Emre Acer \<meacer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1605620}

Component: web-platform-tests → DOM: Security
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 6 tests and 6 subtests

Status Summary

Firefox

OK : 2[GitHub] 4[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]
PASS : 8
FAIL : 2[GitHub] 28[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]
TIMEOUT: 3
ERROR : 1

Chrome

OK : 3
FAIL : 3
TIMEOUT: 1
ERROR : 1

Safari

TIMEOUT: 7
ERROR : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /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
  • /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 (Chrome: FAIL, Safari: TIMEOUT)
  • /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash-service-worker.https.html [wpt.fyi]: TIMEOUT (Chrome: OK, Safari: TIMEOUT)
    • script-specific violation report contains correct urlHash in service worker: TIMEOUT (Chrome: FAIL, Safari: TIMEOUT)
  • /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 (Chrome: FAIL, Safari: TIMEOUT)
  • /content-security-policy/script-src/tentative/script-url-blocked-report-contains-hash.https.html [wpt.fyi]: ERROR (Chrome: ERROR, Safari: ERROR)
    • script-specific violation report contains correct urlHash: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
  • /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
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.