Back to skill

Security audit

tavily-search-native-node

Security checks for vulnerabilities and agentic risk

Overview

This skill is a clearly scoped Tavily web-search helper that sends user-approved search queries to Tavily and does not show hidden persistence, file access, or unrelated behavior.

Install only if you are comfortable sending search queries and domain filters to Tavily using your TAVILY_API_KEY. Do not use it for secrets or confidential text, and ensure your agent invokes the script without shell interpolation so user query text is passed as data.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
rpolating query text into a shell command string. Shell parsing happens before `search.mjs` receives `argv`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
return spawnSync(process.execPath, [script, ...args], {
    cwd: __dirname,
    encoding: 'utf8',
    env: { ...process.env, TAVILY_API_KEY: '', ...env },
    timeout: 20000,
  });
}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
return spawnSync(process.execPath, [script, ...args], {
    cwd: __dirname,
    encoding: 'utf8',
    env: { ...process.env, TAVILY_API_KEY: '', ...env },
    timeout: 20000,
  });
}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill declares sensitive capabilities in prose and metadata (`env`, outbound network) but does not expose an explicit tool-scope/permissions declaration that a host platform can enforce. That creates a policy gap where reviewers and runtime controls may not have a machine-readable boundary for what the skill is allowed to access, increasing the chance of unintended environment-variable access or external data transmission.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases and usage guidance include broad terms like "research" and "compare," which can cause the skill to activate in routine conversations where external web transmission was not intended. In this skill's context, unintended invocation matters because it can send user queries to a third-party API, creating privacy, cost, and approval-boundary risks even if the implementation is otherwise careful.

External Transmission

Medium
Category
Data Exfiltration
Content
// Usage: node search.mjs [flags] "query"
// Requires Node 18+ (uses native fetch). Reads TAVILY_API_KEY from the process environment only.

const ENDPOINT = "https://api.tavily.com/search";
const DEFAULT_TIMEOUT_MS = 30000;

function die(msg, code = 1) {
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
// Usage: node search.mjs [flags] "query"
// Requires Node 18+ (uses native fetch). Reads TAVILY_API_KEY from the process environment only.

const ENDPOINT = "https://api.tavily.com/search";
const DEFAULT_TIMEOUT_MS = 30000;

function die(msg, code = 1) {
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
// Usage: node search.mjs [flags] "query"
// Requires Node 18+ (uses native fetch). Reads TAVILY_API_KEY from the process environment only.

const ENDPOINT = "https://api.tavily.com/search";
const DEFAULT_TIMEOUT_MS = 30000;

function die(msg, code = 1) {
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.exposed_secret_literal

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests.mjs:13

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/search.mjs:20

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
tests.mjs:97