T09 · Insecure Skill Coding Practices
- Location
scripts/yandex_search.py:218- Finding
API Token Exposure Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a disclosed Yandex-search integration, but it has under-scoped authenticated API behavior that users should review before installing.
Install only if you are comfortable giving this skill a Dataify API token and letting it make authenticated requests to Dataify. Prefer `DATAIFY_API_TOKEN` over `--token`, avoid raw parameter overrides unless you understand the API fields, and review queries that could increase credit usage or change the target service behavior.
scripts/yandex_search.py:218API Token Exposure Through Command-Line Arguments
scripts/yandex_search.py:129Unrestricted Raw API Parameter Overrides
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urllib.request.urlopen(request) as response:
sys.stdout.buffer.write(response.read())
except urllib.error.HTTPError as exc:
sys.stdout.buffer.write(exc.read())
The skill invokes a local Python script, uses environment variables for authentication, and makes network requests, but it does not declare an explicit tool/permission scope. That mismatch can let the agent or reviewer underestimate the skill's capabilities, increasing the chance of unintended env access or outbound requests without proper governance.
L023 instructs the skill to return the script stdout directly and not parse, summarize, filter, or reformat the API response. Later, L100-L103 says the default behavior is to return a compact user-facing result and to return raw JSON or HTML only when explicitly requested. These directions actively contradict each other about the intended output behavior.
The preview table requires Chinese field labels (参数名, 当前值, 默认值, 说明) even though the rest of the skill is primarily in English and there is no opt-in for locale or language preference. This imposes a specific language presentation on users without documented justification or user choice.
The file is a localized skill document in Chinese and the description states the skill should be used when the user wants to search Yandex, but it does not offer any language choice or opt-in for responses. Under the policy, forcing a specific language or locale without user choice is a natural-language policy concern unless clearly documented as region-specific or optional.
L024 明确要求“将脚本的标准输出直接返回给用户,不要对 API 响应进行解析、总结、翻译、过滤、重新格式化或其他处理”。但 L098-L100 又要求默认返回精简后的标题、链接和字段,并仅在用户明确要求时才返回 raw JSON/HTML,这与前述“直接返回原始输出”的操作指令直接冲突。
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Account CTA policy
- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Account CTA policy
- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.
- For an invalid token, direct the user to API-key management without implying that a new registration is required. For insufficient credits, direct the user to balance or recharge management.
- During normal submission, processing, and successful completion, do not promote registration or the Dashboard. Never expose the token or include it in CTA attribution parameters.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
- Show a prominent Dataify account CTA only when the API token is missing, rejected/invalid, or the account has insufficient credits.
- For a missing token, offer https://dashboard.dataify.com/login?utm_source=skill and state: New accounts receive 50 free credits. Never ask the user to paste the token into chat.
- Detect the current operating system and shell. Show only the matching session-scoped setup command first (`export` for macOS/Linux shells, `$env:` for Windows PowerShell, or `set` for Windows Command Prompt). Show other platforms or persistent setup only when detection is ambiguous or the user asks.
- After the user says the token is configured, verify only whether `DATAIFY_API_TOKEN` is present; never print its value. If verification succeeds, continue the original task without asking the user to repeat it.
- Explain that persistent shell changes may require a new terminal or restarting the agent application. Do not recommend a project `.env` unless the execution path explicitly loads it, and ensure `.env` is ignored by version control.
- For an invalid token, direct the user to API-key management without implying that a new registration is required. For insufficient credits, direct the user to balance or recharge management.
- During normal submission, processing, and successful completion, do not promote registration or the Dashboard. Never expose the token or include it in CTA attribution parameters.
The instruction requires the pre-call field table to use the specific labels 参数名, 当前值, 默认值, and 说明, which forces a particular language/locale in user-facing output. This is a natural-language policy violation because no user choice or opt-in is offered for the language constraint.
This code file contains user-facing natural-language strings such as parameter descriptions and preview-table labels in Chinese, while other CLI help text is in English. That creates a mixed-language experience and effectively forces one locale for part of the interaction without user opt-in.
No suspicious patterns detected.