Skip to content

fix(tools): never delete a user-supplied browser profile dir on close() - #4713

Open
all-hands-bot wants to merge 2 commits into
mainfrom
fix/4602-user-supplied-profile-dir-deleted
Open

all-hands-bot wants to merge 2 commits into
mainfrom
fix/4602-user-supplied-profile-dir-deleted

Conversation

@all-hands-bot

@all-hands-bot all-hands-bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Collaborator

HUMAN:


AGENT:

Why

Source PR reviewed: #4602 (fix(tools): unique user_data_dir per conversation to prevent SingletonLock collisions).

Applicable risk lens: #1 (Boundary contracts and alternate valid inputs) and #10 (Negative-space / silent-success cases).

PR #4602 made close() call shutil.rmtree(self._config["user_data_dir"]) whenever the path contains the substring "browseruse/profiles/". The intent was to reclaim the auto-generated profile directory (~/.config/browseruse/profiles/<uuid>) that browser_use leaves behind on shutdown. But the guard is a substring match, not an ownership check: any user who explicitly supplies their own persistent user_data_dir (e.g. to keep logins/cookies across sessions) whose path happens to contain browseruse/profiles/ will have that directory silently deleted on close() — permanent data loss.

Deterministic reproduction (probe run against main):

import tempfile
from pathlib import Path
from unittest.mock import MagicMock, patch
from openhands.tools.browser_use.impl import BrowserToolExecutor

tmp = Path(tempfile.mkdtemp())
profile_dir = tmp / "browseruse" / "profiles" / "my-own-profile"
profile_dir.mkdir(parents=True)
marker = profile_dir / "precious-cookie.txt"
marker.write_text("user data that must survive")

with (
    patch.object(BrowserToolExecutor, "_ensure_chromium_available", return_value="/usr/bin/chromium"),
    patch("openhands.tools.browser_use.impl.CustomBrowserUseServer", return_value=MagicMock()),
):
    ex = BrowserToolExecutor(user_data_dir=str(profile_dir))
    ex._async_executor.run_async = lambda *a, **k: None
    ex.close()

print("marker exists after close():", marker.exists())  # False on main -> BUG

Impact: user-supplied browser profile directories (containing cookies, logins, bookmarks) are irrecoverably deleted when the conversation ends.

Summary

  • Track whether this executor generated the profile dir (i.e. user_data_dir was not passed via **config).
  • close() now deletes user_data_dir only when the executor owns it, instead of using a fragile "browseruse/profiles/" in path substring match.

REST API contract changes

Compared with base OpenAPI 9d143aac35c2 for public /api/** paths.

--- base public OpenAPI
+++ head public OpenAPI
@@ -5,0 +6 @@
+operation DELETE /api/conversations/{runtime_conversation_id}/bash/bash_events operationId=clear_all_bash_events_api_conversations__runtime_conversation_id__bash_bash_events_delete
@@ -30,0 +32 @@
+operation GET /api/conversations/{conversation_id}/runtime operationId=get_local_conversation_runtime_api_conversations__conversation_id__runtime_get
@@ -33 +35,14 @@
-operation GET /api/desktop/url operationId=get_desktop_url_api_desktop_url_get
+operation GET /api/conversations/{runtime_conversation_id}/bash/bash_events/ operationId=batch_get_bash_events_api_conversations__runtime_conversation_id__bash_bash_events__get
+operation GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search operationId=search_bash_events_api_conversations__runtime_conversation_id__bash_bash_events_search_get
+operation GET /api/conversations/{runtime_conversation_id}/bash/bash_events/{event_id} operationId=get_bash_event_api_conversations__runtime_conversation_id__bash_bash_events__event_id__get
+operation GET /api/conversations/{runtime_conversation_id}/desktop/url operationId=get_desktop_url_api_conversations__runtime_conversation_id__desktop_url_get deprecated=true
+operation GET /api/conversations/{runtime_conversation_id}/file/archive operationId=archive_directory_api_conversations__runtime_conversation_id__file_archive_get
+operation GET /api/conversations/{runtime_conversation_id}/file/download operationId=download_file_query_api_conversations__runtime_conversation_id__file_download_get
+operation GET /api/conversations/{runtime_conversation_id}/file/download-trajectory/{conversation_id} operationId=download_trajectory_api_conversations__runtime_conversation_id__file_download_trajectory__conversation_id__get
+operation GET /api/conversations/{runtime_conversation_id}/git/changes operationId=git_changes_query_api_conversations__runtime_conversation_id__git_changes_get
+operation GET /api/conversations/{runtime_conversation_id}/git/commits operationId=git_commits_query_api_conversations__runtime_conversation_id__git_commits_get
+operation GET /api/conversations/{runtime_conversation_id}/git/commits/{sha}/changes operationId=git_commit_changes_query_api_conversations__runtime_conversation_id__git_commits__sha__changes_get
+operation GET /api/conversations/{runtime_conversation_id}/git/diff operationId=git_diff_query_api_conversations__runtime_conversation_id__git_diff_get
+operation GET /api/conversations/{runtime_conversation_id}/vscode/status operationId=get_vscode_status_api_conversations__runtime_conversation_id__vscode_status_get
+operation GET /api/conversations/{runtime_conversation_id}/vscode/url operationId=get_runtime_vscode_url_api_conversations__runtime_conversation_id__vscode_url_get
+operation GET /api/desktop/url operationId=get_desktop_url_api_desktop_url_get deprecated=true
@@ -97,0 +113 @@
+operation POST /api/conversations/{conversation_id}/runtime/reprovision operationId=reprovision_local_conversation_runtime_api_conversations__conversation_id__runtime_reprovision_post
@@ -102,0 +119,4 @@
+operation POST /api/conversations/{runtime_conversation_id}/bash/execute_bash_command operationId=execute_bash_command_api_conversations__runtime_conversation_id__bash_execute_bash_command_post
+operation POST /api/conversations/{runtime_conversation_id}/bash/start_bash_command operationId=start_bash_command_api_conversations__runtime_conversation_id__bash_start_bash_command_post
+operation POST /api/conversations/{runtime_conversation_id}/file/create_directory operationId=create_directory_api_conversations__runtime_conversation_id__file_create_directory_post
+operation POST /api/conversations/{runtime_conversation_id}/file/upload operationId=upload_file_query_api_conversations__runtime_conversation_id__file_upload_post
@@ -132,0 +153 @@
+parameter DELETE /api/conversations/{runtime_conversation_id}/bash/bash_events path:runtime_conversation_id required=true schema=type="string" format="uuid"
@@ -181,0 +203 @@
+parameter GET /api/conversations/{conversation_id}/runtime path:conversation_id required=true schema=type="string" format="uuid"
@@ -184,0 +207,41 @@
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/ path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:command_id__eq required=false schema=anyOf=[type="string" format="uuid",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:kind__eq required=false schema=anyOf=[type="string" enum=["BashCommand","BashOutput"],type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:limit required=false schema=type="integer" default=100 exclusiveMinimum=0
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:order__gt required=false schema=anyOf=[type="integer",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:page_id required=false schema=anyOf=[type="string",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:sort_order required=false schema=BashEventSortOrder
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:timestamp__gte required=false schema=anyOf=[type="string" format="date-time",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search query:timestamp__lt required=false schema=anyOf=[type="string" format="date-time",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/{event_id} path:event_id required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/bash/bash_events/{event_id} path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/desktop/url path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/desktop/url query:base_url required=false schema=type="string" default="http://localhost:8002"
+parameter GET /api/conversations/{runtime_conversation_id}/file/archive path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/file/archive query:base_ref required=false schema=anyOf=[type="string",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/file/archive query:exclude required=false schema=anyOf=[type="array" items=type="string",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/file/archive query:format required=false schema=type="string" enum=["git-delta","tar.gz"] default="git-delta"
+parameter GET /api/conversations/{runtime_conversation_id}/file/archive query:path required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/file/archive query:use_default_excludes required=false schema=type="boolean" default=true
+parameter GET /api/conversations/{runtime_conversation_id}/file/download path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/file/download query:path required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/file/download-trajectory/{conversation_id} path:conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/file/download-trajectory/{conversation_id} path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/git/changes path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/git/changes query:path required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/git/changes query:ref required=false schema=anyOf=[type="string",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/git/commits path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/git/commits query:limit required=false schema=type="integer" default=50 minimum=1 maximum=200
+parameter GET /api/conversations/{runtime_conversation_id}/git/commits query:path required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/git/commits/{sha}/changes path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/git/commits/{sha}/changes path:sha required=true schema=type="string" pattern="^[0-9a-fA-F]{4,64}$"
+parameter GET /api/conversations/{runtime_conversation_id}/git/commits/{sha}/changes query:path required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/git/diff path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/git/diff query:commit required=false schema=anyOf=[type="string" pattern="^[0-9a-fA-F]{4,64}$",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/git/diff query:path required=true schema=type="string"
+parameter GET /api/conversations/{runtime_conversation_id}/git/diff query:ref required=false schema=anyOf=[type="string",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/vscode/status path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/vscode/url path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter GET /api/conversations/{runtime_conversation_id}/vscode/url query:base_url required=false schema=anyOf=[type="string",type="null"]
+parameter GET /api/conversations/{runtime_conversation_id}/vscode/url query:workspace_dir required=false schema=anyOf=[type="string",type="null"]
@@ -241,0 +305 @@
+parameter POST /api/conversations/{conversation_id}/runtime/reprovision path:conversation_id required=true schema=type="string" format="uuid"
@@ -246,0 +311,6 @@
+parameter POST /api/conversations/{runtime_conversation_id}/bash/execute_bash_command path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter POST /api/conversations/{runtime_conversation_id}/bash/start_bash_command path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter POST /api/conversations/{runtime_conversation_id}/file/create_directory path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter POST /api/conversations/{runtime_conversation_id}/file/create_directory query:path required=true schema=type="string"
+parameter POST /api/conversations/{runtime_conversation_id}/file/upload path:runtime_conversation_id required=true schema=type="string" format="uuid"
+parameter POST /api/conversations/{runtime_conversation_id}/file/upload query:path required=true schema=type="string"
@@ -258,0 +329 @@
+requestBody GET /api/conversations/{runtime_conversation_id}/bash/bash_events/ application/json required=true schema=type="array" items=type="string"
@@ -284,0 +356,3 @@
+requestBody POST /api/conversations/{runtime_conversation_id}/bash/execute_bash_command application/json required=true schema=ExecuteBashRequest
+requestBody POST /api/conversations/{runtime_conversation_id}/bash/start_bash_command application/json required=true schema=ExecuteBashRequest
+requestBody POST /api/conversations/{runtime_conversation_id}/file/upload multipart/form-data required=true schema=Body_upload_file_query_api_conversations__runtime_conversation_id__file_upload_post
@@ -314,0 +389,2 @@
+response DELETE /api/conversations/{runtime_conversation_id}/bash/bash_events 200 application/json schema=type="object" additionalProperties=type="integer"
+response DELETE /api/conversations/{runtime_conversation_id}/bash/bash_events 422 application/json schema=HTTPValidationError
@@ -372,0 +449,2 @@
+response GET /api/conversations/{conversation_id}/runtime 200 application/json schema=ConversationRuntimeInfo
+response GET /api/conversations/{conversation_id}/runtime 422 application/json schema=HTTPValidationError
@@ -378,0 +457,27 @@
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/ 200 application/json schema=type="array" items=anyOf=[BashEventBase,type="null"]
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/ 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search 200 application/json schema=BashEventPage
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/search 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/{event_id} 200 application/json schema=BashEventBase
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/{event_id} 404 no-content
+response GET /api/conversations/{runtime_conversation_id}/bash/bash_events/{event_id} 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/desktop/url 200 application/json schema=DesktopUrlResponse
+response GET /api/conversations/{runtime_conversation_id}/desktop/url 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/file/archive 200 application/octet-stream schema=type="string" format="binary"
+response GET /api/conversations/{runtime_conversation_id}/file/archive 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/file/download 200 application/octet-stream schema=type="string" format="binary"
+response GET /api/conversations/{runtime_conversation_id}/file/download 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/file/download-trajectory/{conversation_id} 200 application/octet-stream schema=type="string" format="binary"
+response GET /api/conversations/{runtime_conversation_id}/file/download-trajectory/{conversation_id} 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/git/changes 200 application/json schema=type="array" items=GitChange
+response GET /api/conversations/{runtime_conversation_id}/git/changes 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/git/commits 200 application/json schema=GitCommitsPage
+response GET /api/conversations/{runtime_conversation_id}/git/commits 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/git/commits/{sha}/changes 200 application/json schema=type="array" items=GitChange
+response GET /api/conversations/{runtime_conversation_id}/git/commits/{sha}/changes 422 application/json schema=HTTPValidationError
+response GET /api/conversations/{runtime_conversation_id}/git/diff 200 application/json schema=GitDiff
+response GET /api/conversations/{runtime_conversation_id}/git/diff 422 application/json schema=HTTPValidationError
... diff truncated; 46 more line(s)

Issue Number

Fixes #4602

How to Test

Before (unmodified main) — the regression test fails:

$ uv run pytest tests/tools/browser_use/test_browser_cleanup.py::TestBrowserCleanup::test_close_preserves_user_supplied_profile_dir -q
...
E   AssertionError: close() deleted a user-supplied profile directory
E   assert False
1 failed in 0.33s

After (this PR) — the regression test and full cleanup suite pass:

$ uv run pytest tests/tools/browser_use/test_browser_cleanup.py -q
...
17 passed in 0.24s

Root cause: the substring guard "browseruse/profiles/" in user_data_dir conflates the auto-generated default path with any user-supplied path containing the same substring. The PR's own test only covered an override at /tmp/my-custom-browser-profile, which does not contain the substring, so the destructive branch was never exercised.

Why the original tests did not catch this: the added test asserted the user-supplied path survived but used a path that lacked the magic substring, so the destructive rmtree branch was never reached.

Video/Screenshots

No UI. Reproduction output captured above (probe on main prints marker exists after close(): False; with the fix it prints True).

Design Doc

N/A

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:e2001c1-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-e2001c1-python \
  ghcr.io/openhands/agent-server:e2001c1-python

All tags pushed for this build

ghcr.io/openhands/agent-server:e2001c1-golang-amd64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-golang-amd64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-golang-amd64
ghcr.io/openhands/agent-server:e2001c1-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:e2001c1-golang-arm64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-golang-arm64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-golang-arm64
ghcr.io/openhands/agent-server:e2001c1-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:e2001c1-java-amd64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-java-amd64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-java-amd64
ghcr.io/openhands/agent-server:e2001c1-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:e2001c1-java-arm64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-java-arm64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-java-arm64
ghcr.io/openhands/agent-server:e2001c1-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:e2001c1-python-amd64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-python-amd64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-python-amd64
ghcr.io/openhands/agent-server:e2001c1-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-amd64
ghcr.io/openhands/agent-server:e2001c1-python-arm64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-python-arm64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-python-arm64
ghcr.io/openhands/agent-server:e2001c1-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-arm64
ghcr.io/openhands/agent-server:e2001c1-python-slim-amd64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-python-slim-amd64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-python-slim-amd64
ghcr.io/openhands/agent-server:e2001c1-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim-amd64
ghcr.io/openhands/agent-server:e2001c1-python-slim-arm64
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-python-slim-arm64
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-python-slim-arm64
ghcr.io/openhands/agent-server:e2001c1-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim-arm64
ghcr.io/openhands/agent-server:e2001c1-golang
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-golang
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-golang
ghcr.io/openhands/agent-server:e2001c1-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:e2001c1-java
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-java
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-java
ghcr.io/openhands/agent-server:e2001c1-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:e2001c1-python-slim
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-python-slim
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-python-slim
ghcr.io/openhands/agent-server:e2001c1-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim
ghcr.io/openhands/agent-server:e2001c1-python
ghcr.io/openhands/agent-server:e2001c19b9b0fc23ac6b34997242ea63624e254c-python
ghcr.io/openhands/agent-server:fix-4602-user-supplied-profile-dir-deleted-python
ghcr.io/openhands/agent-server:e2001c1-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim

About Multi-Architecture Support

  • Each variant tag (e.g., e2001c1-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., e2001c1-python-amd64) are also available if needed

Jev-Fast-Audit

⚡ Jev fast audit · estimates · 0.28s · commit e2001c1
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 6/6 hunks, 3/3 files.

All estimates and evidence
Estimate Likelihood / value Direct evidence
SQL injection 3.0% No direct hunk selected
Command injection 4.0% No direct hunk selected
Weakened authentication 9.0% No direct hunk selected
Weakened authorization 7.0% No direct hunk selected
Contract regression 10.0% No direct hunk selected
Data loss 11.0% F001H003 · openhands-tools/openhands/tools/browser_use/impl.py:698–708
Sensitive data disclosure 4.0% No direct hunk selected
Unexpected data transfer 3.0% No direct hunk selected
Credential misuse 4.0% No direct hunk selected
Untrusted instruction authority 3.0% No direct hunk selected
Package source redirection 4.0% No direct hunk selected
Unverified remote execution 2.0% No direct hunk selected
Privileged environment access 18.0% F001H003 · openhands-tools/openhands/tools/browser_use/impl.py:698–708
Security assessment bypass 4.0% No direct hunk selected
Prohibited workload 2.0% No direct hunk selected
Primary concern None selected; confidence 72.0% No primary concern to locate

PR #4602 made close() rmtree the user_data_dir whenever its path contains
the substring "browseruse/profiles/", to reclaim the auto-generated profile
dir. But a user who explicitly supplies their own persistent profile dir
(kept for logins/cookies) whose path happens to contain that substring has
it silently deleted on close() -> data loss.

Track ownership of the profile dir instead: only delete it when this
executor generated it (i.e. user_data_dir was not passed through config).

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

Copy link
Copy Markdown
Contributor

Python API breakage checks — ✅ PASSED

Result: ✅ PASSED

Action log

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-tools/openhands/tools/browser_use
   impl.py33819941%58–62, 64–65, 67, 69, 71–74, 76–77, 79, 81, 88, 108, 113, 119–125, 131, 137, 150–158, 165–167, 187–188, 192–193, 200–202, 214–217, 223–224, 229, 270–276, 279–281, 283, 296, 336, 347, 365–366, 371, 388, 394–395, 400, 405, 411–412, 416–417, 423–424, 432–435, 440–442, 449, 457, 475–476, 478–491, 494–507, 509–510, 516, 521–524, 532, 534, 537–538, 544–545, 550–551, 557–558, 562–563, 567–568, 572, 574–575, 577–580, 583–584, 590, 592, 594, 602–603, 607–608, 613–614, 618–619, 623–624, 629–630, 642–643, 654–655, 659–663, 677–679, 686–688, 693–694, 703–704, 710, 720–724, 726–727, 731, 733, 744–746
TOTAL430452235048% 

@neubig
neubig marked this pull request as ready for review September 14, 2026 19:23
@all-hands-bot

Copy link
Copy Markdown
Collaborator Author

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

@all-hands-bot

Copy link
Copy Markdown
Collaborator Author

Required CI has remained failing for seven days. Please repair it or comment with an update. If the author does not push or comment and required CI remains failing for another seven days, this pull request will be closed automatically.

3 similar comments
@all-hands-bot

Copy link
Copy Markdown
Collaborator Author

Required CI has remained failing for seven days. Please repair it or comment with an update. If the author does not push or comment and required CI remains failing for another seven days, this pull request will be closed automatically.

@all-hands-bot

Copy link
Copy Markdown
Collaborator Author

Required CI has remained failing for seven days. Please repair it or comment with an update. If the author does not push or comment and required CI remains failing for another seven days, this pull request will be closed automatically.

@all-hands-bot

Copy link
Copy Markdown
Collaborator Author

Required CI has remained failing for seven days. Please repair it or comment with an update. If the author does not push or comment and required CI remains failing for another seven days, this pull request will be closed automatically.

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.

3 participants