T09 · Insecure Skill Coding Practices
- Location
scripts/export.py:259- Finding
Untrusted External Data Can Be Exported as Executable Spreadsheet Formulas
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it says, but its Excel export can place unvalidated external lottery data into spreadsheets, which users should review before installing.
Install only if you are comfortable with the skill contacting data.17500.cn and writing export files. Avoid opening generated XLSX files from untrusted or unexpected data without spreadsheet protections, and prefer txt/md/sqlite export if you do not need Excel output.
scripts/export.py:259Untrusted External Data Can Be Exported as Executable Spreadsheet Formulas
The supplied code is clearly related to lottery draw querying, so it partially matches the declared domain and supported lottery types. However, the declared description promises substantially more functionality than this code actually provides. The code only downloads plain-text historical draw data from 17500.cn, parses fields for several lottery formats, and exposes a command-line interface for fetching the latest N periods. There is no logic for querying a specific issue number, filtering by date range, exporting to any file formats, or generating recommended numbers based on historical analysis. Because these omitted features are central parts of the declared purpose rather than minor implementation details, the description does not accurately represent what this code chunk actually does.
The skill instructs the agent to perform network access and write files, but it does not declare any tool scope or permission boundaries. This creates an over-privileged or ambiguously privileged execution model where the host may allow broader capabilities than users expect, increasing the risk of unintended external requests or file writes.
The trigger words include very broad everyday terms such as '彩票' and '开奖', making accidental invocation more likely. In a skill that can access the network and write export files, unintended activation can cause unnecessary external requests, surprising outputs, or execution in conversations where the user did not intend to use this skill.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_raw(code, direction="desc", max_chars=None, n=None):
url_code = _API_TO_URL.get(code, code)
url = f"https://data.17500.cn/{url_code}_{direction}.txt"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"Accept": "text/plain, */*",
The file’s user-facing descriptions and formatting are written in Chinese, indicating the skill is designed to operate in a fixed locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.
This markdown file presents all instructions, labels, and examples only in Chinese, which can amount to a language/locale policy issue when no user opt-in or documented regional limitation is provided. The stated policy asks to flag cases where a skill forces a specific language without user choice.
This code file contains natural-language strings that force a specific language/locale for its documentation and CLI examples. Under the stated policy, language-specific behavior should not be imposed without offering the user a choice or clearly documenting a justified locale constraint.
The argument parser description, help text, and examples are all presented only in Chinese, and the script also prints status/error messages in Chinese. This enforces a single language for user interaction without opt-in or alternative locale support.
No suspicious patterns detected.