Back to skill

Security audit

Bear Share Sync

Security checks for vulnerabilities and agentic risk

Overview

The skill’s stated Bear-to-canvas-to-iMessage workflow is mostly disclosed, but it handles private note content with unsafe command patterns and weak controls around external sharing.

Review this carefully before installing. It is intended to move tagged Bear note content into a canvas and prepare iMessage previews, so only use it with notes and recipients you trust. The current scripts should be fixed before scheduled use: pass JSON and configuration as data instead of inline Python source, validate the message target, add explicit confirmation or redaction for note previews, and correct the processed-note filter.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/poll-share-notes.sh:16
Finding

Arbitrary Python Code Injection Through Bear Note Data and Configurable State Path

Content
View full analysis
/dev/null || echo '[]') # Extract note IDs already processed PROCESSED=$(python3 -c "import json; print(json.dumps(json.load(open('$STATE_FILE'))['processed']))") # Filter to unprocessed notes and output python3 -c " import json, sys raw = json.loads('''$RAW''') processed = set(json.loads('''$PROCESSED''')) # grizzly returns a list; adapt to its actual output shape notes = raw if isinstance(raw, list) else raw.get('notes', raw.get('results', [])) new_notes = [n for n in notes if n.get('id') or n.get('identifier','') not in processed] ids = [] out = [] for n in new_notes: nid = n.get('id') or n.get('identifier','') ids.append(nid) out.append({ 'id': nid, 'title': n.get('title',''), 'content': n.get('text') or n.get('content') or n.get('body',''), 'tags': n.get('tags', []) }) # Update state state = json.load(open('$STATE_FILE')) state['processed'] = list(set(state['processed']) | set(ids)) json.dump(state, open('$STATE_FILE','w')) json.dump(out, sys.stdout) " ``` ### Technical Analysis The script interpolates untrusted values directly into source code supplied to `python3 -c`: - Bear data returned by `grizzly` is embedded inside a triple-quoted Python string as `json.loads('''$RAW''')`. - The environment-configurable `BEAR_SHARE_STATE` path is embedded inside quoted Python expressions such as `open('$STATE_FILE')`. - Processed-state JSON is similarly embedded into generated Python source. These values are treated as program text rather than data. A Bear field containing a triple-quote sequence can terminate the intended Python string and insert additional Python statements. A malicious state path containing quote c ...[truncated 1543 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/poll-share-notes.sh:28
Finding

Incorrect Processed-Note Filter Causes Repeated Disclosure of Note Previews

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:59
Finding

Python Code Injection Through Target Expansion in the Documented One-Shot Pipeline

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims simple detection behavior but actually transforms note content into canvas nodes and writes to a JSON Canvas file. That discrepancy matters because it expands both data processing and modification scope beyond what a user would reasonably expect from the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims simple detection behavior but actually transforms note content into canvas nodes and writes to a JSON Canvas file. That discrepancy matters because it expands both data processing and modification scope beyond what a user would reasonably expect from the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims simple detection behavior but actually transforms note content into canvas nodes and writes to a JSON Canvas file. That discrepancy matters because it expands both data processing and modification scope beyond what a user would reasonably expect from the description.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill performs file-writing behavior by updating a canvas file and persisting a state file, yet it declares no explicit tool scope or permissions. This weakens containment and review because users and the platform are not clearly informed that the skill can modify local files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes sending note content previews over BlueBubbles/iMessage without an explicit privacy warning or consent boundary. Because Bear notes may contain sensitive personal or work information, even a 280-character preview can leak confidential data to external messaging infrastructure or unintended recipients.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The configuration exposes an outbound iMessage target but gives no warning about privacy, recipient verification, or misdelivery risk. A misconfigured phone number, email, or chat GUID could send note previews to the wrong person, causing immediate data leakage.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow explicitly instructs sending note content previews to an external messaging destination as a normal operating step. In context, this is more dangerous because the source material is personal notes, which often contain sensitive content not intended for automatic redistribution.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The one-shot pipeline automatically forwards each note's content snippet to the configured recipient without any review or confirmation step. Automatic forwarding increases the risk of bulk accidental disclosure, especially when triggered by polling or cron-based automation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/poll-share-notes.sh (reported line 8)May include surrounding context.

sh
TAG="${BEAR_SHARE_TAG:-share}"
STATE_FILE="${BEAR_SHARE_STATE:-$HOME/.bear-share-sync/state.json}"
STATE_DIR=$(dirname "$STATE_FILE")
mkdir -p "$STATE_DIR"

# Initialize state if missing
if [ ! -f "$STATE_FILE" ]; then

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill claims to detect newly tagged Bear notes, but it also extracts and outputs full note content, which exceeds the minimally necessary data for note detection. That broadens data exposure and can leak sensitive note bodies to downstream consumers or logs without clear user disclosure or strict need-to-know.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script reads a token from ~/.config/grizzly/token to perform a network-capable command, but the file provides no user-facing disclosure that credentials are being used. Hidden credential use is dangerous because users may not realize the skill authenticates to another service and may expose note data through that access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description implies a detection-oriented capability, which is read-like and limited to identifying newly tagged Bear notes. This script goes beyond detection by creating and updating canvas nodes and edges on disk, effectively syncing note content into another artifact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Lines L08-L12 create a state directory and initialize state.json, and L43 later overwrites that file, but the script provides no print/log message or warning that it stores persistent processing state under the user's home directory. This is a file-writing behavior that may affect user data visibility and troubleshooting.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The script invokes grizzly open-tag with --enable-callback and an external token file even though the stated purpose is simple detection of new tagged notes. Extra capability and authentication surface increase risk because they can enable broader access paths or unexpected external interactions beyond passive local polling.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The inline module documentation states a broader behavior: appending knowledge nodes for shared notes to a canvas. That documented behavior conflicts with the declared skill purpose in the manifest, indicating intent divergence between documentation and stated skill intent.

Content

No source excerpt is available for this finding.