Repository navigation
feat(rules): TypeScript/JavaScript XSS, path traversal and open redirect rules; more SSRF sinks (pack v1.11, main) - #117
Merged
Conversation
…ect rules; more SSRF sinks (pack v1.11) The same rule files as the development branch feat/ts-rules-xss-path-redirect, on main. Written from the confirmed TS/JS findings the rule-mining report lists as uncovered (XSS 37, path traversal 10, open redirect 4); on eight real checkouts they hit 35 times, including all three confirmed findings present there. 0.47.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
smith-xyz
approved these changes
Oct 28, 2026
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chubirka, smith-xyz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Vercel comparison gap plan, step 5 (A3): TypeScript/JavaScript rules, rule pack v1.11. The same rule files go to
mainanddevelopmentin two PRs (owner decision); only the version and changelog differ.Why these rules. The rule-mining report (confirmed true positives in the ledger) lists TS/JS's largest uncovered clusters as XSS (CWE-79, 37 findings in about 30 repos), path traversal (CWE-22, 10) and open redirect (CWE-601, 4). Prototype pollution, in the plan's original list, has no confirmed findings. Authorization asymmetry is now covered by the Express route × guard matrix (traust-core#250). Each rule is written from the cited findings' evidence.
traust-ts-xss-dangerously-set-inner-html__htmlwith no sanitizer; translation strings and sanitized-named values excludedtraust-ts-xss-dom-html-sinkinnerHTML/outerHTML/insertAdjacentHTML/document.write(also on an opened window) / jQuery.html()with a computed valuetraust-ts-xss-markdown-raw-html(WARNING)rehype-rawwithout a laterrehype-sanitizetraust-ts-xss-reflected-response-taintsend/write/endstring bodytraust-ts-path-traversal-fs-taintreq.url/req.path) to the path argument of fs read/write/stream/remove,res.sendFile,res.download;path.basenameclearstraust-ts-open-redirect-response-taintres.redirect/Locationtargettraust-ts-open-redirect-client-navigation(WARNING)URLSearchParams.get/location.search/location.hashas the URL oflocation.*orwindow.opentraust-ts-ssrf-request-taint(extended)http(s).request, remaining axios methods, got, superagent, needle, undiciSinks are focused on the URL/path argument, so a tainted file body or window name doesn't match. Test, spec, mock and mock-backend files are excluded.
Measured on eight real checkouts
Run on eight real checkouts: 35 hits, including every confirmed TS/JS finding present in them.
dangerouslySetInnerHTML, mock servers,import.meta.urlandoptions.pathread as request paths, a window name read as a URL, and non-Express.download()calls.javascript:URLs bound tohref, markdown-to-jsx and marked renderer overrides, sanitize-then-transform pipelines.Verification
opengrep testontypescript/: 16/16 passed; each new fixture's hit count equals itsruleid:lines.make testgreen: main 1,491 passed; development 454 passed.🤖 Generated with Claude Code