Skip to main content
SkillTotal

Is onnxruntime safe?

Low risk - review the findings before installing
Notable — review in context (a capability is not a malicious indicator):
  • Possible command injection (shell + dynamic command)
  • Python shell/command execution
  • 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.

onnxruntime 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, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 20/100 (low).

onnxruntime 1.32.0

PyPI package · pypi:onnxruntime
LOW
20
/ 100 risk score
Snapshot · scanned Nov 21, 2026 · onnxruntime@1.32.0 · engine 1.8.0 / ruleset 107

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 onnxruntime's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
filesystem readfilesystem writenetwork egressshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Execution authority
Tool Access Control / Direct Tool Access
Filesystem reach
Tool Execution Context
Network egress
Interaction & Communication / Direct Communication

Findings (5)

HIGHPossible command injection (shell + dynamic command)ST-CMDI-PY

The code builds an OS command out of values that can change at runtime, then runs it through a shell.

Why it matters: If any of those values come from untrusted input, an attacker can run their own commands on the machine.

Fix: Pass arguments as a list without shell=True (e.g. subprocess.run(['git', 'checkout', branch])); never build a shell string from external input. If a shell is unavoidable, quote with shlex.quote.

CapabilityPython shell/command executionnot scored · severity highST-SHELL-PY

The component can run operating-system commands or spawn processes.

returned_output = subprocess.check_output("oslevel")
os.system("python convert_to_onnx.py -m gpt2 --output gpt2_fp32.onnx -o -p fp32 --use_gpu")
os.system("python convert_to_onnx.py -m gpt2 --output gpt2_fp16.onnx -o -p fp16 --use_gpu")
process = subprocess.Popen(benchmark_cmd, stdout=log_file, stderr=log_file)
subprocess.run(main_cmd + symbolic_shape_infer_args)  # noqa: PLW1510
process = subprocess.Popen(benchmark_cmd, stdout=log_file, stderr=log_file)

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.

CapabilityPython filesystem readnot scored · severity mediumST-FS-PY-READ

The component reads files from disk.

with open(cache_path, encoding="utf-8") as f:
for tuning_results in [json.load(open(f)) for f in args.input_json]:  # noqa: SIM115
for tuning_results in [json.load(open(f)) for f in args.input_json]:  # noqa: SIM115
tuning_results = json.load(open(args.json_or_onnx))  # noqa: SIM115
self._file = open(model_path, "rb").read()  # noqa: SIM115
with open(qnn_json_file_path) as qnn_json_file:
with open(qnn_ctx_file, "rb") as file:
with open(args.qnn_json) as qnn_json_file:
with open(onnx_file, "rb") as file:
with open(args.input_test_file) as read_f:
with open(csv_path, newline="") as csvfile:
with open(filename_other, "rb") as f:  # noqa: PLW2901
with open(args.input, "rb") as input_file:

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.

CapabilityPython filesystem write/deletenot scored · severity mediumST-FS-PY-WRITE

The component writes or deletes files on disk.

os.remove(os.path.join(os.path.dirname(self._model_path), external_data_location))
with open(os.path.join(dir, "calibration.json"), "w") as file:
with open(os.path.join(dir, "calibration.flatbuffers"), "wb") as file:
with open(os.path.join(dir, "calibration.cache"), "w") as file:
json.dump(tuning_results, open(args.output_json, "w"))  # noqa: SIM115
json.dump(merger.get_merged(), open(args.output_json, "w"))  # noqa: SIM115
with open(output_file, "w") as out:
with open(csv_filename, mode="a", newline="", encoding="ascii") as csv_file:
with open(csv_filename, mode="a", newline="", encoding="ascii") as csv_file:
with open(csv_filename, mode="a", newline="", encoding="ascii") as csv_file:
with open(os.path.join(directory, f"input_{index}.pb"), "wb") as file:
with open(os.path.join(directory, f"output_{i}.pb"), "wb") as file:
with open(compressed_file_dir, "wb") as f:
with open(os.path.join(ckpt_dir, filename), "wb") as f:
os.remove(shape_infer_model_path)
with open(file_name, "w") as f:
with open(csv_filename, mode="a", newline="", encoding="ascii") as csv_file:
with open(csv_filename, mode="a", newline="", encoding="ascii") as csv_file:
with open(csv_filename, mode="a", newline="") as csv_file:
with open(csv_filename, mode="a", newline="") as csv_file:

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.

CapabilityPython network egressnot scored · severity mediumST-NET-PY

The component makes outbound network requests.

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.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in onnxruntime.

Maintain onnxruntime?

Check the next package before your agent installs it

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 component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →