Back to skill

Security audit

Web Search Local

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent web-search skill, but it needs Review because it can send queries to outside search engines, cache them locally, and expose proxy credentials in logs.

Install only if you are comfortable with search queries being sent to Bing, DuckDuckGo, or Yandex and cached locally for about an hour by default. Avoid using sensitive, private, or secret-containing queries unless running with --no-cache and explicit intent. Do not pass proxy credentials in the proxy URL unless the logging issue is fixed or logs are tightly controlled; prefer redacted or environment-backed proxy configuration. Use a virtual environment and pinned dependencies where possible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/search.py:70
Finding

Proxy Credentials Exposed Through Informational Logging

Content
View full analysis

Vulnerability Details

File Location: scripts/search.py:70-75
Vulnerability Type: Sensitive credential exposure through logs
Risk Level: Medium

Vulnerable Code

python
def set_proxy(proxy_url):
    """Set proxy for all HTTP requests (HTTP and SOCKS5 supported)."""
    global PROXY
    if proxy_url:
        PROXY = proxy_url
        logger.info(f"Proxy configured: {PROXY}")

The documented command-line interface explicitly permits proxy URLs containing authentication credentials:

bash
python3 scripts/search.py -q "keywords" --proxy http://user:pass@proxy:8080

Technical Analysis

The complete user-supplied proxy URL is written at INFO level without redacting its user-information component. When the URL contains embedded credentials, such as http://username:password@proxy.example:8080, both the username and password are exposed in process output.

Informational logs are commonly retained by agent runtimes, CI systems, terminal recording tools, container logging drivers, and centralized monitoring services. Consequently, parties that are not authorized to use the proxy may gain access to its credentials.

The proxy is legitimately needed only when explicitly selected by the user. Logging its credentials is not necessary for the Skill's web-search functionality and exceeds the minimum disclosure required for diagnostics.

Attack Path

  1. A user or automation system invokes the Skill with an authenticated proxy URL:
    bash
    python3 scripts/search.py -q "sensitive query" \
      --proxy "http://user:password@proxy.example:8080"
    
  2. main() passes the argument to set_proxy().
  3. set_proxy() assigns the complete URL to the global PROXY variable.
  4. The logger.info() call emits the full URL, including user:password.
  5. The output is captured in an agent transcript, terminal log, CI artifact, container log, or monitoring platform.
  6. Anyone w ...[truncated 834 chars]
Remediation
View remediation

Remediation Suggestions

  • Never log a complete proxy URL that may contain credentials.
  • Parse the URL and log only non-sensitive fields such as the scheme, hostname, and port.
  • Replace the current logging statement with a redacted representation, for example:
    python
    from urllib.parse import urlsplit
    
    def _redacted_proxy_url(proxy_url):
        parsed = urlsplit(proxy_url)
        host = parsed.hostname or ""
        port = f":{parsed.port}" if parsed.port else ""
        return f"{parsed.scheme}://{host}{port}"
    
    def set_proxy(proxy_url):
        global PROXY
        if proxy_url:
            PROXY = proxy_url
            logger.info("Proxy configured: %s", _redacted_proxy_url(proxy_url))
    
  • Prefer dedicated credential inputs or environment-backed secret injection over credentials embedded in command-line arguments, because command lines may also be visible through process inspection and shell history.
  • Ensure exception messages from the HTTP client cannot echo authenticated proxy URLs without redaction.
  • Add automated tests confirming that proxy usernames and passwords never appear in logs.
  • Rotate any proxy credentials that may already have been exposed through retained logs.

T08 · Insecure Dependencies

Note
Location
README.md:19
Finding

Unpinned Third-Party Dependencies Installed Without Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: README.md:19-22
Additional Locations: README.md:95, references/search-usage.md:8-11, references/search-usage.md:174
Vulnerability Type: Unpinned software supply-chain dependency
Risk Level: Low

Vulnerable Code

bash
pip install requests

Other project instructions similarly recommend mutable dependency resolution:

bash
pip install requests[socks]
bash
pip install requests beautifulsoup4

Technical Analysis

The installation instructions do not pin reviewed package versions or verify package hashes. Each installation can therefore resolve to a different future release from the configured Python package index.

Package installation and import both execute code supplied by the resolved distribution. If an upstream release, package-index account, dependency, or configured package source is compromised, users following these instructions could install attacker-controlled code with the privileges of the invoking account.

The package names observed are legitimate and there is no evidence of typosquatting, dependency confusion, or a malicious custom package source in this project. Therefore, this is a supply-chain hardening weakness rather than evidence of intentional malicious dependency use.

The documentation also recommends beautifulsoup4, although the audited implementation uses standard-library parsing and does not import that package. Installing an unnecessary dependency expands the supply-chain attack surface beyond the Skill's minimum functional requirements.

Attack Path

  1. A user follows the documented installation command.
  2. pip resolves the latest package release and its transitive dependencies from the user's configured index.
  3. A compromised, malicious, or unexpectedly modified release is selected because no reviewed version or hash is enforced.
  4. Package installation code executes under the user' ...[truncated 1011 chars]
Remediation
View remediation

Remediation Suggestions

  • Provide a reviewed dependency manifest or lock file with exact versions.
  • Require cryptographic hashes, for example through a hash-pinned requirements file:
    text
    requests==<reviewed-version> \
        --hash=sha256:<verified-distribution-hash>
    
  • Install with integrity enforcement:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  • Pin and hash all transitive dependencies, not only the direct requests dependency.
  • Remove beautifulsoup4 from the usage guide unless the implementation begins to require it.
  • Use a dedicated virtual environment and avoid installation with administrative privileges.
  • Document the expected trusted package index and warn against untrusted or dependency-confusion-prone index configurations.
  • Periodically review and update pinned versions after security testing rather than resolving mutable latest releases at installation time.
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 (35)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented purpose understates the actual behavior by omitting a urllib-based fallback and local file-management/output capabilities. This mismatch is dangerous because operators and users may approve a simple search skill without realizing it can write arbitrary files, manage cache state, and use additional network-fetch paths not clearly disclosed.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/search.py -q "keywords"

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The statement that the agent will 'automatically recognize search requests and invoke this skill' describes broad automatic activation without clear trigger boundaries, consent expectations, or exclusions for sensitive contexts. In practice, that can cause the agent to send user text to external search providers unexpectedly, including queries containing private, internal, or security-sensitive information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises executable behavior that implies network access and filesystem interaction, but it does not declare any tool scope or permissions boundaries. That makes the effective capability surface opaque to reviewers and increases the chance the agent can perform network requests, read cache state, or write files without explicit authorization controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description omits an explicit privacy warning that user queries are sent to third-party search engines and stored locally in cache. For a search skill, this materially affects user consent and data-handling expectations, especially when queries may contain sensitive or identifying information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list contains broad natural-language phrases that are likely to match ordinary conversation, causing the skill to activate unexpectedly. In this skill's context, accidental activation can leak user queries to external search engines and populate local cache without clear user intent.

Content

No source excerpt is available for this finding.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
91% confidence
Finding

Using 'search' as a trigger can shadow or conflict with a built-in search command, leading to command hijacking or unexpected routing to this skill. In practice, that may redirect user requests into a less constrained implementation with local caching and alternate network behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The usage guidance describes activation conditions in a vague, conversational way rather than as strict invocation rules. This increases the risk of unintentional execution, which is more concerning here because the skill performs network requests and local caching of user-provided search terms.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file uses only Chinese for all instructions and guidance, which can constitute a language/locale policy violation when no user opt-in or region-specific justification is provided. The policy for this audit requires flagging natural-language constraints that force a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documentation appears to force a specific language/locale for user-facing instructions, with no indication that other languages are available or that Chinese is an intentional region-specific requirement. Under the policy, natural-language content should not impose a language without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module terminates during import when requests is missing, which prevents search_web_fetch from ever serving as a no-requests fallback. This directly contradicts the later docstring that describes the urllib engine as a backup for when requests is unavailable.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The Accept-Language header forces a zh-CN preference, and the script's default interface text is also Chinese-centric. The policy allows locale constraints only when user choice or clear justification exists; here, locale preference is imposed by default rather than neutral or opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.