Repository navigation
Commit cdb9646
committed
fix(crosswalk): render resolved control ids, never the URL text
CodeQL still reported js/xss after the first pass. The SARIF flow showed
the FRAMEWORKS allow-list did cut the framework-name path, but two things
were not barriers it recognises:
* isPlausibleControlId used a negated character class (!/[<>]/.test),
and CodeQL models positive anchored matches, not negations
* toNode returned its argument unchanged on the node branch, so taint
flowed straight back out to appendChild
Replace the character check with resolution. resolveControlId looks the
id up in the same three places renderControlDetail reads - the framework
registry, the backlink index, then DATA mappings - and returns the stored
string. The route renders the resolved value and the allow-listed
framework name, so no URL-derived string reaches the DOM at all. An id
that resolves to nothing falls through to the frameworks index, which is
all an unmatched id could have rendered anyway.
Verified every real deep link still resolves to itself:
1097/1097 backlink, 1514 registry, 3210 DATA mapping links, 0 broken.
Payloads and __proto__/constructor keys all resolve to null.1 parent b9ad99d commit cdb9646
1 file changed
Lines changed: 35 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1642 | 1642 | | |
1643 | 1643 | | |
1644 | 1644 | | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
1653 | 1667 | | |
1654 | 1668 | | |
1655 | 1669 | | |
| |||
1687 | 1701 | | |
1688 | 1702 | | |
1689 | 1703 | | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
1698 | 1717 | | |
1699 | 1718 | | |
1700 | 1719 | | |
| |||
0 commit comments