Back to skill

Security audit

Browser Bookmarks Cleanup

Security checks for vulnerabilities and agentic risk

Overview

This bookmark-cleanup skill is coherent but should be reviewed because it handles sensitive browser data and can make destructive bookmark changes with incomplete safeguards.

Before installing or using this skill, review generated cleanup plans carefully, run dry-runs first, export or separately back up bookmarks, and close the browser before any write. Avoid running discovery in logs or shared transcripts if Chrome account names or emails would be sensitive.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/discover.py:15
Finding

Unnecessary Collection and Disclosure of Chrome Account Identity Data

Content
View full analysis
dict[str, dict[str, Any]]: local_state = chrome_root / "Local State" if not local_state.exists(): return {} try: payload = json.loads(local_state.read_text(encoding="utf-8")) except Exception: return {} info_cache = payload.get("profile", {}).get("info_cache", {}) return {k: v for k, v in info_cache.items() if isinstance(v, dict)} ``` ```python meta = info_cache.get(child.name, {}) profile_name = normalize_name(meta.get("name", "")) or child.name account_name = normalize_name(meta.get("gaia_name", "")) or None display = f"{profile_name} ({account_name})" if account_name and account_name.lower() != profile_name.lower() else profile_name profiles.append({ "browser": "chrome", "profile_dir": child.name, "profile_name": profile_name, "display_name": display, "account_name": account_name, "account_email": normalize_name(meta.get("user_name", "")) or None, "bookmarks_path": str(bookmarks), "history_path": str(history) if history.exists() else None, }) ``` ### Technical Analysis Profile discovery requires identifying browser profile directories and locating bookmark and history files. It does not require collecting the Google account name stored in `gaia_name` or the email address stored in `user_name`. The implementation reads Chrome's `Local State` file, extracts these identity fields, and includes them in the profile object. The `run` function subsequently serializes the entire object to standard output. Consequently, account identity information can be retained in agent transcripts, shell lo ...[truncated 1296 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/apply_plan.py:155
Finding

Failed Cleanup Plans Can Commit Partial Destructive Changes

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_common.py:144
Finding

Non-Atomic Replacement Can Corrupt the Active Bookmark File

Content
View full analysis
None: path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") ``` The live-file call site is: ```python if args.write: backup_file = f"{bookmarks_path}.backup-{int(time.time())}" shutil.copy2(bookmarks_path, backup_file) dump_bookmarks(bookmarks_path, data) output_file = str(bookmarks_path) ``` ### Technical Analysis `Path.write_text` opens the destination for writing, truncates the existing file, and then writes the new JSON content directly to that same pathname. It does not provide an atomic replacement guarantee. If the process is interrupted after truncation, the disk becomes full, serialization or writing fails, or the browser concurrently modifies the file, the active bookmark file may be left empty, truncated, or inconsistent. The documented request that users close the browser is procedural only and is not enforced by the implementation. Creating a backup before the write is valuable, but it does not make the replacement atomic. It also does not protect browser changes made after the initial file load and before the final write. ### Attack Path 1. Invoke `apply-plan --write` against an active Chrome bookmark file. 2. The implementation copies the original file to a backup. 3. `Path.write_text` opens and truncates the active bookmark file. 4. The process is terminated, the device runs out of space, or another write error occurs before all JSON content is persisted. 5. The browser is left with a malformed or incomplete bookmark file. 6. Alternatively, if the browser writes concurrently, one writer may overwrite the other's newer state. ### Impact Assessment The issue c ...[truncated 368 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill does not declare an explicit tool/permission scope even though its documented behavior includes reading bookmark/history files, writing modified bookmark files, and interacting with URLs conceptually. While the skill text says network requests should never be sent, the absence of explicit scope restrictions means an agent runtime may grant broader capabilities than intended, increasing the risk of unauthorized file writes or accidental network access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file documents a delete action that removes a bookmark or folder, which is a destructive operation affecting user data. The description provides no warning about irreversibility, confirmation, backup, or need for user review before applying the plan.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code enumerates browser profiles and outputs account names, account emails, and bookmark/history database paths for Chrome and Firefox. Although it does not modify data, it accesses and emits privacy-sensitive local information with no confirmation prompt, visible warning, or explanatory comment/docstring in the operational path.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.