Back to skill

Security audit

research-gif-enricher

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its note-enrichment purpose, but it batch-edits Bear notes and sends title-derived keywords to an external GIF service without enough user control or disclosure.

Review before installing. This skill can read and rewrite Bear notes tagged 「待整理」, may overwrite note content while removing the tag, and may send title-derived search terms to Tenor for GIF lookup. Use only after backing up notes, confirming the tagged set is safe to process, and accepting the external GIF-search data flow; a pinned grizzly dependency and opt-in network mode would reduce risk.

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 (4)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/process_tagged.sh:90
Finding

Hard-Coded Tenor API Credential

Content
View full analysis
/dev/null | python3 -c " import sys, json data = json.load(sys.stdin) results = data.get('results', []) if results: print(results[0].get('media_formats', {}).get('gif', {}).get('url', '')) " 2>/dev/null || echo "") ``` ### Technical Analysis The script embeds a Google/Tenor API key directly in distributed source code. Anyone with access to the package can extract and reuse this credential independently of the Skill. Client-distributed API keys should be treated as publicly exposed unless they are tightly restricted at the provider. The available source does not establish that this key has API, referrer, application, billing, or quota restrictions. Although the key is not a Bear token and does not directly grant access to local notes, its exposure creates credential-abuse and operational risks. ### Attack Path 1. An attacker downloads or inspects the Skill package. 2. The attacker extracts the API key from line 90. 3. The attacker submits unrelated requests to compatible Google APIs using that key. 4. If provider-side restrictions are insufficient, the requests consume the owner's quota or generate charges and abuse attributed to the key owner. 5. Sustained misuse may cause service degradation or revocation of the key, breaking GIF lookup for legitimate users. ### Impact Assessment The exposed key does not provide local shell privileges or access to the Bear token based on the audited code. Its scope is limited to permissions granted to the Google API project. Potential consequences include unauthorized API usage, quota exhaustion, billing impact, service interruptio ...[truncated 69 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding

Unpinned Installation of a Mutable Executable Dependency

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/process_tagged.sh:90
Finding

Disclosure of Bear Note Title Keywords to an External GIF Provider

Content
View full analysis
/dev/null || echo "${TITLE:0:30}") ``` ```bash # Fallback: search via web if [ -z "$GIF_URL" ]; then GIF_URL=$(curl -s "https://tenor.googleapis.com/v2/search?q=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "$QUERY")&key=AIzaSyAyimkuYQYF_FXVALexPuGQctUWRURdCYQ&limit=1" 2>/dev/null | python3 -c " import sys, json data = json.load(sys.stdin) results = data.get('results', []) if results: print(results[0].get('media_formats', {}).get('gif', {}).get('url', '')) " 2>/dev/null || echo "") fi ``` ### Technical Analysis The script derives a query from up to three words in each Bear note title, or up to 30 title characters as a fallback, and transmits that query to Google Tenor over HTTPS. External search is functionally relevant to obtaining a topic-matched GIF, so the network access itself does not exceed the declared feature. However, private note titles may contain client names, project codenames, health information, research topics, or other confidential terms. The transfer is not clearly disclosed as a privacy boundary in the Skill documentation, and the script does not request confirmation, display the exact outgoing query for approval beyond routine console output, or provide a privacy-preserving local mode. The audited request does not include the Bear token or full note content. ### Attack Path 1. A user creates a private Bear note whose title contains sensitive terms and tags it `待整理`. 2. The user runs the batch-processing script. 3. The script reads the title and ...[truncated 736 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/process_tagged.sh:105
Finding

Stale Whole-Note Replacement Can Delete the Appended GIF and Concurrent Edits

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The core behavior mostly matches the declared purpose: it processes Bear notes tagged 「待整理」, reads them with grizzly, finds GIFs, appends them, and removes the tag. However, the description specifically says GIFs are searched via gifgrep, while the code also performs direct external network requests to the Tenor API using curl as a fallback. That is an additional capability and resource access path not disclosed in the description. The hardcoded Tenor API key further confirms this undeclared external integration. This is a meaningful mismatch in implementation behavior/resources, even though the primary purpose remains aligned.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow proposes destructive retagging and possible note replacement or recreation, including stripping tags from content and potentially deleting old notes, without an explicit safeguard or confirmation step. Because Bear notes are user data, these operations can cause irreversible loss of metadata, duplication, or accidental deletion if the rewrite logic is incorrect.

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/process_tagged.sh (reported line 77)May include surrounding context.

sh
echo "  🔎 Searching GIF for: $QUERY"

  # Search GIF via gifgrep (curl to Tenor/Giphy as fallback)
  GIF_URL=""
  if command -v gifgrep &>/dev/null; then
    GIF_URL=$(gifgrep search "$QUERY" --limit 1 --json 2>/dev/null | python3 -c "

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/process_tagged.sh (reported line 90)May include surrounding context.

sh
# Fallback: search via web
  if [ -z "$GIF_URL" ]; then
    GIF_URL=$(curl -s "https://tenor.googleapis.com/v2/search?q=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "$QUERY")&key=AIzaSyAyimkuYQYF_FXVALexPuGQctUWRURdCYQ&limit=1" 2>/dev/null | python3 -c "
import sys, json
data = json.load(sys.stdin)
results = data.get('results', [])

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares capabilities that clearly require shell execution and likely network access, but it does not scope or constrain those tools via explicit permissions or allowed-tools metadata. In practice, this increases the attack surface and makes it easier for an agent to invoke broader functionality than the user may expect, especially when handling local note data and external GIF lookups.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is designed to bulk modify Bear notes by appending media and removing a workflow tag, but it does not prominently warn the user that it will perform write operations across multiple notes. This can lead to unintended content changes, loss of organizational metadata, and difficult rollback if the enrichment is low quality or the wrong notes are targeted.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill performs a direct network call to Tenor via curl even though the described behavior emphasizes local Bear-note processing plus gifgrep-based lookup. This expands the tool's data-flow and trust boundary without clear declaration, and causes note-derived query terms to be sent to a third party. In a note-processing skill, undeclared outbound requests are risky because users may not expect their note topics to leave the device.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script embeds a hardcoded Tenor/Google API key directly in source. Hardcoded secrets are easily extracted, reused, rotated poorly, and may enable unauthorized use of the API account or quota exhaustion. In this skill, the key also enables undeclared external access beyond the minimal local note-tidying function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends note-derived search terms based on the note title to an external GIF search API without explicit warning or consent. Research note titles can contain sensitive subjects, project names, health/legal topics, or other private metadata, so even partial disclosure to a third party can violate user expectations and privacy requirements. The skill context makes this more dangerous because Bear notes are commonly personal or confidential.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script rewrites note contents by replacing the full note text after stripping the tag, and it does so automatically across all tagged notes. Bulk content replacement can unintentionally destroy formatting, race with concurrent edits, or overwrite data if parsing or text normalization is imperfect. In a research-notes workflow, silent modification of user-authored notes increases the risk of integrity loss.

Content

No source excerpt is available for this finding.