MalDet · Static Security Report
The repository shows two high-risk issues that look like serious security problems rather than normal mistakes. One issue involves using Python's subprocess command with the shell=True flag, which allows attackers to run arbitrary commands by injecting code into your shell environment. Another major concern is the use of pickle for data serialization, a method known to execute dangerous code when files are loaded incorrectly. These findings indicate that the code contains significant vulnerabilities that could be exploited if someone with access to this repository runs it on their systems. While some rules were triggered by unrelated files like system executables or environment variables, the core issues stem from how the application handles external commands and data storage. The developer should treat these as critical security flaws requiring immediate review and remediation before deploying the code anywhere.
Written by a language model running locally on the scanning machine, from the findings in this report. The risk levels above and below were decided by the scoring model, not by this summary.
MalDet scores two different questions separately, because they call for different responses: code can be badly written without being hostile, and hostile code is not always badly written.
| Detector | Looks for | High | Medium | Low | Total |
|---|---|---|---|---|---|
| bandit | Insecure coding patterns in Python source | 1 | 41 | 56 | 98 |
| semgrep | Insecure coding patterns across many languages | 4 | 29 | 0 | 33 |
| yara | Signatures of malicious behaviour in source files | 3 | 0 | 2 | 5 |
| guarddog | Malicious package and install-time behaviour | 4 | 0 | 1 | 5 |
14 of 141 findings were rated more likely genuine than noise by the classifier.
Identical findings are grouped, so a single rule firing many times takes one row. Ordered worst first. “Seen” is how many times that finding occurred.
| Severity | Detector | Finding | Seen | Example location |
|---|---|---|---|---|
| high | semgrep | the `encoding` argument to Popen is only available on Python 3.6+ | 1 | /db/database_interactions.py:130 |
| high | semgrep | the `errors` argument to Popen is only available on Python 3.6+ | 1 | /db/database_interactions.py:130 |
| high | guarddog | Detects download-and-execute patterns: fetching a remote file then executing it [threat-process-download-exec] | 3 | /setup_windows.py:201 |
| high | guarddog | Detects steganography decode followed by code execution [threat-runtime-obfuscation-steganography] | 1 | /modules/process_images.py:202 |
| high | semgrep | Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead. | 1 | /setup_windows.py:20 |
| high | semgrep | Functions reliant on pickle can result in arbitrary code execution. Consider loading from `state_dict`, using fickling, or switching to a safer serialization method like ONNX | 1 | /modules/kokoro.py:69 |
| high | bandit | subprocess call with shell=True identified, security issue. | 1 | /setup_windows.py:20 |
| high | yara | YARA rule matched: detect_anti_analysis — Checks for a debugger, VM, or sandbox before continuing - a common malware evasion technique, essentially never present in ordinary application code | 2 | /Assets/espeak_windows_files_extracted/libespeak-ng.dll |
| high | yara | YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone | 1 | /tools/check_packages.py |
| medium | semgrep | Detected a dynamic value being used with urllib. urllib supports 'file://' schemes, so a dynamic value controlled by a malicious actor may allow them to read arbitrary files. Audit uses of urllib calls to ensure user data cannot control the URLs, or consider using the 'requests' library instead. | 4 | /tools/check_packages.py:22 |
| medium | semgrep | Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format. | 22 | /db/database_interactions.py:669 |
| medium | bandit | Use of weak MD5 hash for security. Consider usedforsecurity=False | 2 | /db/create_symlinks.py:33 |
| medium | bandit | Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected. | 4 | /tools/check_packages.py:22 |
| medium | semgrep | Untrusted user input in `importlib.import_module()` function allows an attacker to load arbitrary code. Avoid dynamic values in `importlib.import_module()` or use a whitelist to prevent running untrusted code. | 1 | /tools/check_packages.py:341 |
| medium | semgrep | Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'. | 2 | /chat/base.py:470 |
| medium | bandit | Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue. | 10 | /db/stage_split.py:258 |
| medium | bandit | Unsafe Hugging Face Hub download without revision pinning in snapshot_download() | 5 | /core/utilities.py:366 |
| medium | bandit | Unsafe Hugging Face Hub download without revision pinning in hf_hub_download() | 5 | /modules/ocr.py:278 |
| medium | bandit | Unsafe Hugging Face Hub download without revision pinning in from_pretrained() | 15 | /tools/build_user_manual_db.py:82 |
| low | bandit | Possible hardcoded password: '[PAD]' | 1 | /db/embedding_models.py:401 |
| low | guarddog | Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read] | 1 | /db/database_interactions.py:278 |
| low | bandit | Starting a process without a shell. | 4 | /core/utilities.py:752 |
| low | bandit | Consider possible security implications associated with the subprocess module. | 15 | /core/utilities.py:94 |
| low | bandit | Starting a process with a partial executable path | 9 | /core/utilities.py:162 |
| low | bandit | subprocess call - check for execution of untrusted input. | 20 | /setup_windows.py:88 |
| low | yara | YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version | 2 | /chat/lm_studio.py |
| low | bandit | Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. | 7 | /Assets/core.py:439 |