Back to skill

Security audit

research-assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it can modify private Bear notes, send note-derived search terms to an external GIF tool, and contains a real command-injection bug in its --max option.

Install only if you are comfortable giving this skill access to read and modify tagged Bear notes and to derive external GIF searches from note content. Use --dry-run first, limit runs with a validated numeric --max value, and avoid using it on confidential notes until the --max validation bug and clearer external-query disclosure are fixed.

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

T09 · Insecure Skill Coding Practices

Error
Location
research_assistant.sh:56
Finding

Arbitrary Command Execution Through Unvalidated --max Arithmetic Expression

Content
View full analysis
Remediation
View remediation
&2 exit 1 } MAX="$2" [[ "$MAX" =~ ^[0-9]+$ ]] || { echo "Invalid --max value: expected a non-negative integer" >&2 exit 1 } shift 2 ;; ``` For defense in depth, validate all enumerated and value-bearing options after parsing: ```bash [[ "$MAX" =~ ^[0-9]+$ ]] || { echo "Invalid --max value" >&2 exit 1 } case "$MODE" in append|prepend) ;; *) echo "Invalid --mode: expected append or prepend" >&2 exit 1 ;; esac ``` Additional hardening measures: 1. Check that each option requiring a value has another argument available before reading `$2`. 2. Do not place untrusted strings in Bash arithmetic contexts. 3. If this script is invoked by an agent, service, or wrapper, pass arguments as a structured argument array rather than constructing a shell command string. 4. Add regression tests that reject arithmetic syntax, command substitutions, signs, whitespace, and non-decimal values for `--max`. 5. Run the script with the minimum filesystem and application permissions needed to process Bear notes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill documentation describes reading tagged Bear notes and inserting GIFs, but it also relies on an external Bear API token file and performs note modification through external CLIs without declaring explicit permissions or trust boundaries. This mismatch can cause users or orchestration systems to underestimate that the skill reads private note contents, invokes outside tooling, and makes authenticated changes to personal data.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · SKILL.md (reported line 4)May include surrounding context.

md
---
name: research-assistant
version: 0.1.0
description: Auto-illustrate research notes — read Bear notes tagged 「待整理」, match a topic-relevant GIF to each note's content, and insert it inline.
author: terrycarter1985
tags: [research, bear, gif, media, productivity]
metadata: {"moltbot":{"emoji":"🔬","os":["darwin"],"requires":{"bins":["grizzly","gifgrep"]}}}
capabilities: [note_taking, media_search, personal_productivity]
---

# Research Assistant

Turns rough research notes into illustrated ones. It finds every Bear note tagged
**待整理** ("to be organized"), derives a topic from each note's content, searches
for a rel

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes reading tagged Bear notes, finding relevant GIFs, and inserting them inline. While modifying notes is expected, explicitly handling a credential file in the user's home directory introduces a sensitive capability beyond the user-facing purpose and is not declared in the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The query sent to the external GIF search tool is derived from note titles and body text, which may contain sensitive research content. Because the skill does not warn the user that note-derived text may leave the device through a third-party search service, it creates an undisclosed data leakage risk and may expose confidential topics or keywords.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill performs persistent modification of user notes by appending or prepending markdown content, but it provides only runtime status output and no explicit confirmation or consent gate before changing data. In an agent/skill setting, silent content mutation can lead to unwanted note corruption, clutter, or trust violations, especially if run automatically over many notes.

Content

No source excerpt is available for this finding.