Back to skill

Security audit

Explorium AgentSource

Security checks for vulnerabilities and agentic risk

Overview

The skill’s prospecting purpose is coherent, but it needs review because it handles API keys and personal contact data with avoidable local exposure risks.

Review this skill before installing if you will process customer lists or personal contact data. Prefer setting EXPLORIUM_API_KEY outside the installer, avoid entering secrets where terminal output is logged, remove or protect /tmp/agentsource_*.json files after use, and require explicit consent before sending free-text query context or imported CSV records to Explorium.

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

T09 · Insecure Skill Coding Practices

Warning
Location
bin/agentsource.py:116
Finding

Predictable and Insufficiently Protected 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 ``` The same pattern is used for error files: ```python path = make_temp_path(f"{command}_error") path.write_text(json.dumps(data, indent=2)) ``` ### Technical Analysis The CLI writes imported CSV rows, fetched companies, prospect contact information, enrichment results, and event data directly to the shared `/tmp` directory. Filenames contain only a timestamp with one-second resolution and a known command name. The implementation does not: - Generate a cryptographically random filename. - Atomically reserve the destination before writing. - Explicitly set result-file permissions to `0600`. - Use a private temporary directory with permissions such as `0700`. - Remove result files after use. Consequently, file permissions depend on the invoking process's umask. With a common `022` umask, newly created files may be readable by other local users. Predictable names also permit collisions between invocations of the same command during the same second. Depending on operating-system temporary-file protections, pre-creation or link-based interference may also be possible. The README states that these files are cleaned up automatically by the operating system, but that does not provide timely confidentiality guarantees and does not prevent exposure while the files exist. ### Attack Path 1. An attacker with access to another local account monitors `/tmp` for names matching `agentsource_*_fetch.jso ...[truncated 1153 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
setup.sh:81
Finding

Setup Script Displays the Explorium API Key in Plaintext

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 interactive `read` command does not use silent input, so the API key is displayed while the user types it. The script subsequently prints the entire credential as part of an example environment-variable command. Although the saved configuration file is changed to mode `0600`, that protection does not address disclosure through: - Visible terminal input. - Terminal scrollback. - CI or automation logs. - Shell-session recording. - Remote support or screen-sharing sessions. - Shoulder surfing. The setup documentation correctly warns users not to disclose the key in chat, but the installer itself unnecessarily reproduces the secret in terminal output. The network use of the API key is necessary for the declared Explorium functionality. Displaying it in plaintext is not necessary and exceeds the minimum exposure required to configure the Skill. ### Attack Path 1. A user runs `setup.sh` and enters an Explorium API key at the prompt. 2. The key appears visibly as it is entered. 3. The script prints the complete key again in an `export EXPLORIUM_API_KEY='...'` example. 4. An observer, terminal logger, CI log collector, or session-recording system captures the output. 5. The attacker retrieves the key and uses it to authenticate directly to the Explorium API. ### Impact Assessment A disclosed key may permi ...[truncated 541 chars]
Remediation
View remediation
'" ``` 4. Prefer secure environment injection or an operating-system credential store over interactive plaintext entry. 5. Warn users that command-line arguments such as `config --api-key ` may be visible in process listings or shell history. 6. Consider accepting the credential through standard input or a protected file descriptor. 7. Ensure installer logs redact values matching the credential input. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:124
Finding

Workflow Examples Can Transmit User Query Text Without an Explicit Consent Step

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
plugin.json:23
Finding

Plugin Privacy Metadata Omits Company and Contact Records Sent for Matching

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

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 51)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 58)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
84% confidence
Finding

Writing all API responses to predictable /tmp/agentsource_*.json files can expose sensitive prospecting data, contact information, enrichment results, or matching inputs to other local users or processes if file permissions are not tightly controlled. In a multi-user machine, shared temp environment, or agent runtime with other tools watching /tmp, this creates a realistic local data leakage risk, especially because the skill handles business and contact datasets at scale.

Content

Scanner excerpt · README.md (reported line 96)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
92% confidence
Finding

The skill instructs the agent to use shell, read/write files, access environment variables, and make networked API calls, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an overprivileged execution surface where the runtime may permit broader capabilities than intended, increasing the blast radius if the skill is misused or the surrounding agent is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The to_csv command writes the full flattened entity dataset to a user-specified CSV path, which can include prospect or business data, but the code provides no confirmation prompt or user-facing warning at the point of export. While the CLI has general comments about temp-file behavior, there is no explicit disclosure here that potentially sensitive fetched/enriched data will be persisted outside /tmp.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly supports enrichment of prospect records with personal email addresses and phone numbers, but the reference provides no privacy, consent, lawful-basis, or sensitive-data handling guidance. In a B2B prospecting skill, this omission can lead users or downstream agents to collect and export personal contact data in ways that violate privacy policies, internal governance, or applicable regulations.

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 202)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 8)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 16)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 24)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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script reads an API key from terminal input and stores it locally, then prints a shell export command containing the secret inline. This can expose the key via shoulder-surfing, terminal scrollback, shell history if copied, screenshots, or logs collected by terminal/session recording tools.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.