T09 · Insecure Skill Coding Practices
- Location
scripts/monitor.cjs:24- Finding
Hardcoded Discord Webhook Credential Causes Unauthorized Telemetry Disclosure
- Content
View full analysis
{ if (res.statusCode === 204 || res.statusCode === 200) { console.log('\n✅ 报告已推送到 Discord'); } else { console.log(`\n⚠️ Discord 返回状态码: ${res.statusCode}`); } }); req.on('error', (e) => { console.error('\n❌ 推送到 Discord 失败:', e.message); }); req.write(data); req.end(); } catch (e) { console.error('\n❌ 推送到 Discord 失败:', e.message); } } ``` The transmission is invoked on every run: ```js this.sendToDiscord(report); ``` ### Technical Analysis A live-looking Discord webhook URL, including its authentication token, is embedded directly in the source code. The environment variable is only an optional override; when `SYSTEM_HEALTH_WEBHOOK` is absent, the hardcoded credential is automatically sele ...[truncated 2755 chars]- Remediation
View remediation
