Skip to content

Commit

Permalink
Generate files off-line. (#252)
Browse files Browse the repository at this point in the history
Replace the built-on-push with a shell script that committers are meant to manually run pre commit.

Reason are errors on GitHub actions:
https://github.com/WICG/sanitizer-api/actions/runs/12810876107/job/35718920474
  • Loading branch information
otherdaniel authored Jan 16, 2025
1 parent ebdfd9e commit fbdaa30
Show file tree
Hide file tree
Showing 5 changed files with 653 additions and 9 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/pr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Generate safe-default-configuration.json
run: python builtins/safe-default-configuration.py --input builtins/safe-default-configuration.txt --out builtins/safe-default-configuration.json
- name: Generate safe-baseline-configuration-materialized.json
run: python builtins/safe-baseline-configuration.py --input builtins/safe-baseline-configuration.json --event-handlers builtins/event-handler-content-attributes.txt --out builtins/safe-baseline-configuration-materialized.json
- uses: w3c/spec-prod@v2
with:
GH_PAGES_BRANCH: gh-pages
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/.project
/out
/*.ninja*
/builtins/safe-default-configuration.json
/builtins/safe-baseline-configuration-materialized.json
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
# Generate safe-default-configuration.json
python3 builtins/safe-default-configuration.py --input builtins/safe-default-configuration.txt --out builtins/safe-default-configuration.json
# Generate safe-baseline-configuration-materialized.json
python3 builtins/safe-baseline-configuration.py --input builtins/safe-baseline-configuration.json --event-handlers builtins/event-handler-content-attributes.txt --out builtins/safe-baseline-configuration-materialized.json

122 changes: 122 additions & 0 deletions builtins/safe-baseline-configuration-materialized.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"removeElements": [
{
"namespace": "http://www.w3.org/1999/xhtml",
"name": "script"
},
{
"namespace": "http://www.w3.org/1999/xhtml",
"name": "frame"
},
{
"namespace": "http://www.w3.org/1999/xhtml",
"name": "iframe"
},
{
"namespace": "http://www.w3.org/1999/xhtml",
"name": "object"
},
{
"namespace": "http://www.w3.org/1999/xhtml",
"name": "embed"
},
{
"namespace": "http://www.w3.org/2000/svg",
"name": "script"
},
{
"namespace": "http://www.w3.org/2000/svg",
"name": "use"
}
],
"removeAttributes": [
"onafterprint",
"onauxclick",
"onbeforeinput",
"onbeforematch",
"onbeforeprint",
"onbeforeunload",
"onbeforetoggle",
"onblur",
"oncancel",
"oncanplay",
"oncanplaythrough",
"onchange",
"onclick",
"onclose",
"oncontextlost",
"oncontextmenu",
"oncontextrestored",
"oncopy",
"oncuechange",
"oncut",
"ondblclick",
"ondrag",
"ondragend",
"ondragenter",
"ondragleave",
"ondragover",
"ondragstart",
"ondrop",
"ondurationchange",
"onemptied",
"onended",
"onerror",
"onfocus",
"onformdata",
"onhashchange",
"oninput",
"oninvalid",
"onkeydown",
"onkeypress",
"onkeyup",
"onlanguagechange",
"onload",
"onloadeddata",
"onloadedmetadata",
"onloadstart",
"onmessage",
"onmessageerror",
"onmousedown",
"onmouseenter",
"onmouseleave",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup",
"onoffline",
"ononline",
"onpagehide",
"onpagereveal",
"onpageshow",
"onpageswap",
"onpaste",
"onpause",
"onplay",
"onplaying",
"onpopstate",
"onprogress",
"onratechange",
"onreset",
"onresize",
"onrejectionhandled",
"onscroll",
"onscrollend",
"onsecuritypolicyviolation",
"onseeked",
"onseeking",
"onselect",
"onslotchange",
"onstalled",
"onstorage",
"onsubmit",
"onsuspend",
"ontimeupdate",
"ontoggle",
"onunhandledrejection",
"onunload",
"onvolumechange",
"onwaiting",
"onwheel"
]
}
Loading

0 comments on commit fbdaa30

Please sign in to comment.