Is DietrichGebert/ponytail safe?
- Node.js shell/command execution
- Defense-evasion command idiom
- Node.js dynamic code execution
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
DietrichGebert/ponytail is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 1 risky construct is reported for review. It can: dynamic code execution, filesystem read, filesystem write and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 20/100 (low).
@dietrichgebert/ponytail 5.1.0
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of DietrichGebert/ponytail's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (6)
The code turns strings into live code at runtime (eval / new Function / exec).
matches = vm.runInNewContext('re.test(s)', { re: matcherRe, s: agentType }, { timeout: 100 });Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.
Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.
A command uses a known defense-evasion idiom: PowerShell execution-policy bypass / encoded command / hidden window, macOS code-signing bypass, or launching a payload from a world-writable temp directory. These are hallmarks of droppers and rarely appear in legitimate code.
? `powershell -ExecutionPolicy Bypass -File "${scriptPath}"`Fix: Verify why the component bypasses execution policy / code signing or runs from a temp directory; these patterns are characteristic of malware staging.
The component can run operating-system commands or spawn processes.
const { execFileSync } = require('child_process');const { spawnSync } = require('child_process');const res = spawnSync(cmdline, { stdio: 'inherit', cwd: root, shell: true });Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
The component reads files from disk.
const content = fs.readFileSync(filePath, 'utf8');
const content = fs.readFileSync(filePath, 'utf8');
return normalizePersistedMode(fs.readFileSync(statePath, 'utf8').trim()) || getDefaultMode();
const raw = fs.readFileSync(settingsPath, 'utf8').replace(/^\uFEFF/, '');
try { nudged = fs.readFileSync(nudgeFlagPath, 'utf8'); } catch (e) { /* not nudged yet */ }const config = JSON.parse(fs.readFileSync(configPath, 'utf8').replace(/^\uFEFF/, ''));
const config = JSON.parse(fs.readFileSync(getConfigPath(), 'utf8').replace(/^\uFEFF/, ''));
const config = JSON.parse(fs.readFileSync(getConfigPath(), 'utf8').replace(/^\uFEFF/, ''));
config = JSON.parse(fs.readFileSync(configPath, 'utf8').replace(/^\uFEFF/, ''));
filterSkillBodyForMode(fs.readFileSync(SKILL_PATH, 'utf8'), effectiveMode);
try { text = fs.readFileSync(path.join(root, f), 'utf8').slice(0, 65536); } catch (e) { continue; }return fs.readFileSync(projectStatePath || statePath, 'utf8').trim() || null;
const src = fs.readFileSync(path.join(ROOT, 'skills', name, 'SKILL.md'), 'utf8').replace(/\r\n/g, '\n');
return fs.readFileSync(path.join(root, relPath), 'utf8').replace(/\r\n/g, '\n').trim();
const raw = fs.readFileSync(path.join(root, relPath), 'utf8').replace(/^\uFEFF/, '');
config = JSON.parse(fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, ''));
const template = JSON.parse(fs.readFileSync(TEMPLATE, 'utf8'));
const version = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')).version;
const raw = fs.readFileSync(settingsPath, 'utf8').replace(/^\uFEFF/, '');
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
fs.writeFileSync(statePath, mode);
try { fs.unlinkSync(tmpPath); } catch (e) { /* renamed */ }try { fs.writeFileSync(nudgeFlagPath, stalePath || ''); } catch (e) { /* best-effort */ }fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf8');
fs.writeFileSync(file, mode);
if (file) try { fs.unlinkSync(file); } catch (e) {}fs.writeFileSync(p, render(name));
fs.writeFileSync(file, JSON.stringify(config, null, 2) + '\n', 'utf8');
fs.unlinkSync(file);
fs.unlinkSync(filePath);
fs.rmSync(dir, { recursive: true });fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component reads files from disk.
data = json.loads((_config_dir() / "config.json").read_text(encoding="utf-8-sig"))
body = REVIEW_SKILL.read_text(encoding="utf-8")
body = PONYTAIL_SKILL.read_text(encoding="utf-8")
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in DietrichGebert/ponytail.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →