Back to skill

Security audit

Companies & Contacts enrichment - Explorium AgentSource

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate B2B prospecting API skill, but it needs Review because its setup and result handling can expose API keys and prospect data on the local machine.

Install only if you are comfortable sending prospecting filters, entity IDs, and matching records to Explorium. Avoid running setup in recorded/shared terminals, do not paste API keys into chat, and treat /tmp result files and exported CSVs as sensitive until the publisher fixes private temp storage and credential handling.

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

T09 · Insecure Skill Coding Practices

Error
Location
bin/agentsource.py:115
Finding

Predictable and Insecure Temporary Files Expose Sensitive Prospect Data

Content
View full analysis
pathlib.Path: ts = int(time.time()) return TEMP_DIR / f"agentsource_{ts}_{command}.json" def write_result(command: str, data: dict) -> pathlib.Path: path = make_temp_path(command) path.write_text(json.dumps(data, indent=2, default=str)) print(str(path)) return path def write_error(command: str, error_msg: str, error_code: str = None, http_status: int = None) -> pathlib.Path: ``` The same predictable path construction and unrestricted `write_text()` operation are also used when error files are written. ### Technical Analysis The CLI stores API responses and imported CSV content directly in the shared `/tmp` directory. A filename consists only of the current timestamp in seconds and a predictable command name, such as: ```text /tmp/agentsource_1750000000_fetch.json ``` This construction has several security weaknesses: 1. **Predictable filenames:** A local attacker can calculate likely paths from the current time and known command names. 2. **Non-atomic creation:** `Path.write_text()` opens an existing pathname rather than securely creating a new, exclusive file. 3. **Symbolic-link following:** If an attacker creates the expected pathname as a symbolic link, the CLI follows it and overwrites the link target, provided the victim account can write to that target. 4. **No explicit restrictive permissions:** The resulting mode depends on the process umask. Under a common `022` umask, files are created as `0644` and may be readable by other local users. 5. **Filename collisions:** Two invocations of the same command during the same second use the same path and can overwrite or corrupt each other's results. 6. **No explicit cleanup: ...[truncated 1809 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
setup.sh:81
Finding

API Key Is Echoed During Setup and Printed to Terminal Output

Content
View full analysis
"$CONFIG_FILE" chmod 600 "$CONFIG_FILE" echo "[OK] API key saved to $CONFIG_FILE (mode 600, owner read-only)" echo "" echo "To also set it as an environment variable, add this to ~/.zshrc or ~/.bashrc:" echo " export EXPLORIUM_API_KEY='$api_key'" ``` ### Technical Analysis The setup script reads the API key with ordinary `read`, without the `-s` option. Consequently, the terminal displays the credential while the user types it. After storing the key, the script prints the complete secret again as part of an example environment-variable command. This duplicates the credential into terminal output and may expose it through: - Terminal scrollback. - Shell or terminal session recording. - CI or remote-session logs. - Screen sharing. - Shoulder surfing. - Clipboard or terminal-history tooling. Although the resulting configuration file is changed to mode `0600`, that protection does not address disclosure during entry or subsequent printing. The documented alternative, `config --api-key `, also places the key in a command-line argument, which can remain in shell history and may be temporarily visible in process listings. The API key is legitimately required for the Skill's remote API functionality, but displaying or passing it in observable channels exceeds the minimum handling necessary. ### Attack Path 1. A user runs `setup.sh` in an observed, recorded, shared, or remotely managed terminal. 2. The user enters the Explorium API key at the prompt. 3. Because silent input is not enabled, the secret appears on screen as it is typed. 4. The s ...[truncated 782 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
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (19)

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% 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 · README.md (reported line 40)May include surrounding context.

Option A — Environment variable (recommended for persistent shell setups):

bash
export EXPLORIUM_API_KEY=your_api_key_here
# Add to ~/.zshrc or ~/.bashrc to persist across sessions

Option B — CLI config command (saves to ~/.agentsource/config.json, mode 600):

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% 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 · SKILL.md (reported line 55)May include surrounding context.

Option A — Environment variable (recommended for persistent shell setups):

bash
export EXPLORIUM_API_KEY=your_api_key_here
# Add to ~/.zshrc or ~/.bashrc to persist across sessions

Option B — CLI config command (saves to ~/.agentsource/config.json, mode 600):

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The README states that all command results are written to predictable files under /tmp, which may contain fetched business/contact data and enrichment outputs. Temporary directories are often broadly accessible depending on system configuration, and storing potentially sensitive lead/contact datasets there creates a risk of local data exposure, accidental reuse, or recovery by other processes/users.

Content

Scanner excerpt · README.md (reported line 85)May include surrounding context.

CLI Reference

All commands write results to /tmp/agentsource_<timestamp>_<command>.json and print only the file path to stdout.

API Key Config

bash

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill performs privileged actions including shell execution, file reads/writes, environment-variable access, and network calls, but it does not declare an explicit tool scope such as allowed-tools or permissions. This creates an overbroad execution surface where an agent may invoke sensitive capabilities without a clear least-privilege boundary, increasing the chance of misuse or accidental data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger list is extremely broad and includes common business phrases like market research, export to CSV, tech stack, and target list, which could cause the skill to activate in routine conversations where the user did not intend external lead-search behavior. Because this skill can access credentials, query a remote API, and write files, over-triggering increases the risk of unintended data transmission and tool execution.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring says results are written to temp files so large payloads never enter the conversation context window. However, the from-csv command reads the entire source CSV and writes all rows into the JSON temp file under data, which contradicts the stated intent of keeping large payloads out of conversational handling and instead creates another large payload file for later use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The tool writes fetched prospect and business data to predictable files under /tmp using default permissions and without securely creating the files. On multi-user systems, temp directories can expose sensitive B2B contact data through permissive file modes, race/symlink attacks, or residual files left behind after execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The to-csv command writes flattened entity data to a user-specified output path, which can permanently persist prospect or business data outside the temp area. The code performs the write directly and neither prompts nor emits any user-facing warning about exporting potentially sensitive data to disk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 191)May include surrounding context.

md
#   ~/.agentsource/config.json          — API key storage (mode 600, only if you choose to save it)
#
# Nothing is sent to any network during setup. The API key is only used when
# you run CLI commands that call https://api.explorium.ai/v1/.

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="$HOME/.agentsource"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
#   ~/.agentsource/config.json          — API key storage (mode 600, only if you choose to save it)
#
# Nothing is sent to any network during setup. The API key is only used when
# you run CLI commands that call https://api.explorium.ai/v1/.

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="$HOME/.agentsource"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
#   ~/.agentsource/config.json          — API key storage (mode 600, only if you choose to save it)
#
# Nothing is sent to any network during setup. The API key is only used when
# you run CLI commands that call https://api.explorium.ai/v1/.

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="$HOME/.agentsource"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · bin/agentsource.py (reported line 33)May include surrounding context.

python
#   ~/.agentsource/config.json          — API key storage (mode 600, only if you choose to save it)
#
# Nothing is sent to any network during setup. The API key is only used when
# you run CLI commands that call https://api.explorium.ai/v1/.

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="$HOME/.agentsource"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · plugin.json (reported line 19)May include surrounding context.

json
#   ~/.agentsource/config.json          — API key storage (mode 600, only if you choose to save it)
#
# Nothing is sent to any network during setup. The API key is only used when
# you run CLI commands that call https://api.explorium.ai/v1/.

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="$HOME/.agentsource"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · setup.sh (reported line 12)May include surrounding context.

sh
#   ~/.agentsource/config.json          — API key storage (mode 600, only if you choose to save it)
#
# Nothing is sent to any network during setup. The API key is only used when
# you run CLI commands that call https://api.explorium.ai/v1/.

PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_DIR="$HOME/.agentsource"

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 · setup.sh (reported line 46)May include surrounding context.

sh
echo "[OK] Python $PYTHON_VERSION"

# ---------------------------------------------------------------------------
# 2. Create directory structure
# ---------------------------------------------------------------------------
mkdir -p "$BIN_DIR"
echo "[OK] Created $BIN_DIR"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · setup.sh (reported line 75)May include surrounding context.

sh
if [[ "${save_key:-}" =~ ^[Yy]$ ]]; then
        printf '{\n  "api_key": "%s"\n}\n' \
            "$EXPLORIUM_API_KEY" > "$CONFIG_FILE"
        chmod 600 "$CONFIG_FILE"
        echo "[OK] API key saved to $CONFIG_FILE (mode 600, owner read-only)"
    fi
else

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · setup.sh (reported line 85)May include surrounding context.

sh
if [[ "${save_key:-}" =~ ^[Yy]$ ]]; then
        printf '{\n  "api_key": "%s"\n}\n' \
            "$EXPLORIUM_API_KEY" > "$CONFIG_FILE"
        chmod 600 "$CONFIG_FILE"
        echo "[OK] API key saved to $CONFIG_FILE (mode 600, owner read-only)"
    fi
else

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script prints the user-supplied API key back to the terminal inside an export command. This can expose the secret via shoulder-surfing, terminal scrollback, screen recordings, CI/session logging, or copied shell history if the user follows the printed instruction verbatim.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

Echoing the entered API key into a shell command leaks a sensitive credential to the terminal output and encourages unsafe handling. If a user copies that command into their shell profile or terminal, the secret may also end up in shell history, backups, support logs, or shared recordings.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.