code-runner
Audited by Socket on Aug 26, 2026
13 alerts found:
Securityx4Anomalyx9The fragment does not contain clear malware or an overt supply-chain backdoor. It implements an LLM coding agent with legitimate remote API and file-editing functionality, but presents significant security risk when model output or prompts are untrusted: arbitrary bash execution is only partially filtered, read_file bypasses allowlist/denylist protections, and sensitive prompts or tool results are sent to a configurable endpoint. The hardcoded development-key fallback is also unsafe. The code should be sandboxed, enforce path validation for reads, restrict commands using an allowlist, and require an explicitly configured API key and trusted endpoint.
This is a design and architecture walkthrough, not malicious executable code. It contains no direct malware indicators in the supplied fragment. The described system nevertheless has significant security-sensitive operations: shell-based DoD execution, LLM-generated file changes, git mutation, external research ingestion, memory-based prompt injection, and potentially sensitive logging. The overall risk is architectural and implementation-dependent; review the actual code for sandboxing, authentication, prompt-injection resistance, secret redaction, symlink handling, git-hook behavior, and enforcement of the blind-test barrier.
The code appears to be a conventional multi-language linting and test orchestration utility, not malware. Its main security concern is command injection and arbitrary code execution through caller-controlled test_command values passed to bash -lc, plus expected execution of project-defined build and test scripts and possible npx package resolution. It should only operate on trusted repositories and validated commands; direct shell invocation should be replaced with structured argument lists where feasible.
The fragment appears to be a legitimate code-runner/self-improvement component rather than malware. Its main security concern is intentional but dangerous shell execution of the caller-provided dod_command, combined with an inherited environment and captured command output. It should only receive trusted commands, run with least privilege and a restricted environment, and enforce an allowlist or sandbox if inputs can be influenced by untrusted users.
SUSPICIOUS: The skill’s capabilities mostly align with its stated purpose as a bounded code runner, and there are useful safeguards like disposable worktrees, allowlists, and opt-in source apply. Main concerns are the unverified /scillm backend provenance and the inherently high-impact command execution and optional source mutation surface; these are proportionate to purpose but still medium risk.
This is a task-adapter/orchestration module rather than evident malware. Its main security concern is unsafe delegation: untrusted handoff and ticket content influence the runner working directory, allowlist, prompt, and especially the proof command. The fragment itself does not invoke a shell directly, but downstream run.sh behavior must safely execute or validate the generated command. Path traversal is also not rejected locally. Review run.sh and the code-runner implementation before treating the boundary as secure.
The fragment appears to be an intended LLM-backed code-runner orchestration module, not overt malware. Its main risks are architectural: it sends prompts and tool data to an environment-configurable endpoint, does not require HTTPS, includes a development fallback token, and executes model- or environment-generated tool calls. The severity depends primarily on the unprovided execute() implementation, allowlist enforcement, deployment permissions, and control of environment variables. No direct evidence of data theft, backdoors, or system damage is present in this file.
This is a patch verification utility with a legitimate purpose, but it contains a high-impact command-execution risk: an externally supplied definition-of-done command is executed through shell=True. Its safety depends on the handoff and specification being fully trusted. The fragment does not itself demonstrate malware or data theft, but it should not process untrusted specifications without replacing shell execution with a constrained argument list and validating paths and symlinks. The supplied text also appears syntactically incomplete at the final line.
The code is a dynamic skill discovery and execution mechanism. It does not itself show overt malware, but it intentionally executes externally selected run.sh files with the process's privileges, including scripts from a user-controlled home directory. This creates a significant supply-chain and arbitrary-code-execution trust risk if the manifest or skill directories are writable or untrusted. Review and authenticate the manifest and skill contents, validate skill names and path containment, and avoid executing user-level scripts without explicit approval.
The code implements an intentional code-runner adapter layer rather than clear malware. It executes externally configured commands and converts their output into filesystem tool calls, creating a significant trust boundary. Risk is acceptable only when adapter environment variables and execute's allowlist enforcement are trusted and controlled. Review execute and deployment configuration for path traversal, unrestricted writes, and exposure of sensitive prompt/context data.
The code is an administrative/code-runner tool rather than apparent malware. File path handling is comparatively defensive, but run_command grants arbitrary shell execution with inherited environment and broad worktree access; the regex blocklist is insufficient as a security boundary. Risk depends on whether untrusted callers can invoke execute or control args. The shown fragment also appears syntactically incomplete at the end.
The fragment is a generally legitimate command wrapper with no clear malicious behavior. It contains a concrete injection weakness in the result command because result_file is interpolated into Python code without shell/Python escaping. Exploitation requires control of the filename argument and execution of this script, but the issue should be fixed by passing the path as data rather than source code.
The code is a test/validation utility, not overt malware. Its unrestricted `bash -lc` invocation is a significant command-injection and arbitrary-code-execution risk when `command` or `cwd` is externally controllable. In a trusted developer-controlled test environment this behavior is expected; it should not be exposed to untrusted input. No direct credential theft, exfiltration, persistence, or sabotage is implemented in the supplied fragment.