| import { readdirSync, readFileSync, mkdirSync, writeFileSync, existsSync, rmSync, copyFileSync } from "fs"; | ||
| import { createHash } from "crypto"; | ||
| import { join, dirname } from "path"; | ||
| import { join, dirname, sep } from "path"; | ||
| import { fileURLToPath } from "url"; | ||
@@ -167,3 +167,3 @@ import { z } from "zod"; | ||
| const filePath = join(AGENTS_DIR, `${slug}.agent.md`); | ||
| if (!filePath.startsWith(AGENTS_DIR + "/")) { | ||
| if (!filePath.startsWith(AGENTS_DIR + sep)) { | ||
| return `Invalid slug '${slug}': path traversal detected.`; | ||
@@ -195,3 +195,3 @@ } | ||
| const filePath = join(AGENTS_DIR, `${slug}.agent.md`); | ||
| if (!filePath.startsWith(AGENTS_DIR + "/")) { | ||
| if (!filePath.startsWith(AGENTS_DIR + sep)) { | ||
| return `Invalid slug '${slug}': path traversal detected.`; | ||
@@ -198,0 +198,0 @@ } |
| import { readdirSync, readFileSync, mkdirSync, writeFileSync, existsSync, rmSync } from "fs"; | ||
| import { join, dirname } from "path"; | ||
| import { join, dirname, sep } from "path"; | ||
| import { homedir } from "os"; | ||
@@ -73,3 +73,3 @@ import { fileURLToPath } from "url"; | ||
| // Guard against path traversal | ||
| if (!skillDir.startsWith(LOCAL_SKILLS_DIR + "/")) { | ||
| if (!skillDir.startsWith(LOCAL_SKILLS_DIR + sep)) { | ||
| return `Invalid slug '${slug}': must be a simple kebab-case name without path separators.`; | ||
@@ -96,3 +96,3 @@ } | ||
| // Guard against path traversal | ||
| if (!skillDir.startsWith(LOCAL_SKILLS_DIR + "/")) { | ||
| if (!skillDir.startsWith(LOCAL_SKILLS_DIR + sep)) { | ||
| return { ok: false, message: `Invalid slug '${slug}': must be a simple kebab-case name without path separators.` }; | ||
@@ -99,0 +99,0 @@ } |
+1
-1
| { | ||
| "name": "heymax", | ||
| "version": "1.5.0", | ||
| "version": "1.5.2", | ||
| "description": "Max — a personal AI assistant for developers, built on the GitHub Copilot SDK", | ||
@@ -5,0 +5,0 @@ "bin": { |
316882
0