Is Graphify-Labs/graphify safe?
- Python shell/command execution
- Python filesystem read
- Python filesystem write/delete
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
Graphify-Labs/graphify is a PyPI package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 1 risky construct is reported for review. It can: filesystem read, filesystem write, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 10/100 (low).
graphifyy 0.9.80
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of Graphify-Labs/graphify'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 component can run operating-system commands or spawn processes.
raise SystemExit(subprocess.run(argv, env=env).returncode)
result = _sp.run(cmd, capture_output=True, text=True)
result = _sp.run(cmd, capture_output=True, text=True)
proc = subprocess.run(
["git", "-C", str(vcs_root), "ls-files", "-z", "--cached"],
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
check=False, …r = _sp.run(
["git", "rev-parse", "HEAD"], capture_output=True, text=True, timeout=3,
cwd=str(cwd) if cwd is not None else None,
)result = subprocess.run(
["cpp", "-w", "-P", "-nostdinc", "-I", "/dev/null"],
input=safe,
capture_output=True,
timeout=30,
)result = subprocess.run(
[exe, "drive", "files", "export", "--params", json.dumps(params), "-o", output.name],
capture_output=True,
cwd=output.parent,
text=True,
timeout=timeout,
)res = _sp.run(
["git", "-C", str(root), "rev-parse", flag],
capture_output=True, text=True,
)res = _sp.run(
["git", "-C", str(root), "rev-parse", "--git-path", "hooks"],
capture_output=True, text=True,
)_sp.run(
["git", "-C", str(root), "config", key, value],
check=True, capture_output=True, text=True,
)_sp.run(
["git", "-C", str(root), "config", "--unset", key],
capture_output=True, text=True,
)res = _sp.run(
["git", "-C", str(root), "config", "--get", "merge.graphify.driver"],
capture_output=True, text=True,
)proc = subprocess.run(
[claude_cmd, "--help"],
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
timeout=30,
check=False,
**_n …proc = subprocess.run(
cli_args,
input=combined_message,
capture_output=True,
text=True,
encoding="utf-8", # Force UTF-8 — prevents UnicodeEncodeError on Windows cp1252
errors="replace", # T …proc = subprocess.run(
cli_args,
input=prompt,
capture_output=True,
text=True,
encoding="utf-8", # Force UTF-8 — prevents UnicodeEncodeError on Windows cp1252
errors=" …result = subprocess.run(
["gh", *args],
stdin=subprocess.DEVNULL,
# Decode gh's output as UTF-8, not the Windows cp1252 locale codec: gh
# emits UTF-8 JSON with non-Latin1 titles/logins (emoji …result = subprocess.run(
["git", "symbolic-ref", "refs/remotes/origin/HEAD"],
stdin=subprocess.DEVNULL,
capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=5 …result = subprocess.run(
["gh", *args],
stdin=subprocess.DEVNULL,
capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30
)result = subprocess.run(
["git", "worktree", "list", "--porcelain"],
stdin=subprocess.DEVNULL,
capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=10
)proc = _sp.run(
[_claude, "-p", "--no-session-persistence"],
input=prompt, capture_output=True, text=True,
encoding="utf-8", errors="replace", timeout=120,
)r = _sp.run(
["git", "rev-parse", "HEAD"], capture_output=True, text=True, timeout=3,
cwd=str(cwd) if cwd is not None else None,
)result = subprocess.run(
["git", "show", ref],
cwd=REPO_ROOT,
capture_output=True,
text=True,
encoding="utf-8",
)result = subprocess.run(
["git", "rev-parse", "--verify", "--quiet", "origin/v8"],
cwd=REPO_ROOT,
capture_output=True,
text=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; avoid shell=True.
A server is bound to all network interfaces (0.0.0.0), not just your own machine.
data.setdefault("local_id", node.split("::", 1)[1])text = _read_text(node, source).rsplit("::", 1)[-1]text = _read_text(name_node, source).rsplit("::", 1)[-1]if host in ("metadata.google.internal", "metadata.google.com", "0.0.0.0", "::", "[::]"): # nosec B104 - blocklist, not a bindif host in ("0.0.0.0", "::", ""):if host in ("0.0.0.0", "::", "") and not api_key:f"WARNING: binding {host or '0.0.0.0'} with no api-key exposes the graph "Why it matters: Without authentication, other hosts on the network can reach it.
Fix: Bind to 127.0.0.1 for local-only use, or require authentication and restrict access if remote exposure is intended.
The component reads files from disk.
body = skill_dst.read_text(encoding="utf-8")
installed = version_file.read_text(encoding="utf-8").strip()
installed = version_file.read_text(encoding="utf-8").strip()
raw = json.loads(path.read_text(encoding="utf-8"))
recorded = marker.read_text(encoding="utf-8-sig").strip()
data = json.loads(graph_path.read_text(encoding="utf-8"))
text = prompt.read_text(encoding="utf-8", errors="replace")
raw = json.loads(p.read_text(encoding="utf-8"))
raw = p.read_bytes()
result = json.loads(entry.read_text(encoding="utf-8"))
return json.loads(path.read_text(encoding="utf-8"))
return Path(path).read_text(encoding="utf-8")
data = json.loads(graph_path.read_text(encoding="utf-8"))
data = json.loads(graph_path.read_text(encoding="utf-8"))
data = json.loads(graph_path.read_text(encoding="utf-8"))
data = json.loads(graph_path.read_text(encoding="utf-8"))
manifest = json.loads(mp.read_text(encoding="utf-8"))
existing = _json.loads(global_path.read_text(encoding="utf-8"))
existing = _json.loads(global_path.read_text(encoding="utf-8"))
existing = _json.loads(global_path.read_text(encoding="utf-8"))
existing = _json.loads(global_path.read_text(encoding="utf-8"))
_raw = _json.loads(gp.read_text(encoding="utf-8"))
opts.answer = Path(opts.answer_file).read_text(encoding="utf-8").strip()
_raw = json.loads(gp.read_text(encoding="utf-8"))
_raw = json.loads(gp.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.
The component writes or deletes files on disk.
shutil.rmtree(child, ignore_errors=True)
os.unlink(tmp)
os.unlink(tmp_path)
output_path.write_text(output, encoding="utf-8")
os.unlink(entry.path)
global_path.write_text(_json.dumps(existing, indent=2) + "\n", encoding="utf-8")
global_path.write_text(_json.dumps(existing, indent=2) + "\n", encoding="utf-8")
(out / "GRAPH_REPORT.md").write_text(report, encoding="utf-8")
(out / ".graphify_analysis.json").write_text(
json.dumps(analysis, indent=2, ensure_ascii=False),
encoding="utf-8",
)(graphify_out / ".graphify_root").write_text(
str(Path(target).resolve()), encoding="utf-8"
)(graphify_out / ".graphify_root").write_text(
str(Path(target).resolve()), encoding="utf-8"
)(graphify_out / ".graphify_semantic_marker").write_text(
json.dumps({"output_tokens": merged["output_tokens"]}), encoding="utf-8"
)(out / ".graphify_cached.json").write_text(
json.dumps({"nodes": cached_nodes, "edges": cached_edges, "hyperedges": cached_hyperedges},
ensure_ascii=False),
encoding="utf-8", …(out / ".graphify_uncached.txt").write_text("\n".join(uncached), encoding="utf-8")out_path.write_text(
f"<!-- converted from {path.name} -->\n\n{text}",
encoding="utf-8",
)shutil.copy2(src, backup_dir / name)
with open(output_path, "w", encoding="utf-8") as f: # nosec
_manifest_path.write_text(json.dumps({"files": sorted(set(_written))}, indent=2), encoding="utf-8")out_path.write_text(_with_frontmatter(path, shortcut, body, "text/markdown"), encoding="utf-8")
out_path.write_text(_with_frontmatter(path, shortcut, body, "text/plain"), encoding="utf-8")
out_path.write_text(
_with_frontmatter(
path,
shortcut,
body,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
),
encodi …hook_path.write_text(new_content, encoding="utf-8", newline="\n")
hook_path.write_text(content.rstrip() + "\n\n" + script, encoding="utf-8", newline="\n")
hook_path.write_text("#!/bin/sh\n" + script, encoding="utf-8", newline="\n")hook_path.write_text(new_content + "\n", encoding="utf-8", newline="\n")
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 makes outbound network requests.
import http.client
import urllib.request
parsed = urllib.parse.urlparse(url)
return urllib.request.build_opener(
_SSRFGuardedHTTPHandler,
_SSRFGuardedHTTPSHandler,
_NoFileRedirectHandler,
)req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0 graphify/1.0"})raise urllib.error.HTTPError(url, status, f"HTTP {status}", {}, None)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 MCP tool surface (manifest or tool definitions) was found.
types.Tool(
name="query_graph",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 Graphify-Labs/graphify.
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 →