T09 · Insecure Skill Coding Practices
- Location
scripts/install-global-skill.js:159- Finding
Path Traversal Through Unvalidated Skill Slug and Agent Name
- Content
View full analysis
/workspaces/.`, ); } return resolved; } ``` ```js const slug = args.slug; const stagedDir = path.join(layout.stagingRoot, slug); const globalDir = path.join(layout.globalRoot, slug); const tempGlobalDir = `${globalDir}.tmp`; const result = installOrUpdate(slug, args.version, layout); const stagedOrigin = path.join(stagedDir, '.clawhub', 'origin.json'); if (!exists(stagedOrigin)) { throw new Error(`Staged skill missing origin file: ${stagedOrigin}`); } const stagedMeta = readJson(stagedOrigin); let backupPath = null; if (exists(globalDir) && !args.skipBackup) { backupP ...[truncated 3668 chars]- Remediation
View remediation
