Back to skill

Security audit

216medsearch

Security checks for vulnerabilities and agentic risk

Overview

This medication lookup skill matches its stated purpose, but needs review because it ships a reusable internal API token and sends medication queries over plaintext HTTP.

Only install this in an environment authorized to use the internal medication API. Treat the embedded token as exposed, rotate it, prefer a runtime secret and HTTPS endpoint, and avoid submitting sensitive patient-specific medication information until the data handling and logging boundaries are documented.

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
tool.sh:12
Finding

Hardcoded API Credential Transmitted Over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
tool.sh:10
Finding

User Input Embedded Directly in API Query Expression and Form Body

Content
View full analysis
' ``` Shell quoting does not protect the downstream query language. The single quotes shown above are ordinary characters stored inside `CONDITION`, so a medicine name containing a quote or query-language operators can change the syntax presented to the API. The resulting value is then assembled manually as an `application/x-www-form-urlencoded` body. `curl -d` does not automatically percent-encode embedded form delimiters as part of one parameter value. Consequently, input containing characters such as `&`, `=`, `+`, `%`, or line breaks may change how the receiving server parses the body. For example, an ampersand can terminate the intended `condition` parameter and introduce another form parameter. Successful query-language exploitation depends on the undocumented server-side grammar and authorization controls. Nevertheless, the client-side construction is unsafe because it crosses both the query-language and form-encoding boundaries without validation or context-appropriate escaping. This is not a local shell-command injection in the reviewed code: variable expansions passed to `curl` are double-quoted, and t ...[truncated 1680 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script silently uses a hardcoded authentication token in an outbound request, meaning users may invoke privileged access to an internal service without realizing a sensitive credential is being exercised. If the script is shared, inspected, or logged, the token can be extracted and abused to query the service outside the intended workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README explicitly states that drug-name queries are sent to an internal HTTP API and that the API token is embedded in the script, but it gives no user-facing notice about network transmission, privacy, or credential handling. Even though the queried data may seem low sensitivity, medication-related queries can reveal health-related interests or operationally sensitive internal usage patterns, and use of plain HTTP increases the risk of interception on internal networks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill sends user-supplied medication queries to an internal HTTP service and explicitly states that an API token is built in, but it does not disclose the privacy, network-boundary, or credential-use implications to users. This creates a real data-handling and transparency issue: user inputs may be transmitted to an internal system over cleartext HTTP, and the hidden token model can mask backend access risks or misuse if the skill is repurposed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script embeds a bearer-like API token directly in the source, giving anyone with access to the file the ability to reuse that credential against the internal medication query service. Because this is an otherwise simple lookup utility, the hardcoded secret is unnecessary exposure and can enable unauthorized access, token leakage through code sharing, backups, logs, or repository history.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · tool.sh (reported line 22)May include surrounding context.

sh
PROP_NAMES="name"

# 调用 API
RESPONSE=$(curl -s -X 'POST' "${API_URL}" \
    -H 'accept: application/json' \
    -H "token: ${API_TOKEN}" \
    -H 'Content-Type: application/x-www-form-urlencoded' \

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

All user-facing instructions and descriptions in the file are presented only in Chinese, with no note that the skill is Chinese-language only or any option for users to choose another language. This can conflict with language/locale policy expectations when a skill implicitly forces a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language instructions and usage details are presented only in Chinese, which can amount to a language policy violation if users are not given an explicit language or locale option. There is no indication that the skill is intentionally restricted to a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The top comment describes the skill narrowly as querying a medication generic name, which implies a simple lookup. In practice, the script constructs a fuzzy search condition, sends it to a remote internal endpoint with an auth token, and prints the full formatted API response rather than specifically extracting or returning only the generic name.

Content

No source excerpt is available for this finding.