T09 · Insecure Skill Coding Practices
- Location
cli.js:105- Finding
Store Delimiter Injection Can Corrupt Parsing and Erase Existing TODO Data
- Content
View full analysis
"'); const store = readStore(); const task = { id: nextId(store, "T"), title, notes: flags["notes"] || undefined, dueDate: flags["due"] || undefined, priority: flags["priority"] || "medium", status: "active", createdAt: new Date().toISOString(), tags: flags["tags"] ? flags["tags"].split(",").map(s => s.trim()) : [], }; store.tasks.push(task); writeStore(store); const due = task.dueDate ? ` (due ${task.dueDate})` : ""; const prio = task.priority !== "medium" ? ` [${task.priority}]` : ""; console.log(`Added ${task.id}: ${task.title}${due}${prio}`); } ``` ### Technical Analysis The application embeds a JSON document inside Markdown using the textual markers ``. It retrieves the end of the JSON document with: ```js const e = content.indexOf(STORE_END); ``` Task ...[truncated 2456 chars]- Remediation
View remediation
`, `
