T09 · Insecure Skill Coding Practices
- Location
web/index.html:743- Finding
Stored Cross-Site Scripting Through Unsanitized Digest and Source Content
- Content
View full analysis
${badge}`; ... list.innerHTML = html; ``` Full digest content is also rendered directly as HTML: ```js async function loadDigest(id) { const list = document.getElementById('list'); const viewer = document.getElementById('viewer'); list.innerHTML = ''; try { const resp = await fetch(`${API}/digests/${id}`); const d = await resp.json(); let text = d.content; // Hide private sections for non-logged-in users if (!currentUser) { text = text.replace(/🧹\s*建议取关[\s\S]*?(?=\n(?:💤|🔍|👀|📰|🔖|🔥|—|$))/g, ''); text = text.replace(/🔖\s*Bookmarks\s*精选[\s\S]*?(?=\n(?:💤|🔍|👀|📰|🧹|🔥|—|$))/g, ''); } await loadMarkedUrls(); text = text.replace(/(https?:\/\/x\.com\/[^\s<)]+)/g, (match) => { const clean = match.split('?')[0]; const isMarked = markedUrls.has(clean); const markId = markedUrls.get(clean); let markHtml; if (currentUser) { markHtml = isMarked ? `${title}${excerpt ? `${excerpt}` : ''}- Remediation
View remediation
