Back to skill

Security audit

Bear GIF Enricher

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it advertises in broad terms, but it modifies Bear notes and sends note-derived topics to GIF providers, with one script bug that creates a new tagged note instead of tagging the original note as documented.

Install only if you are comfortable with the skill reading and changing Bear notes tagged 「待整理」 and sending each note's title or first line to Tenor or Giphy. Review or fix the retagging script first, because it appears to create a new tagged note instead of adding 已整理 to the original note. Use restricted GIF API keys and consider pinning the grizzly version before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

other

Warning
Location
scripts/enrich_note.sh:11
Finding

Private Bear Note Content Is Disclosed to External GIF Providers

Content
View full analysis
/dev/null || echo "") TEXT=$(echo "$NOTE_JSON" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('text',''))" 2>/dev/null || echo "") # 2. Extract topic: prefer title, then first line TOPIC="${TITLE:-}" if [ -z "$TOPIC" ]; then TOPIC=$(echo "$TEXT" | head -1 | sed 's/^#\+ *//') fi TOPIC=$(echo "$TOPIC" | tr ' ' '+' | head -c 80) if [ -z "$TOPIC" ]; then echo "ERROR: Could not extract topic from note $NOTE_ID" exit 1 fi # 3. Search for a GIF GIF_URL="" if [ -n "$TENOR_KEY" ]; then GIF_URL=$(curl -sf "https://tenor.googleapis.com/v2/search?q=${TOPIC}&key=${TENOR_KEY}&limit=1&media_filter=gif" \ | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['results'][0]['media_formats']['gif']['url'])" 2>/dev/null || echo "") fi if [ -z "$GIF_URL" ] && [ -n "$GIPHY_KEY" ]; then GIF_URL=$(curl -sf "https://api.giphy.com/v1/gifs/search?q=${TOPIC}&api_key=${GIPHY_KEY}&limit=1&rating=g" \ | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data'][0]['images']['original']['url'])" 2>/dev/null || echo "") fi ``` ### Technical Analysis The script reads private Bear note content and derives a search topic from the complete note title or, if no title exists, the first line of the note. Up to 80 bytes of this value are embedded in a URL and transmitted to Google Tenor or Giphy. External GIF search is necessary for the declared functionality, but sending note-derived content is a privacy-sensitive operation. The Skill documentation states that an API key is required but d ...[truncated 1580 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/enrich_note.sh:27
Finding

API Credentials Are Embedded in Command-Line Request URLs

Content
View full analysis
/dev/null || echo "") fi if [ -z "$GIF_URL" ] && [ -n "$GIPHY_KEY" ]; then GIF_URL=$(curl -sf "https://api.giphy.com/v1/gifs/search?q=${TOPIC}&api_key=${GIPHY_KEY}&limit=1&rating=g" \ | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data'][0]['images']['original']['url'])" 2>/dev/null || echo "") fi ``` ### Technical Analysis Both API keys are interpolated directly into URLs passed to `curl`. Although HTTPS protects the URL while it is in transit, placing credentials in request URLs increases their exposure surface. The complete URL can appear in process arguments while `curl` runs. It may also be recorded by debugging tools, command tracing, crash diagnostics, monitoring software, endpoint instrumentation, proxies, or provider-side request logs. URL-based credentials are generally harder to protect from incidental logging than authorization headers. The Skill does not intentionally exfiltrate the keys to an unrelated destination: each key is sent to its corresponding provider. The weakness is the insecure credential transport mechanism and avoidable exposure to local or operational telemetry. ### Attack Path 1. The user configures `TENOR_API_KEY` or `GIPHY_API_KEY`. 2. The script expands the secret into a complete URL. 3. The URL is supplied as a `curl` process argument and sent to the provider. 4. A local observer with sufficient process-inspection access, diagnostic software, or a logging component captures the URL. 5. The observer e ...[truncated 654 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding

Installation Instructions Use an Unpinned Latest Dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior claims simple visual enrichment, but the workflow also changes note tags/state, which is a materially different and destructive action. When a skill understates state-changing behavior, users and calling agents may approve it under false assumptions, leading to unintended note modification or workflow corruption.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior claims simple visual enrichment, but the workflow also changes note tags/state, which is a materially different and destructive action. When a skill understates state-changing behavior, users and calling agents may approve it under false assumptions, leading to unintended note modification or workflow corruption.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow says note content is read, topic phrases are extracted, and those phrases are used to query Tenor or Giphy, but the skill does not warn that note-derived data is sent to external services. This creates a privacy and data-handling risk because potentially sensitive research topics may be disclosed to third-party APIs without user awareness.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/enrich_note.sh (reported line 30)May include surrounding context.

sh
GIF_URL=""

if [ -n "$TENOR_KEY" ]; then
    GIF_URL=$(curl -sf "https://tenor.googleapis.com/v2/search?q=${TOPIC}&key=${TENOR_KEY}&limit=1&media_filter=gif" \
        | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['results'][0]['media_formats']['gif']['url'])" 2>/dev/null || echo "")
fi

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/enrich_note.sh (reported line 35)May include surrounding context.

sh
fi

if [ -z "$GIF_URL" ] && [ -n "$GIPHY_KEY" ]; then
    GIF_URL=$(curl -sf "https://api.giphy.com/v1/gifs/search?q=${TOPIC}&api_key=${GIPHY_KEY}&limit=1&rating=g" \
        | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data'][0]['images']['original']['url'])" 2>/dev/null || echo "")
fi

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The comments/documented behavior say the script removes the pending tag and adds a new tag to the same note, but the implementation creates a new note instead. This mismatch is dangerous because users and reviewers may trust the comment and overlook that the automation alters notebook state in an unintended way.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script claims to retag the enriched note, but instead invokes grizzly create with the note title and new tag, which creates a separate note rather than updating the original one. This can silently duplicate content/workflow state and mislead users into believing the original note was marked complete when it was not.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill invokes shell scripts and local CLI tooling but declares no explicit tool scope or permission boundaries. In an agent environment, this can cause the skill to run with broader-than-expected command execution capability, increasing the chance of unauthorized local actions against Bear notes or the host system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill is described as operating specifically on notes tagged 「待整理」 and changing them to 已整理, which imposes a specific language/locale convention. The file does not explain that this is a locale-specific workflow or offer users a configurable tag choice, creating a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description does not prominently warn that it modifies note contents and retags notes in batch, which are state-changing operations. Missing disclosure undermines informed consent and can lead to accidental bulk edits, especially when an agent is selecting or invoking the skill automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script derives TOPIC from the note title or first line and sends it to Tenor or Giphy without any disclosure, consent, or privacy boundary. Research-note titles often contain sensitive subjects, project names, or personal data, so this creates unintended third-party data exposure.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The call to Giphy transmits a query derived from note content to an external service. In the context of a research-assistant skill operating on personal or professional notes, even a short title/topic can reveal sensitive information to a third party.

Content

Scanner excerpt · scripts/enrich_note.sh (reported line 35)May include surrounding context.

sh
fi

if [ -z "$GIF_URL" ] && [ -n "$GIPHY_KEY" ]; then
    GIF_URL=$(curl -sf "https://api.giphy.com/v1/gifs/search?q=${TOPIC}&api_key=${GIPHY_KEY}&limit=1&rating=g" \
        | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['data'][0]['images']['original']['url'])" 2>/dev/null || echo "")
fi

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script appends markdown to the note and changes its tags, which are user-data modifications. Although the code comments describe these actions, there is no confirmation prompt or prior user-facing disclosure that the note will be altered and tags updated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script defaults to the Chinese tag names '已整理' and '待整理' for all users. This imposes a specific language choice in behavior without offering a user language selection or documenting that the skill is intentionally region- or locale-specific.

Content

No source excerpt is available for this finding.