Back to skill

Security audit

Tavily Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real external search client, but it exposes broader search, extraction, and AI synthesis modes than its Tavily-focused documentation discloses.

Install only if you are comfortable sending search terms, supplied URLs, prompts, and some retrieved result data to AIsa under your API key. Treat the package as a multi-service AIsa research client, not just a Tavily search helper, and avoid using it with secrets, private URLs, regulated data, or URLs containing tokens until the documentation and exposed commands are tightened.

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

Warning
Location
scripts/search_client.py:147
Finding

Undocumented Multi-Service Operations Exceed the Skill's Declared Tavily Interface

Content
View full analysis

Vulnerability Details

File Location: scripts/search_client.py, lines 147–257
Vulnerability Type: Undisclosed external data processing and excessive functional scope
Risk Level: Medium

Complete Code Snippet

python
def cmd_extract(args: argparse.Namespace) -> None:
    api_key = get_api_key()
    urls = [u.strip() for u in args.urls.split(",")]
    data = aisa_post(api_key, "/tavily/extract", {"urls": urls})
    if "results" in data and isinstance(data["results"], list):
        for r in data["results"]:
            print(f"\n{'='*60}")
            print(f"  URL: {r.get('url', 'Unknown')}")
            print(f"{'='*60}")
            content = r.get("raw_content", "")
            print(content[:3000] if content else "(no content)")
    else:
        print(json.dumps(data, indent=2))


def cmd_sonar(args: argparse.Namespace) -> None:
    api_key = get_api_key()
    endpoint_map = {
        "sonar": "/sonar",
        "sonar-pro": "/sonar-pro",
        "sonar-reasoning-pro": "/sonar-reasoning-pro",
        "sonar-deep-research": "/sonar-deep-research",
    }
    endpoint = endpoint_map.get(args.model, "/sonar")
    data = aisa_post(api_key, endpoint, {
        "model": args.model,
        "messages": [{"role": "user", "content": args.query}],
    })
    print_results(data, f"Perplexity ({args.model})")


def cmd_verity(args: argparse.Namespace) -> None:
    """Multi-source search with confidence scoring."""
    api_key = get_api_key()
    count = args.count

    print(f"\nSearching across multiple sources for: \"{args.query}\"\n")

    # Phase 1: Parallel retrieval
    sources: dict[str, dict[str, Any]] = {}
    tasks = {
        "Web": ("/scholar/search/web", {"query": args.query, "max_num_results": count}),
        "Smart": ("/scholar/search/smart", {"query": args.query, "max_num_results": count}),
        "Scholar": ("/scholar/search/scholar", {"query": a
...[truncated 6067 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove web, scholar, smart, extract, sonar, and verity from this Tavily-specific package if they are not necessary for its declared functionality.
  2. If these operations are intentional, document every subcommand, destination endpoint, transmitted data category, number of requests, and potential API-credit usage in SKILL.md.
  3. Split unrelated services into separately installable skills so users can grant only the capabilities required for a particular task.
  4. Require explicit user confirmation before URL extraction, multi-service searches, or resubmission of aggregated responses for synthesis.
  5. Validate extraction URLs and restrict allowed schemes to https. Reject embedded credentials and consider removing sensitive query parameters before transmission.
  6. Apply count limits consistently to every command to prevent accidental or abusive resource consumption.
  7. Add a dry-run or request-preview mode that displays the endpoint and payload fields without exposing the API key.
  8. Provide a clear privacy notice stating that queries, prompts, URLs, and aggregated results are sent to api.aisa.one.
  9. Consider using service-scoped API credentials if the provider supports them, preventing a Tavily-only package from accessing unrelated endpoints.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior does not match the detected capabilities: the skill appears to support undeclared external search/research endpoints and aggregation behaviors beyond Tavily, while also claiming domain filtering that is not actually implemented. This is dangerous because users and higher-level agents may route sensitive research queries under false assumptions about where data goes and what controls exist, leading to unanticipated disclosure and trust-boundary violations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares network and environment-variable use but does not define any explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, that omission weakens least-privilege boundaries and makes it harder for users or orchestrators to understand and constrain what the skill can access, especially since it requires an API key and sends data externally.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation guidance is broad enough to match many ordinary user requests involving search, research, discovery, or content extraction. In agent routing systems, overly broad descriptions can cause this skill to be selected more often than intended, increasing unnecessary transmission of user queries to third-party services and amplifying the impact of any undocumented behaviors.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation does not warn that user queries and retrieved content are sent to an external service for processing, including optional LLM-generated summaries. This creates a privacy and consent risk because users may provide sensitive information without realizing it will leave the local environment and be processed by third parties.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file advertises and implements a much broader set of capabilities than the skill metadata describes, including web, scholar, smart, extract, sonar, and verity modes. In an agent-skill context, this scope drift is dangerous because callers may authorize or sandbox the skill based on the manifest's Tavily-focused description while the code can exfiltrate user queries to additional backends and perform materially different actions.

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 · scripts/search_client.py (reported line 28)May include surrounding context.

python
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Any

AISA_BASE = "https://api.aisa.one/apis/v1"


def get_api_key() -> str:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The academic search path adds a capability not reflected in the skill description, creating a mismatch between declared and actual behavior. In a security review of agent skills, hidden or undeclared functionality is a real risk because it can route user data to services and use cases outside what an operator intended to approve.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Sonar/Perplexity mode extends the skill beyond Tavily-through-AIsa search into deep-research LLM querying, which may send user prompts to a different downstream model path than expected. This is more dangerous than a simple feature mismatch because it can alter data-handling, cost, output behavior, and trust assumptions while remaining undisclosed in the manifest.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The verity mode performs parallel multi-source retrieval, confidence scoring, and AI synthesis, substantially exceeding the stated Tavily search behavior. In an agent environment this broadens data transmission and authority, increases prompt/data exposure to multiple endpoints, and may produce synthesized conclusions that users did not explicitly request or authorize.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code explicitly sets the explanation request language to "en", which forces a specific language/locale regardless of user preference. The policy allows locale constraints only when user choice or clear justification is provided, neither of which appears here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.