Skip to content

fix(security): 2 improvements across 2 files#219

Open
tomaioo wants to merge 2 commits into
tonquer:mainfrom
tomaioo:fix/security/command-injection-via-os-system-in-build
Open

fix(security): 2 improvements across 2 files#219
tomaioo wants to merge 2 commits into
tonquer:mainfrom
tomaioo:fix/security/command-injection-via-os-system-in-build

Conversation

@tomaioo

@tomaioo tomaioo commented Jun 27, 2026

Copy link
Copy Markdown

Summary

fix(security): 2 improvements across 2 files

Problem

Severity: High | File: script/build_ui.py:L9

The script build_ui.py constructs a shell command by concatenating user-influenced file paths (root, outName) directly into a string passed to os.system(). While the input comes from filesystem iteration, this pattern is dangerous and could lead to command injection if the script is ever modified to process untrusted paths or if the working directory contains maliciously named files.

Solution

Use subprocess.run() with a list of arguments instead of os.system() to avoid shell injection. Ensure all paths are properly sanitized or use pathlib to handle paths safely.

Changes

  • script/build_ui.py (modified)
  • src/task/task_http.py (modified)

tomaioo added 2 commits June 27, 2026 05:14
- Security: Command Injection via os.system in build_ui.py
- Security: Unsafe Deserialization with pickle.loads in TaskHttp

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Command Injection via os.system in build_ui.py
- Security: Unsafe Deserialization with pickle.loads in TaskHttp

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant