fix: harden security beyond PR #249 — command injection, deps, path injection - #264
fix: harden security beyond PR #249 — command injection, deps, path injection#264WODE25500 wants to merge 3 commits into
Conversation
…s, path injection
Five additional security hardening changes identified during a full
repository security audit:
1. Replace os.system() with subprocess.run() in Sleep plugin
(plugins/openclaw/slash_sleep.py) to prevent shell command injection
via unsanitized arguments.
2. Raise dependency floors to address known CVEs:
- vllm >= 0.8.4 (was 0.4.0; CVE-2025-32433 in transitive deps)
- datasets >= 3.0 (was 2.18.0; remote code execution via
load_dataset with untrusted configs)
- Declare openai-codex-sdk as an explicit optional dep (codex extra)
to prevent dependency confusion / undeclared-import attacks.
3. Sanitize task_id before use in tempfile.mkdtemp prefix
(skillopt/envs/spreadsheetbench/rollout.py) to prevent directory
creation at attacker-chosen paths via crafted task identifiers.
4. Extend WebUI security tests from 2 to 8, covering --share warning,
auth via CLI args / env vars, default-no-auth, and path traversal
rejection in scan_outputs().
5. Sync requirements.txt commented versions with pyproject.toml floors.
All 1445 existing tests pass; 6 new regression tests added.
|
The shell-free subprocess invocation and path hardening are useful. Re-reviewing In Both call Please reject incomplete credentials before building/launching the UI. Tests should cover user-only, password-only, incomplete environment configuration, and a complete pair, with the incomplete cases asserting that |
Supplying only --auth-user or only --auth-pass (or only one of SKILLOPT_WEBUI_USER / SKILLOPT_WEBUI_PASS) previously left auth=None and still launched the UI — a deployment could expose the training controls without login. Now reject before building/launching (sys.exit 1); launch() is never called for incomplete credentials. Added user-only / pass-only / env-incomplete regressions.
|
Yifan Yang (@Yif-Yang) — fixed on |
|
Thanks for I am keeping the security-hardening review open rather than treating those passing cases as proof that the complete WebUI boundary is covered. Please extend the negative integration matrix through the real Any further security-sensitive reproduction details should be coordinated privately under the repository's |
|
Understood, and agreed. Any further security-sensitive reproduction details (real credentials, private filesystem paths, or exploit payloads) will be coordinated privately per |
…oint Lift scan_outputs out of the build_ui closure so the Output Explorer callback is directly testable, and add callback-level tests that call it with traversal args (denied, returns []) and a valid in-tree output area (digested, reads config.yaml). This replaces the prior approximation tests that only re-checked relative_to() in isolation.
|
Thanks for the re-review. I reworked the Output Explorer tests so they exercise the actual data-consumption path instead of re-checking the containment helper in isolation.
Full webui suite: 21 passed. (If desired I can extend the same callback-level approach to the remaining UI callbacks.) |
Summary
Follow-up security hardening beyond PR #249, identified during a full repository audit.
Changes
Command injection fix — Replace
os.system()withsubprocess.run()in Sleep plugin (plugins/openclaw/slash_sleep.py) to prevent shell injection via unsanitized arguments.Dependency CVE remediation:
vllmfloor raised to>= 0.8.4(was 0.4.0; CVE-2025-32433 in transitive deps)datasetsfloor raised to>= 3.0(was 2.18.0; remote code execution viaload_datasetwith untrusted configs)codexoptional extra foropenai-codex-sdkto prevent undeclared-import / dependency confusion attacksPath injection fix — Sanitize
task_idbefore use intempfile.mkdtempprefix (skillopt/envs/spreadsheetbench/rollout.py) to prevent directory creation at attacker-chosen paths.WebUI security test expansion — Extended from 2 to 8 tests covering
--sharewarning, auth via CLI args / env vars, default-no-auth, and path traversal rejection.requirements.txt sync — Aligned commented versions with
pyproject.tomlfloors.Test plan
tests/test_webui_security.py)