Skip to content

fix: harden security beyond PR #249 — command injection, deps, path injection - #264

Open
WODE25500 wants to merge 1 commit into
microsoft:mainfrom
WODE25500:fix/security-hardening-beyond-pr249
Open

fix: harden security beyond PR #249 — command injection, deps, path injection#264
WODE25500 wants to merge 1 commit into
microsoft:mainfrom
WODE25500:fix/security-hardening-beyond-pr249

Conversation

@WODE25500

@WODE25500 WODE25500 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up security hardening beyond PR #249, identified during a full repository audit.

Changes

  1. Command injection fix — Replace os.system() with subprocess.run() in Sleep plugin (plugins/openclaw/slash_sleep.py) to prevent shell injection via unsanitized arguments.

  2. Dependency CVE remediation:

    • vllm floor raised to >= 0.8.4 (was 0.4.0; CVE-2025-32433 in transitive deps)
    • datasets floor raised to >= 3.0 (was 2.18.0; remote code execution via load_dataset with untrusted configs)
    • Added explicit codex optional extra for openai-codex-sdk to prevent undeclared-import / dependency confusion attacks
  3. Path injection fix — Sanitize task_id before use in tempfile.mkdtemp prefix (skillopt/envs/spreadsheetbench/rollout.py) to prevent directory creation at attacker-chosen paths.

  4. WebUI security test expansion — Extended from 2 to 8 tests covering --share warning, auth via CLI args / env vars, default-no-auth, and path traversal rejection.

  5. requirements.txt sync — Aligned commented versions with pyproject.toml floors.

Test plan

  • All 8 WebUI security tests pass (tests/test_webui_security.py)
  • Full suite: 1445 passed, 68 skipped (3 pre-existing failures unrelated to these changes)
  • CI green on both gradio 5.x and 6.x
  • Verify Sleep plugin still invokes Conda correctly on Windows + Linux

…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.
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