T09 · Insecure Skill Coding Practices
- Location
scripts/scan.js:33- Finding
Unrestricted Fetching of Attacker-Controlled Article URLs Enables SSRF
- Content
View full analysis
s && KEYWORDS.some(k => s.title?.includes(k))) .slice(0, 3) .map(s => ({ source: "Hacker News", title: s.title, link: s.url || `https://news.ycombinator.com/item?id=${s.id}`, raw_summary: "Community discussion" })); ``` ```js for (const item of items) { console.log(`\nReading: ${item.title}...`); const content = await fetchContent(item.link); ``` From `scripts/monitor.js`: ```js async function fetchContent(url) { try { const { data } = await axios.get(url, { headers: { 'User-Agent': 'Mozilla/5.0 (compatible; MakimaBot/1.0)' }, timeout: 5000 }); const $ = cheerio.load(data); $('script, style, nav, footer, .ad').remove(); let text = $('article').text() || $('main').text() || $('body').text(); return text.replace(/\s+/g, ' ').trim().substring(0, 1000); } catch (e) { return "Content inaccessible."; } } ``` ```js for (const item of items) { let content = "Summary unavailable"; if (!ite ...[truncated 2405 chars]- Remediation
View remediation
