📦 deps(thirdparty): update snapshots
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antigravity-bundle-aas-qa-test-automation",
|
||||
"version": "13.7.0",
|
||||
"version": "13.9.0",
|
||||
"description": "Editorial \"AAS QA & Test Automation\" bundle for Claude Code from Antigravity Awesome Skills.",
|
||||
"author": {
|
||||
"name": "sickn33 and contributors",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "agyb-aas-qa-test-automation",
|
||||
"version": "13.7.0",
|
||||
"version": "13.9.0",
|
||||
"description": "Install the \"AAS QA & Test Automation\" workflow plugin from Antigravity Awesome Skills.",
|
||||
"author": {
|
||||
"name": "sickn33 and contributors",
|
||||
|
||||
+19
-1
@@ -13,10 +13,28 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const sanitizeFilename = require('sanitize-filename');
|
||||
|
||||
// Change to skill directory for proper module resolution
|
||||
process.chdir(__dirname);
|
||||
|
||||
function safeUserPath(pathValue, baseDir = process.cwd()) {
|
||||
const root = path.resolve(baseDir);
|
||||
const segments = String(pathValue ?? '').split(/[\\/]+/).filter(Boolean).map((segment) => {
|
||||
const sanitized = sanitizeFilename(segment);
|
||||
if (sanitized !== segment || !sanitized) {
|
||||
throw new Error(`Unsafe path segment: ${segment}`);
|
||||
}
|
||||
return sanitized;
|
||||
});
|
||||
const target = path.resolve(root, ...segments);
|
||||
const rel = path.relative(root, target);
|
||||
if (rel.startsWith('..') || path.isAbsolute(rel)) {
|
||||
throw new Error(`Path escapes allowed directory: ${pathValue}`);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Playwright is installed
|
||||
*/
|
||||
@@ -54,7 +72,7 @@ function getCodeToExecute() {
|
||||
|
||||
// Case 1: File path provided
|
||||
if (args.length > 0 && fs.existsSync(args[0])) {
|
||||
const filePath = path.resolve(args[0]);
|
||||
const filePath = safeUserPath(args[0]);
|
||||
console.log(`📄 Executing file: ${filePath}`);
|
||||
return fs.readFileSync(filePath, 'utf8');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user