T09 · Insecure Skill Coding Practices
- Location
scripts/announcement.js:23- Finding
Server-Side Request Forgery Through Unrestricted Monitoring URLs
- Content
View full analysis
{ const url = new URL(urlStr); const lib = url.protocol === 'https:' ? https : http; const req = lib.get(urlStr, { timeout: timeoutMs, headers: { 'User-Agent': 'Mozilla/5.0 PlatformMonitor/1.1' } }, (res) => { const chunks = []; res.on('data', d => chunks.push(d)); res.on('end', () => { resolve({ statusCode: res.statusCode, body: Buffer.concat(chunks).toString('utf8') }); }); }); req.on('timeout', () => { req.destroy(); reject(new Error(`timeout after ${timeoutMs}ms`)); }); req.on(' ...[truncated 2988 chars]- Remediation
View remediation
