Is JuliusBrussee/caveman safe?
- Defense-evasion command idiom
- Agent instructions download code and run it
- Python shell/command execution
What to do: Read the findings below before installing: each one opens the exact line of code it was found on.
JuliusBrussee/caveman is a GitHub repository analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 2 risky constructs are reported for review. Its Go code was not checked for shell, network or file access, so this result is partial. It can: delegated authentication, dynamic code execution, filesystem read, filesystem write, install time execution, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 30/100 (medium).
caveman-installer 4.1.0
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of JuliusBrussee/caveman'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 (14)
The code turns strings into live code at runtime (eval / new Function / exec).
new Function('module', 'exports', 'require', '__dirname', '__filename', code)(new Function('module', 'exports', 'require', '__dirname', '__filename', code)(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.
command: 'powershell -ExecutionPolicy Bypass -File "' + managedStatusLinePath + '"'
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.
import { spawn } from 'node:child_process';const child = spawn(command, args, { env, cwd, windowsHide: true, stdio: [input === null ? 'ignore' : 'pipe', 'pipe', 'pipe'] });import { spawnSync } from "node:child_process";return spawnSync("git", args, { cwd, encoding, maxBuffer: 8 * 1024 * 1024 });import { spawn } from "node:child_process";const child = spawn(invocation.command, invocation.args, {import { spawnSync } from "node:child_process";import { spawnSync } from "node:child_process";const result = spawnSync("gh", argv, { encoding: "utf8" });import { spawnSync } from "node:child_process";const result = spawnSync(invocation.command, invocation.args, { env, encoding: "utf8", timeout: 15_000 });import { spawn } from "node:child_process";const child = spawn(bin, process.argv.slice(2), { stdio: "inherit" });import { spawn, spawnSync } from "node:child_process";const r = spawnSync(binary, ["--version"], { encoding: "utf8", timeout: 15000 });const b = spawnSync(process.execPath, ["scripts/build-extension-zip.mjs", "firefox"], { cwd: EXT_ROOT, encoding: "utf8", timeout: 60000 });wex = spawn(invocation.command, invocation.args, invocation.options);
try { spawnSync("taskkill", ["/PID", String(wex.pid), "/T", "/F"], { timeout: 10000 }); } catch { /* ignore */ }const child_process = require('child_process');const r = child_process.spawnSync('sh', ['-c', `command -v ${shellEscape(cmd)}`], { stdio: 'ignore' });return child_process.spawnSync(invocation.command, invocation.args, opts || {});return child_process.spawnSync(cmd, args, opts || {});const r = child_process.spawnSync('/bin/sh', ['-c', 'command -v node'], { encoding: 'utf8' });const probe = child_process.spawnSync(executable, ['--version'], { encoding: 'utf8' });const r = child_process.spawnSync('curl', [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 can run operating-system commands or spawn processes.
result = subprocess.run(command, input=data, env=env, cwd=root, capture_output=True, timeout=timeout)
process = subprocess.Popen([str(proxy), "serve"], env=env, cwd=root, stdout=log, stderr=log)
out = subprocess.run(
cmd, capture_output=True, text=True, check=True, cwd=cwd,
encoding="utf-8", errors="replace", stdin=subprocess.DEVNULL,
timeout=CALL_TIMEOUT,
)out = subprocess.run(
[claude_bin(), "--version"], capture_output=True, text=True,
check=True, encoding="utf-8", errors="replace",
)out = subprocess.run(
["node", str(hooks / TRACKER)], cwd=tmp, env=env,
input=json.dumps({"prompt": "ordinary prompt"}),
capture_output=True, text=True, check=True, encoding="utf-8",
)out = subprocess.run(
cmd, capture_output=True, text=True, check=True, env=env,
encoding="utf-8", errors="replace", stdin=subprocess.DEVNULL,
)base_src = subprocess.run(
["git", "show", f"{args.base}:src/hooks/{TRACKER}"], cwd=ROOT,
capture_output=True, text=True, check=True, encoding="utf-8",
).stdoutbase_sha = subprocess.run(
["git", "rev-parse", "--short", args.base], cwd=ROOT,
capture_output=True, text=True, check=True,
).stdout.strip()proc = subprocess.run([_binary(), *args], **kwargs)
result = subprocess.run(command, **run_kwargs)
subprocess.run(
args, input=prompt, text=True, capture_output=True, check=True,
encoding="utf-8", errors="replace", timeout=CLAUDE_CALL_TIMEOUT_SECONDS,
cwd=str(workdir),
)result = subprocess.run(command, **run_kwargs)
subprocess.run(
args, input=prompt, text=True, capture_output=True, check=True,
encoding="utf-8", errors="replace", timeout=CLAUDE_CALL_TIMEOUT_SECONDS,
cwd=str(workdir),
)result = subprocess.run(
args,
cwd=cwd,
env=merged_env,
text=True,
encoding="utf-8",
stdin=subprocess.DEVNULL,
capture_output=True,
check=False,
)subprocess.run(
["node", "src/hooks/caveman-mode-tracker.js"],
cwd=ROOT,
env={**os.environ, **hook_env, "CAVEMAN_DEFAULT_MODE": "off"},
text=True,
encoding="utf-8",
inp …ultra_prompt = subprocess.run(
["node", "src/hooks/caveman-mode-tracker.js"],
cwd=ROOT,
env={**os.environ, **hook_env},
text=True,
encoding="utf-8",
input='{"prompt":"/ …subprocess.run(
["node", "src/hooks/caveman-mode-tracker.js"],
cwd=ROOT,
env={**os.environ, **hook_env},
text=True,
encoding="utf-8",
input='{"prompt":"normal mode"}', …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; avoid shell=True.
The component reads files from disk.
const buf = fs.readFileSync(file);
const parsed = JSON.parse(fs.readFileSync(p, 'utf8'));
const v = fs.readFileSync('/proc/version', 'utf8').toLowerCase();const entry = JSON.parse(fs.readFileSync(file, 'utf8')).caveman;
const rule = fs.readFileSync(path.join(repoRoot, 'src', 'rules', 'caveman-activate.md'), 'utf8').trimEnd();
const raw = fs.readFileSync(path.join(repoRoot, OMP_PACKAGE_FILE), 'utf8');
const ruleBody = fs.readFileSync(path.join(repoRoot, 'src', 'rules', 'caveman-activate.md'), 'utf8');
fs.writeFileSync(path.join(agentsRoot, name), transformOpencodeAgentFrontmatter(fs.readFileSync(src, 'utf8')));
const body = transformOpencodeAgentFrontmatter(fs.readFileSync(src, 'utf8'), { subagent: true });const ruleBody = fs.readFileSync(path.join(repoRoot, 'src', 'rules', 'caveman-activate.md'), 'utf8').trimEnd() + '\n';
const existing = fs.readFileSync(agentsMd, 'utf8');
try { if (!hooksManifestIsOurs(manifest)) foreignType = JSON.parse(fs.readFileSync(manifest, 'utf8')).type; } catch (_) {}return crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');const txt = fs.readFileSync(tmp, 'utf8');
const pkg = JSON.parse(fs.readFileSync(manifest, 'utf8'));
const pkg = JSON.parse(fs.readFileSync(require.resolve('@caveman-ai/cli/package.json'), 'utf8'));const body = fs.readFileSync(ocAgentsMd, 'utf8');
if (fs.readFileSync(grokAgentsMd, 'utf8').includes(OPENCLAW.MARK_BEGIN)) note(` would strip caveman block from ${grokAgentsMd}`);const body = transformCursorAgentFrontmatter(fs.readFileSync(path.join(repoRoot, 'agents', file), 'utf8'), { readonly });try { return fs.readFileSync(p, 'utf8'); } catch (_) { return null; }const content = fs.readFileSync(fd, 'utf8');
hash.update(fs.readFileSync(target));
parsed = JSON.parse(fs.readFileSync(journalPath, 'utf8'));
const source = fs.readFileSync(normalized, 'utf8');
try { raw = fs.readFileSync(p, 'utf8'); }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.
await fs.rm(outDir, { recursive: true, force: true });await fs.writeFile(path.join(outDir, `${c.name}.input.json`), JSON.stringify(c.input, null, 2) + '\n');await fs.writeFile(path.join(outDir, `${c.name}.expected.json`), JSON.stringify(expected, null, 2) + '\n');await fs.writeFile(path.join(outDir, 'manifest.json'), JSON.stringify({ cases: manifest }, null, 2) + '\n');if (pluginEnv && !tmpExisted) { try { fs.rmdirSync(pluginEnv.TMPDIR); } catch (_) {} }if (dir) { try { fs.rmSync(dir, { recursive: true, force: true }); } catch (_) {} }if (cwd) { try { fs.rmSync(cwd, { recursive: true, force: true }); } catch (_) {} }fs.rmSync(extDir, { recursive: true, force: true });if (saved) { try { fs.rmSync(saved, { recursive: true, force: true }); } catch (_) {} }{ relativePath: COPILOT_HOOK_FILE, write: (stage) => fs.writeFileSync(stage, JSON.stringify(hook, null, 2) + '\n') },fs.writeFileSync(path.join(pluginDir, 'plugin.json'), JSON.stringify({fs.rmSync(staging, { recursive: true, force: true });fs.writeFileSync(path.join(pluginDir, OMP_PACKAGE_FILE), JSON.stringify(pkg, null, 2) + '\n');
fs.writeFileSync(path.join(pluginDir, OMP_INDEX_FILE), ompExtensionSource(ruleBody));
fs.writeFileSync(path.join(agentsRoot, name), transformOpencodeAgentFrontmatter(fs.readFileSync(src, 'utf8')));
fs.writeFileSync(path.join(rulesRoot, OMP_RULE_FILE), ruleBody);
write: (stage) => fs.writeFileSync(stage, body, { mode: 0o600, flag: 'wx' }),fs.writeFileSync(agentsMd, next, { mode: 0o644 });fs.writeFileSync(agentsMd, next, { mode: 0o644 });fs.writeFileSync(agentsMd, existing + sep + block, { mode: 0o644 });fs.writeFileSync(agentsMd, fencedBlock, { mode: 0o644 });for (const { tmp } of staged) try { fs.unlinkSync(tmp); } catch (_) { /* best effort */ }if (scratch) try { fs.rmSync(scratch, { recursive: true, force: true }); } catch (_) { /* best effort */ }const unlinkDest = () => { try { fs.unlinkSync(dest); } catch (_) { /* best-effort */ } };out = fs.createWriteStream(dest, { fd });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.
metadata = json.loads((package / "package.json").read_text(encoding="utf-8"))
detail = (root / "proxy.log").read_text(encoding="utf-8", errors="replace")[-1000:]
if package.exists() or sentinel.read_bytes() != b'{"preserve":true}\n':prompts = [c["prompt"] for c in json.loads(PROMPTS.read_text(encoding="utf-8"))["cases"]]
prompts = [p.strip() for p in PROMPTS.read_text(encoding="utf-8").splitlines() if p.strip()]
skill_md = (SKILLS / skill / "SKILL.md").read_text(encoding="utf-8")
data = json.loads(SNAPSHOT.read_text(encoding="utf-8"))
head_src = (HOOKS / TRACKER).read_text(encoding="utf-8")
prompts = [p.strip() for p in PROMPTS.read_text(encoding="utf-8")
skill_md = (SKILLS / "caveman" / "SKILL.md").read_text(encoding="utf-8")
cases = json.loads(CASES.read_text(encoding="utf-8"))["cases"]
data = json.loads(path.read_text(encoding="utf-8"))
return urllib.request.build_opener(_RejectRedirects()).open(req, timeout=timeout)
orig_text = orig_path.read_text(encoding="utf-8", errors="ignore")
comp_text = comp_path.read_text(encoding="utf-8", errors="ignore")
raw = filepath.read_bytes()
response = output_path.read_text(encoding="utf-8")
if backup_path.read_bytes() != original_raw:
text = filepath.read_text(encoding="utf-8", errors="ignore")
return path.read_text(encoding="utf-8")
document = yaml.safe_load(path.read_text(encoding="utf-8"))
check_review_markers(current_path.read_text(encoding="utf-8"), "current.yaml")
orig_text = orig_path.read_text(encoding="utf-8", errors="ignore")
comp_text = comp_path.read_text(encoding="utf-8", errors="ignore")
raw = filepath.read_bytes()
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.
sentinel.write_bytes(b'{"preserve":true}\n')(root / "npmrc").write_text("", encoding="utf-8")with (root / "proxy.log").open(mode="wb") as log:
terse_file.write_text(terse_prefix, encoding="utf-8")
skill_file.write_text(f"{terse_prefix}\n\n{skill_md}", encoding="utf-8")partial.write_text(
json.dumps(snapshot, ensure_ascii=False, indent=2), encoding="utf-8"
)SNAPSHOT.write_text(json.dumps(snapshot, ensure_ascii=False, indent=2), encoding="utf-8")
shutil.copytree(HOOKS, hooks)
(hooks / TRACKER).write_text(tracker_source, encoding="utf-8")
(config / ".caveman-active").write_text(level, encoding="utf-8")
payload.write_text(json.dumps({"hookSpecificOutput": {
"hookEventName": "UserPromptSubmit",
"additionalContext": context,
}}), encoding="utf-8")SNAPSHOT.write_text(json.dumps(snapshot, ensure_ascii=False, indent=2),
encoding="utf-8")(claude_dir / "settings.json").write_text(json.dumps(existing_settings, indent=2) + "\n", encoding="utf-8")
(claude_dir / ".caveman-active").write_text("caveman", encoding="utf-8")(claude_dir / ".caveman-active").write_text("wenyan-ultra", encoding="utf-8")(claude_dir / "settings.json").write_text(
json.dumps(pristine, indent=2) + "\n", encoding="utf-8"
)(claude_dir / "settings.json").write_text(
json.dumps(settings, indent=2) + "\n", encoding="utf-8"
)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.
package.json has a 'prepare' script (runs on git/local installs and before publishing).
"prepack": "node ../packages/cli/scripts/gen-wedge-installer.mjs && node scripts/copy-binary-installer.mjs",
"prepack": "node ../packages/cli/scripts/gen-wedge-installer.mjs",
"prepack": "npm run build",
"prepack": "npm run build",
"prepack": "npm run build",
"prepack": "npm run build",
"prepack": "npm run build",
"prepack": "node ../packages/cli/scripts/gen-wedge-installer.mjs",
Why it matters: Usually a build step, but confirm it doesn't fetch or run remote code.
Fix: Usually a legitimate build step; confirm it only builds and does not fetch or execute remote code.
The component makes outbound network requests.
pages.set(url, fetch(url, { redirect: "follow", signal: AbortSignal.timeout(20_000) })import { createServer } from 'node:http';response = await fetch(url, { signal: AbortSignal.timeout(timeout) });import { createServer as createHttpServer } from "node:http";try { await fetch(`http://127.0.0.1:${bidiPort}/session/status`, { signal: AbortSignal.timeout(1200) }); agentUp = true; break; } catch { /* retry */ }const https = _https || require('https');function fetch(target) {const req = https.get(target, (res) => {fetch(res.headers.location);
fetch(url);
response = await fetch(url, { signal: AbortSignal.timeout(timeout) });import { request as httpRequest } from "node:http";import { request as httpsRequest } from "node:https";const response = await fetch(`${cfg.baseURL}/api/v1/auth/me`, { headers: { authorization: `Bearer ${cfg.token}` }, signal: AbortSignal.timeout(5000) })const response = await fetch(`${cfg.baseURL}/api/v1/auth/me`, { headers: { authorization: `Bearer ${cfg.token}` }, signal: AbortSignal.timeout(1500) });return fetch(url, {const response = await fetch(url, { signal: AbortSignal.timeout(timeoutSeconds * 1000) });const response = await fetch(`${registry}/@caveman-ai%2fcli`, {resp = await fetch(`${baseURL}/api/v1/me/wrap-entitlement`, {response = await fetch(`${cfg.baseURL}/api/v1/projects/${encodeURIComponent(cfg.projectId)}/keys/${encodeURIComponent(cfg.gatewayKeyId)}/revoke`, {response = await fetch(`${cfg.baseURL}/api/v1/auth/logout`, request);const response = await fetch(`${cfg.baseURL}/api/v1/imports?format=local-scan${project}`, {const response = await fetch(`${cfg.baseURL}/api/v1/imports?format=caveman-jsonl`, {const response = await fetch(`${cfg.baseURL}/api/v1/practice-findings${project}`, {const response = await fetch(`${cfg.baseURL}/api/v1/imports?format=${encodeURIComponent(format)}`, {Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
The component makes outbound network requests.
import urllib.request
with urllib.request.urlopen(f"{gateway}/health/live", timeout=1) as response:outgoing = httpx.Request(request.method, request.url, headers=headers, content=content, extensions=request.extensions)
self.runtime, self.scope, self.transport = ensure_sync(runtime), scope, transport or httpx.HTTPTransport()
self.runtime, self.scope, self.transport = ensure_async(runtime), scope, transport or httpx.AsyncHTTPTransport()
import urllib.request
raise urllib.error.HTTPError(req.full_url, code, "cave_redirect_not_allowed", response_headers, None)
return urllib.request.build_opener(_RejectRedirects()).open(req, timeout=timeout)
req = urllib.request.Request(
f"{self.base_url}/sdk/v1/tool-search",
data=json.dumps(body).encode(),
headers=headers(self, wf),
method="POST",
)req = urllib.request.Request(
f"{self.base_url}/sdk/v1/compress",
data=json.dumps(body).encode(),
headers=headers(self, self.default_workflow),
method="POST",
)req = urllib.request.Request(
f"{self.base_url}/sdk/v1/cave-plan",
headers=otlp_headers(self),
method="GET",
)req = urllib.request.Request(
f"{self._cave.base_url}{path}",
data=json.dumps(body).encode() if body is not None else None,
headers=headers(self._cave, self._cave.default_workflow),
method=met …req = urllib.request.Request(
f"{self._cave.base_url}/sdk/v1/context/pack",
data=json.dumps({"query": query, "items": wire_items, "options": wire_options}).encode(),
headers=headers(self._cave, self._cave …req = urllib.request.Request(
f"{self.cave.base_url}{path}",
data=json.dumps(body).encode(),
headers=request_headers,
method="POST",
)req = urllib.request.Request(
f"{self.cave.base_url}{path}",
headers=headers(
self.cave,
self.workflow,
trace_id=self.trace_id,
parent_span_id=self.span …req = urllib.request.Request(
f"{self.cave.base_url}{self.prefix}{path}",
data=json.dumps(body).encode(),
headers=headers(
self.cave,
self.workflow,
self.up …req = urllib.request.Request(
f"{self.cave.base_url}/v1/traces",
data=json.dumps(self._build_payload(batch)).encode(),
headers=otlp_headers(self.cave),
method=" …req = urllib.request.Request(
f"{self._cave.base_url}{_POLICY_PATH}",
headers=request_headers,
method="GET",
)return lambda sock, *args, **kwargs: http.client.HTTPResponse(_Budget(sock, deadline, closed), *args, **kwargs)
connection = http.client.HTTPSConnection(via_host, via_port, context=self._ssl or ssl.create_default_context())
connection = http.client.HTTPConnection(via_host, via_port)
raise http.client.IncompleteRead(bytes(data), response.length)
import urllib.request
request = urllib.request.Request(
f"{base}/chat/completions",
data=json.dumps(body).encode("utf-8"),
headers={"Content-Type": "application/json"},
)Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An instruction file the agent follows (a skill, subagent, command or project instructions) tells it to download a script and run it, for example `curl ... | bash`. The agent runs whatever that host serves when it follows the instruction, which this scan cannot see; an allowed-tools list that admits the shell lets it run without asking.
2. Otherwise download and run the standalone script (it is self-contained and supports stdin execution): `curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/src/tools/caveman-init.js | node - $ARGUMENTS`
Fix: Read what the URL serves before letting an agent follow this instruction, or replace it with a pinned package install.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential.
for (const key of ["account_id", "access_token", "refresh_token", "id_token"]) {Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
An MCP tool surface (manifest or tool definitions) was found.
"tools": [
gdMarkerRe = regexp.MustCompile(`(?m)^[ \t]*(?:extends[ \t]+[A-Za-z_"']|class_name[ \t]+[A-Za-z_]|@tool\b|@export|@onready\b|@icon\(|signal[ \t]+[A-Za-z_])`)
@tool(name="caveman_retrieve", description=RECOVERY_DESCRIPTION, inputSchema={"json": RECOVERY_SCHEMA}, context=True)pi.registerTool({Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in JuliusBrussee/caveman.
The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.
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 →