Skip to content

fix: Resolve architectural vulnerabilities and resource leaks in VisionClaw OS#1

Open
PDgit12 wants to merge 1 commit intomainfrom
fix-visionclaw-os-vulnerabilities-12257588186729919494
Open

fix: Resolve architectural vulnerabilities and resource leaks in VisionClaw OS#1
PDgit12 wants to merge 1 commit intomainfrom
fix-visionclaw-os-vulnerabilities-12257588186729919494

Conversation

@PDgit12
Copy link
Copy Markdown
Owner

@PDgit12 PDgit12 commented Mar 5, 2026

Fixes multiple architectural vulnerabilities identified in the VisionClaw OS audit:

  1. Prevents thread hangs during UI overlay subprocess calls via timeouts.
  2. Prevents null pointer crashes when the Orchestrator receives malformed action coordinates.
  3. Hardens command injection vectors and semantic guardrails against dangerous prompts or complex AppleScript injections.
  4. Fixes async RAM leaks by locking the ambient buffer queue and proactively closing unused PIL Image objects.
  5. Fixes disk space leaks by correctly generating uniquely-named temp files for vision fallback and strictly deleting them immediately after encoding.

PR created automatically by Jules for task 12257588186729919494 started by @PDgit12

…onClaw OS

- Subprocess Thread-Safety: Added 30s timeout and exception handling to isolated UI overlay `subprocess.run` to prevent orchestrator hangs (`agent_os/ui_overlay.py`).
- Null Pointer Failures: Added explicit key checks and `.get()` defaults for coordinate resolution logic (`orchestration/orchestrator.py`).
- Security Vulnerabilities: Enhanced blocklists in `tools/os_controller.py` with more shell patterns, blocked nested `osascript -e`, and `do shell script`. Hardened `SemanticGuardrail` in `orchestration/semantic_guard.py` with additional destructive intent patterns.
- RAM Leaks: Added a `threading.Lock()` to the `AmbientPerceptionBuffer` and explicitly closed PIL Image objects (`img.close()`) when frames age out or the service stops to prevent memory buildup (`agent_os/ambient_buffer.py`).
- Disk Space Leaks: Refactored `SetOfMarkVisionFallback` and `GridOverlay` to use `tempfile.mkstemp()`. To prevent gigabytes of leaks over long sessions, explicitly added `os.remove()` in `UnifiedUICore.generate_vision_grid` right after Base64 encoding.

Co-authored-by: PDgit12 <134795060+PDgit12@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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