Repository navigation
Conversation
…ect rules; more SSRF sinks (pack v1.11) 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 the rules hit 35 times, including all three confirmed findings present there (console LogsPage.tsx, SharedResourceWarning.js, backend/src/routes/serve.ts). 0.40.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chubirka 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 needs to move to traust before it can land on Since traust#291, Could you open this as a traust PR instead? It's a mechanical move:
traust's #117 is fine as it is for The traust-standardization skill ( |
|
Thanks, Shaun. You're right: since traust#291 the default stack on 🤖 Generated with Claude Code |
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.🤖 Generated with Claude Code