Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests for CSP violations of require-trusted-types-for directive. #50905

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Add more tests for CSP violations of require-trusted-types-for direct…

89897f1
Select commit
Loading
Failed to load commit list.
Open

Add more tests for CSP violations of require-trusted-types-for directive. #50905

Add more tests for CSP violations of require-trusted-types-for direct…
89897f1
Select commit
Loading
Failed to load commit list.
Community-TC Integration / wpt-firefox-nightly-stability succeeded Feb 25, 2025 in 7m 44s

Community-TC (pull_request)

Verify that all tests affected by a pull request are stable when executed in firefox.

Details

View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster

Task Status

Started: 2025-02-25T07:35:43.918Z
Resolved: 2025-02-25T07:39:51.473Z
Task Execution Time: 4 minutes, 7 seconds, 555 milliseconds
Task Status: completed
Reason Resolved: completed
RunId: 0

Artifacts

- public/logs/live_backing.log
- public/logs/live.log
- public/results/checkrun.md

WPT Command: python3 ./wpt run --channel=nightly --verify --verify-no-chaos-mode --verify-repeat-loop=0 --verify-repeat-restart=10 --github-checks-text-file=/home/test/artifacts/checkrun.md --affected base_head --log-mach-level=info --log-mach=- -y --no-pause --no-restart-on-unexpected --install-fonts --verify-log-full --no-headless --binary=/home/test/build/firefox/firefox firefox


[taskcluster 2025-02-25 07:35:44.033Z] Task ID: P6HDzODDTkCOAZQzP4hCdQ
[taskcluster 2025-02-25 07:35:44.033Z] Worker ID: 9097352850476944507
[taskcluster 2025-02-25 07:35:44.033Z] Worker Group: us-central1-b
[taskcluster 2025-02-25 07:35:44.033Z] Worker Node Type: projects/757942385826/machineTypes/n2-standard-4
[taskcluster 2025-02-25 07:35:44.033Z] Worker Pool: proj-wpt/ci
[taskcluster 2025-02-25 07:35:44.033Z] Worker Version: 46.1.0
[taskcluster 2025-02-25 07:35:44.033Z] Public IP: 34.60.151.65
[taskcluster 2025-02-25 07:35:44.033Z] Hostname: proj-wpt-ci-pomfhu5drpcuionjlhejqw

ff2b96c8f8ff - Started downloading
ff2b96c8f8ff - Downloaded in 0.01 seconds
560c024910be - Started downloading
72ebe8ecf66d - Started downloading
560c024910be - Downloaded in 0.185 seconds
430011f338a2 - Started downloading
430011f338a2 - Downloaded in 0.043 seconds
4f4fb700ef54 - Started downloading
4f4fb700ef54 - Downloaded in 0.001 seconds
79df10d18997 - Started downloading
7e274023cae9 - Started downloading

...(27298 lines hidden)...

 2:01.47 INFO | `One violated enforce require-trusted-types-for directive followed by multiple report-only directives`                              | FAIL    | `assert_true: expected true got false` |
 2:01.47 INFO | `Mixing enforce and report-only require-trusted-types-for directives.`                                                              | FAIL    | `assert_true: expected true got false` |
 2:01.47 INFO | `directive "require-trusted-types-for 'script'%09'script'%0A'script'%0C'script'%0D'script'%20'script'" (required-ascii-whitespace)` | FAIL    | `assert_true: expected true got false` |
 2:01.47 INFO | `invalid directive "require-trusted-types-for 'script''script'" (no ascii-whitespace)`                                              | PASS    |                                        |
 2:01.47 INFO | `directive "require-trusted-types-for 'script' 'invalid'" (unknown sink group)`                                                     | FAIL    | `assert_true: expected true got false` |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/should-trusted-type-policy-creation-be-blocked-by-csp-001.html ###
 2:01.47 INFO |                                                  Subtest                                                  | Results |                                                              Messages                                                             |
 2:01.47 INFO |-----------------------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------|
 2:01.47 INFO |                                                                                                           | OK      |                                                                                                                                   |
 2:01.47 INFO | `single enforce policy with directive "trusted-type tt-policy-name"`                                      | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `single report-only policy with directive "trusted-type tt-policy-name"`                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type *"`                                                   | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single report-only policy with directive "trusted-type *"`                                               | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type 'none'"`                                              | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `single report-only policy with directive "trusted-type 'none'"`                                          | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type 'allow-duplicates'"`                                  | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `single report-only policy with directive "trusted-type 'allow-duplicates'"`                              | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type tt-policy-name 'allow-duplicates'"`                   | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `single report-only policy with directive "trusted-type tt-policy-name 'allow-duplicates'"`               | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type * 'allow-duplicates'"`                                | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single report-only policy with directive "trusted-type * 'allow-duplicates'"`                            | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type 'none' 'allow-duplicates'"`                           | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `single report-only policy with directive "trusted-type 'none' 'allow-duplicates'"`                       | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type 'none' tt-policy-name"`                               | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `single report-only policy with directive "trusted-type 'none' tt-policy-name"`                           | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type 'none' *"`                                            | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single report-only policy with directive "trusted-type 'none' *"`                                        | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type tt-policy-name *"`                                    | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single report-only policy with directive "trusted-type tt-policy-name *"`                                | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single enforce policy with directive "trusted-type tt-policy-name1 tt-policy-name2 tt-policy-name3"`     | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `single report-only policy with directive "trusted-type tt-policy-name1 tt-policy-name2 tt-policy-name3"` | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/should-trusted-type-policy-creation-be-blocked-by-csp-002.html ###
 2:01.47 INFO |                                                  Subtest                                                   | Results |                                                              Messages                                                             |
 2:01.47 INFO |------------------------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------|
 2:01.47 INFO |                                                                                                            | OK      |                                                                                                                                   |
 2:01.47 INFO | `valid tt-policy-name name "1"`                                                                            | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "abcdefghijklmnopqrstuvwxyz"`                                                   | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "ABCDEFGHIJKLMNOPQRSTUVWXYZ"`                                                   | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "0123456789"`                                                                   | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy-name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy=name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy_name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy/name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy@name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy.name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy%name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "policy#name"`                                                                  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `valid tt-policy-name name "6xY/2x=3Y..."`                                                                 | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `invalid tt-policy-name name "policy name"`                                                                | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `invalid tt-policy-name name "policy$name"`                                                                | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `invalid tt-policy-name name "policy?name"`                                                                | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `invalid tt-policy-name name "policy!name"`                                                                | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `invalid tt-policy-name name "policy*name"`                                                                | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `invalid tt-policy-name name "política"`                                                                   | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO | `directive "trusted-type _TTP1_%09_TTP2_%0A_TTP3_%0C_TTP4_%0D_TTP5_%20_TTP6_" (required-ascii-whitespace)` | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `invalid directive "trusted-type _TTP" (no ascii whitespace)`                                              | FAIL    | `assert_equals: expected 1 but got 0`                                                                                             |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/should-trusted-type-policy-creation-be-blocked-by-csp-003.html ###
 2:01.47 INFO |                                           Subtest                                           | Results |                                                              Messages                                                             |
 2:01.47 INFO |---------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------|
 2:01.47 INFO |                                                                                             | OK      |                                                                                                                                   |
 2:01.47 INFO | `Multiple non-violated enforce trusted-types directives.`                                   | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `Multiple report-only trusted-types directives.`                                            | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO | `One violated report-only trusted-types directive followed by multiple enforce directives.` | FAIL    | `assert_equals: expected 5 but got 0`                                                                                             |
 2:01.47 INFO | `One violated enforce trusted-types directive followed by multiple report-only directives.` | FAIL    | `assert_equals: expected 5 but got 0`                                                                                             |
 2:01.47 INFO | `Mixing enforce and report-only policies with trusted-types directives`                     | FAIL    | `assert_equals: expected 4 but got 0`                                                                                             |
 2:01.47 INFO | `Mixing enforce and report-only policies with trusted-types directives (duplicate policy)`  | FAIL    | `assert_equals: expected null but got object "TypeError: can't access property "createPolicy", window.trustedTypes is undefined"` |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-eval-reporting-no-unsafe-eval.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-eval-reporting-report-only.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-eval-reporting.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-report-only.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-DOMParser-parseFromString.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Document-execCommand.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Document-parseHTMLUnsafe.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Document-write.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Element-innerHTML.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Element-insertAdjacentHTML.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Element-outerHTML.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Element-setAttribute.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Element-setHTMLUnsafe.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-HTMLIFrameElement-srcdoc.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-HTMLScriptElement-innerHTML.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-HTMLScriptElement.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-Range-createContextualFragment.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-SVGScriptElement-innerHTML.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-ShadowRoot-innerHTML.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting-for-ShadowRoot-setHTMLUnsafe.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-reporting.html ###
 2:01.47 INFO |                                           Subtest                                            | Results |                              Messages                             |
 2:01.47 INFO |----------------------------------------------------------------------------------------------|---------|-------------------------------------------------------------------|
 2:01.47 INFO |                                                                                              | OK      |                                                                   |
 2:01.47 INFO | `Trusted Type violation report: creating a forbidden policy.`                                | FAIL    | `assert_equals: expected 2 but got 0`                             |
 2:01.47 INFO | `Trusted Type violation report: creating a report-only-forbidden policy.`                    | FAIL    | `assert_equals: expected 1 but got 0`                             |
 2:01.47 INFO | `Trusted Type violation report: creating a forbidden-but-not-reported policy.`               | FAIL    | `assert_equals: a single violation reported expected 1 but got 0` |
 2:01.47 INFO | `Trusted Type violation report: sample for SVGScriptElement href assignment`                 | FAIL    | `assert_equals: a single violation reported expected 1 but got 0` |
 2:01.47 INFO | `Trusted Type violation report: sample for SVGScriptElement href assignment by setAttribute` | FAIL    | `assert_equals: a single violation reported expected 1 but got 0` |
 2:01.47 INFO | `Trusted Type violation report: sample for eval`                                             | FAIL    | `assert_true: expected true got false`                            |
 2:01.47 INFO | `Trusted Type violation report: sample for custom element assignment`                        | FAIL    | `assert_equals: a single violation reported expected 1 but got 0` |
 2:01.47 INFO | `Trusted Type violation report: Worker constructor`                                          | FAIL    | `assert_equals: a single violation reported expected 1 but got 0` |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-source-file-path.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ### /trusted-types/trusted-types-svg-script-set-href.html ###
 2:01.47 INFO | Subtest | Results | Messages |
 2:01.47 INFO |---------|---------|----------|
 2:01.47 INFO |         | ERROR   |          |
 2:01.47 INFO 
 2:01.47 INFO ::: Running tests in a loop with restarts 10 times : PASS
 2:01.47 INFO :::
 2:01.47 INFO ::: Test verification PASS
 2:01.47 INFO :::
[taskcluster 2025-02-25 07:39:50.688Z] === Task Finished ===
[taskcluster 2025-02-25 07:39:50.979Z] Successful task run with exit code: 0 completed in 246.948 seconds