T09 · Insecure Skill Coding Practices
- Location
SKILL.md:1148- Finding
Mandatory Dry Run Performs Real Destructive Cleanup
- Content
View full analysis
sum + i.size_mb, 0); const totalBytes = Math.round(totalMb * 1024 * 1024); const report = { timestamp: new Date().toISOString(), bytes_freed: totalBytes, items_cleaned: items, errors, duration_ms: durationMs, }; fs.mkdirSync(DATA_DIR, { recursive: true }); fs.writeFileSync(LAST_RUN_FILE, JSON.stringify(report, null, 2)); appendHistory(report); const totalGb = (totalMb / 1024).toFixed(2); const summary = `Freed ${totalGb} GB across ${items.length} items in ${(durationMs / 1000).toFixed(1)}s`; writeStatus(errors.length > 0 ? "error" : "ok", summary); console.log(`[mac-cleaner] ${summary}`); if (errors.length > 0) { console.log(`[mac-cleaner] ${errors.length} errors encountered`); } console.log(`[mac-cleaner] Report written to ${LAST_RUN_FILE}`); } main(); ``` The installation instructions nevertheless describe this invocation as a safe preview: ```markdown ### Step 11 -- Mandatory Dry Run (Preview Before Deleting) **ALWAYS run dry-run first.** Show the user what will be cleaned before anything is deleted. **EXEC ...[truncated 2476 chars]- Remediation
View remediation
