Title: fix(security): strengthen DOM-clobbering defenses by JosunLP · Pull Request #199 · bQuery/bQuery · GitHub
Open Graph Title: fix(security): strengthen DOM-clobbering defenses by JosunLP · Pull Request #199 · bQuery/bQuery
X Title: fix(security): strengthen DOM-clobbering defenses by JosunLP · Pull Request #199 · bQuery/bQuery
Description: Summary Fixes #179 (Low; defense-in-depth). DOM-clobbering protection only stripped id/name values whose exact value was in a ~30-entry reserved list, and the classic duplicate-id HTMLCollection vector () passed unchanged. The list was also missing many high-value targets (attributes, nodeName, getElementById, defaultView, implementation, …). Fix Expanded RESERVED_IDS with the missing global/document/node/traversal targets. Duplicate-id stripping in sanitize-core.ts: the first occurrence of an id is kept; later elements sharing it have their id dropped, so named access resolves to a single node. Documented that the id/name denylist is defense-in-depth, not a complete guarantee — fully untrusted content should drop id/name entirely. Verification New tests: duplicate id="x" reduced to one occurrence; several newly-added reserved ids (attributes, getElementById, defaultView, implementation) are stripped. Both fail on the pre-fix code. security/core/view suites: all pass. tsc --noEmit clean. 🤖 Generated with Claude Code
Open Graph Description: Summary Fixes #179 (Low; defense-in-depth). DOM-clobbering protection only stripped id/name values whose exact value was in a ~30-entry reserved list, and the classic duplicate-id HTMLCollection ve...
X Description: Summary Fixes #179 (Low; defense-in-depth). DOM-clobbering protection only stripped id/name values whose exact value was in a ~30-entry reserved list, and the classic duplicate-id HTMLCollection ve...
Opengraph URL: https://github.com/bQuery/bQuery/pull/199
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:899d4c41-9907-0147-4905-9e9376b43aea |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 93E0:3B3BAC:1654843:208F0C7:6A4E5023 |
| html-safe-nonce | d762b7cd846183d80460ddf65d5963be21c14b0f62e48e2731f617e534d13144 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0UwOjNCM0JBQzoxNjU0ODQzOjIwOEYwQzc6NkE0RTUwMjMiLCJ2aXNpdG9yX2lkIjoiNzU0NDg3NDk3MzcwMzA2NTYzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c116df8af0130bbd21d1a0f687a35447c9617b51b24902d257fef2c3272d5155 |
| hovercard-subject-tag | pull_request:4001225198 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/bQuery/bQuery/pull/199/files |
| twitter:image | https://avatars.githubusercontent.com/u/20913954?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/20913954?s=400&v=4 |
| og:image:alt | Summary Fixes #179 (Low; defense-in-depth). DOM-clobbering protection only stripped id/name values whose exact value was in a ~30-entry reserved list, and the classic duplicate-id HTMLCollection ve... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width