T09 · Insecure Skill Coding Practices
- Location
lib/config.js:125- Finding
Unvalidated session identifiers allow filesystem path traversal
- Content
View full analysis
ensureDir(dir)); return dirs; } ``` The logger also writes to a path derived from the same identifier: ```javascript constructor(sessionId) { this.sessionId = sessionId; this.logFile = path.join(config.getSessionDir(sessionId), 'run.log'); this.steps = []; } log(level, message) { const timestamp = new Date().toISOString(); const line = `[${timestamp}] [${level}] ${message}`; console.log(line); if (this.logFile) { fs.appendFileSync(this.logFile, line + '\n'); } } ``` ### Technical Analysis The command-line `--session-id` value is used directly in a path without a character allowlist, canonicalization, or containment validation. Because the fixed `insight_` prefix does not remove embedded path separators or `..` components, an identifier such ...[truncated 1429 chars]- Remediation
View remediation
