Back to skill

Security audit

Listenhub

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its media-generation purpose, but it needs Review because image setup can modify shell startup files, store an API key insecurely, and auto-install packages.

Install only if you are comfortable sending prompts, source text, URLs, and image-reference URLs to ListenHub/Marswave/Labnana APIs. Before using image generation, provide LISTENHUB_API_KEY yourself through your environment, install jq/curl manually, and avoid the first-run setup path that writes to shell rc files. Do not paste untrusted values as the API key or output directory, and do not upload private local reference images to public image hosts.

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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate-image.sh:350
Finding

Shell Startup-File Injection Through Unsanitized Configuration Values

Content
View full analysis
&2 read -r api_key if [ -z "$api_key" ]; then echo "Error: API key cannot be empty" >&2 exit 1 fi # Check if config already exists (avoid duplicate append) if ! grep -q "^export LISTENHUB_API_KEY=" "$shell_rc" 2>/dev/null; then echo "export LISTENHUB_API_KEY=\"$api_key\"" >> "$shell_rc" else # If exists, replace sed_inplace "$shell_rc" "s|^export LISTENHUB_API_KEY=.*|export LISTENHUB_API_KEY=\"$api_key\"|" fi export LISTENHUB_API_KEY="$api_key" ``` ```bash echo -n " Image save location (default: ~/Downloads): " >&2 read -r output_dir # Default to ~/Downloads if [ -z "$output_dir" ]; then output_dir="$HOME/Downloads" fi # Expand ~ symbol output_dir="${output_dir/#\~/$HOME}" # Create directory if not exists mkdir -p "$output_dir" # Check if config already exists (avoid duplicate append) if ! grep -q "^export LISTENHUB_OUTPUT_DIR=" "$shell_rc" 2>/dev/null; then echo "export LISTENHUB_OUTPUT_DIR=\"$output_dir\"" >> "$shell_rc" else sed_inplace "$shell_rc" "s|^export LISTENHUB_OUTPUT_DIR=.*|export LISTENHUB_OUTPUT_DIR=\"$output_dir\"|" fi export LISTENHUB_OUTPUT_DIR="$output_dir" ``` ### Technical Analysis The script embeds user-controlled API-key and output-directory values directly into executable shell startup files such as `.zshrc`, `.bashrc`, or `.profile`. The values are placed inside double-quoted shell assignments without shell-safe encoding or validation. Shell expressions such as command substitutions and backticks remain active when the startup file is subsequently parsed. For example, a value containing `$(command)` can be written into an `export` statement and executed whenever a future shell sources that file. The replacement branch also interpolates the values directly into a `sed ...[truncated 1599 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate-image.sh:345
Finding

Plaintext API-Key Persistence Without Permission Enforcement

Content
View full analysis
&2 echo " Visit https://listenhub.ai/settings/api-keys" >&2 echo " (Requires subscription)" >&2 echo "" >&2 echo -n " Please paste your API key: " >&2 read -r api_key if [ -z "$api_key" ]; then echo "Error: API key cannot be empty" >&2 exit 1 fi # Check if config already exists (avoid duplicate append) if ! grep -q "^export LISTENHUB_API_KEY=" "$shell_rc" 2>/dev/null; then echo "export LISTENHUB_API_KEY=\"$api_key\"" >> "$shell_rc" else # If exists, replace sed_inplace "$shell_rc" "s|^export LISTENHUB_API_KEY=.*|export LISTENHUB_API_KEY=\"$api_key\"|" fi export LISTENHUB_API_KEY="$api_key" echo "" >&2 fi ``` ### Technical Analysis The script permanently stores the ListenHub API bearer token as plaintext in a general-purpose shell startup file. It does not inspect or enforce the permissions of that file before or after writing the credential. If the startup file does not already exist, shell redirection creates it according to the process umask. A permissive umask can result in credentials being readable by other local accounts. Existing startup files may also already have overly broad permissions. General-purpose shell files are commonly read by backup software, diagnostics, support tools, development utilities, and scripts. This gives the API key a wider exposure surface than a dedicated secrets store. The interactive input also uses `read -r` rather than silent input, so the key may be visible while it is entered. ### Attack Path 1. A user performs first-time image-generation setup. 2. The user enters a valid ListenHub API key. 3. The script writes the key into a shell startup file without enforcing restrictive permissions. 4. An ...[truncated 631 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/generate-image.sh:245
Finding

Automatic Privileged Package Installation Without Explicit Approval

Content
View full analysis
/dev/null; then missing_deps+=("jq") fi # Check curl if ! find_curl &>/dev/null; then missing_deps+=("curl") fi # If missing dependencies, auto-install if [ ${#missing_deps[@]} -gt 0 ]; then echo "→ Missing required tools: ${missing_deps[*]}" >&2 echo " Auto-installing..." >&2 echo "" >&2 case "$PLATFORM" in macos) install_cmd="brew install ${missing_deps[*]}" if ! command -v brew &>/dev/null; then echo "Error: Homebrew not detected" >&2 echo " Please install Homebrew first: https://brew.sh" >&2 echo " Or install manually: ${missing_deps[*]}" >&2 exit 1 fi ;; linux) # Detect Linux distribution if command -v apt-get &>/dev/null; then install_cmd="sudo apt-get update && sudo apt-get install -y ${missing_deps[*]}" elif command -v yum &>/dev/null; then install_cmd="sudo yum install -y ${missing_deps[*]}" elif command -v dnf &>/dev/null; then install_cmd="sudo dnf install -y ${missing_deps[*]}" elif command -v pacman &>/dev/null; then install_cmd="sudo pacman -S --noconfirm ${missing_deps[*]}" else echo "Error: No supported package manager detected" >&2 echo " Please install manually: ${missing_deps[*]}" >&2 exit 1 fi ;; windows) if command -v choco &>/dev/null; then install_cmd="choco install -y ${missing_deps[*]}" elif command -v scoop &>/dev/null; then install_cmd="scoop install ${missing_deps[*]}" else echo "Error: Chocolatey or Scoop not ...[truncated 2861 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (44)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading shell rc files for credentials and contacting GitHub for version checks are materially different from simple media generation, because they access local configuration and transmit network metadata to third parties. These behaviors expand the trust boundary and can expose secrets, browsing context, or environment details if users do not expect them.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script automatically installs missing dependencies by constructing package-manager commands and executing them with eval, including sudo on Linux and non-interactive flags on some platforms. That behavior exceeds the expected scope of a media-generation skill and can trigger privileged system changes without explicit user approval, creating unnecessary supply-chain and privilege-escalation risk.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The apt-get path chains update and install in one eval-executed command, increasing the amount of change performed in a single automated step and reducing user visibility into what will happen. Chained privileged operations are riskier because they combine repository refresh and package installation without an intervening review point.

Content

Scanner excerpt · scripts/generate-image.sh (reported line 281)May include surrounding context.

sh
linux)
        # Detect Linux distribution
        if command -v apt-get &>/dev/null; then
          install_cmd="sudo apt-get update && sudo apt-get install -y ${missing_deps[*]}"
        elif command -v yum &>/dev/null; then
          install_cmd="sudo yum install -y ${missing_deps[*]}"
        elif command -v dnf &>/dev/null; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The --noconfirm flag suppresses package-manager prompts and weakens a key safety control that would otherwise force user review. Combined with automatic install logic, it enables broad system modification with less friction than users would expect from a media skill.

Content

Scanner excerpt · scripts/generate-image.sh (reported line 287)May include surrounding context.

sh
elif command -v dnf &>/dev/null; then
          install_cmd="sudo dnf install -y ${missing_deps[*]}"
        elif command -v pacman &>/dev/null; then
          install_cmd="sudo pacman -S --noconfirm ${missing_deps[*]}"
        else
          echo "Error: No supported package manager detected" >&2
          echo "  Please install manually: ${missing_deps[*]}" >&2

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill’s declared purpose is image generation, but the script persistently modifies user shell startup files to store API keys and output-path settings. Persistent mutation of login shell configuration is a sensitive side effect that can leak secrets, break user environments, or establish unwanted long-lived behavior unrelated to the immediate media task.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script asks for the API key and silently persists it into a shell startup file in plaintext. Storing credentials in broadly sourced shell RC files without a prominent warning or safer secret-storage mechanism increases the risk of accidental disclosure, backup leakage, and unintended propagation across sessions.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/lib.sh (reported line 131)May include surrounding context.

sh
Error: LISTENHUB_API_KEY not set

Setup:
  1. Get API key from https://listenhub.ai/settings/api-keys
  2. Add to ~/.zshrc or ~/.bashrc:
     export LISTENHUB_API_KEY="lh_sk_..."
  3. Run: source ~/.zshrc

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill explicitly instructs the agent to use shell scripts and make networked API calls, but it does not declare any tool scope such as allowed-tools or permissions. This creates a governance gap: a host may permit broader shell/network access than the skill actually needs, increasing the blast radius if the skill is invoked or if its instructions are abused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill uses broad trigger phrases like 'explain anything' and common user intents such as 'read this aloud' or 'generate an image.' Overly broad activation criteria increase the chance the skill is invoked in contexts where users did not intend to send content to an external API, which can lead to accidental disclosure of sensitive text, URLs, or files.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to upload local reference images to third-party hosting services before generation. This is a clear external data exfiltration path: local files may contain sensitive content or metadata, and sending them to unrelated third parties materially increases privacy and compliance risk beyond the core service's stated purpose.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
- The user provides only a short topic or phrase (e.g., "a cat"), AND
- The user has not explicitly stated they want verbatim generation

In this case, ask whether the user would like help enriching the prompt. Do not optimize without confirmation.

**When to never modify**:
- The user pastes a long, structured, or detailed prompt — treat them as experienced

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language behavior is restricted to two languages by validation logic, which effectively forces a locale/language policy. The file does not explain why the restriction exists or present it as a documented, justified limitation for a region-specific or service-specific tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script posts the assembled request body to an external API endpoint, and the payload can include the user's query, source URLs, and source text. Although the file comments describe usage, they do not explicitly warn that this content will be transmitted to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script forwards arbitrary user-provided script content to an external ListenHub API via api_post without any explicit warning, consent prompt, or indication that the text will leave the local environment. This creates a real privacy and data-handling risk because users may supply sensitive text, believing the tool is only performing a local transformation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The hardcoded API endpoint indicates that the script sends data to a third-party remote service. In this skill context that is functionally necessary, but it still creates an external data-exposure boundary and should be treated as a real transmission risk, especially when prompts or reference URLs may be sensitive.

Content

Scanner excerpt · scripts/generate-image.sh (reported line 55)May include surrounding context.

sh
fi

# Configuration
API_ENDPOINT="https://api.labnana.com/openapi/v1/images/generation"
AGENT_SKILLS_CLIENT_ID="PJBkELS1o_q9nJ~NzF2_Fmr21TNX&~eoJR49FFdFhD3U"
MAX_RETRIES=3
INITIAL_TIMEOUT=600

Static analysis

No suspicious patterns detected.