T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/web_server.py:22- Finding
Unauthenticated Network Exposure of Calendar Data and Event Creation API
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This personal scheduler is not clearly malicious, but it exposes private calendar data and event creation through an unauthenticated network-accessible debug web server.
Install only if you are prepared to treat it as local experimental software: bind the Web server to 127.0.0.1, disable Flask debug mode, add authentication before storing real calendar details, remove the hard-coded Feishu ID, and add confirmation for deletes or updates.
scripts/web_server.py:22Unauthenticated Network Exposure of Calendar Data and Event Creation API
scripts/web_server.py:48Flask Debugger Exposed on All Network Interfaces
web/index.html:663Stored Cross-Site Scripting Through Event Titles and Locations
SKILL.md:83Unpinned Flask Dependency Produces a Non-Reproducible Installation
该代码与“个人日程管理”中的一部分能力相符,尤其是“自动提醒”。它负责把日程提醒转换为定时任务并保存到本地配置,属于提醒调度的支撑实现。但声明中列出的多项核心能力——自然语言设置、重复日程、Web界面、导入导出——在此代码片段中均未体现。代码的实际行为更窄,主要是本地 cron/提醒任务管理,而不是完整的个人日程管理功能。因此描述对该代码能力有明显过度表述,构成描述与行为不一致。
该代码的核心目的仍属于个人日程管理并带有自动提醒,这与描述的主体方向基本一致;但声明中的多项关键功能并未在提供代码中体现,尤其是自然语言设置、重复日程、Web界面、导入导出。repeat_rule 虽出现在方法签名中,但没有被持久化、解析或用于生成重复事件,因此不能算已实现。另一方面,代码实际保存 feishu_user_id,并在提醒任务中携带该字段,表明存在面向飞书用户的提醒集成倾向,这属于描述中未提及的外部服务相关能力。综合看,描述与代码存在明显不一致,应判定为 mismatch。
The skill declares executable capabilities such as Python, local file storage, backup creation, and shell-invoked scripts, but does not declare any tool scope or allowed permissions. This weakens review boundaries and can let a seemingly simple scheduling skill access files or execute commands beyond what a user would reasonably expect.
The skill advertises natural-language deletion of calendar entries without any mention of confirmation, preview, or disambiguation safeguards. In a scheduler context, ambiguous language or accidental invocation can cause unintended loss of appointments, reminders, or recurring events, which may materially disrupt a user's obligations.
The config sets the timezone to "Asia/Shanghai", which imposes a specific locale setting in a natural-language relevant way. Under the policy, locale constraints should either be user-selectable or clearly documented as justified for a region-specific skill.
This code performs a file export of potentially sensitive calendar content, including titles, locations, and descriptions, but the function docstring only describes the output path and does not warn that personal schedule data will be persisted in plain .ics form. There is a success print in the CLI, but no prior disclosure in the function comments/docstring for callers using the class directly.
The docstring at L085-L091 says the method imports schedules from .ics files, and the module docstring at L003-L005 states support for .ics format. However, the parser normalizes keys by stripping parameters at L117-L119, so values like DTSTART;VALUE=DATE are stored as DTSTART, while later logic checks for DTSTART;VALUE=DATE at L131-L138. This means documented all-day .ics support is contradicted by the actual implementation.
The import operation writes parsed events into the scheduler database, which changes user data, but the docstring only states that it imports events and returns a count. Although the CLI prints the number imported afterward, there is no up-front disclosure or confirmation that the database will be modified.
Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.
if len(end_str) == 15:
end_time = datetime.strptime(end_str, '%Y%m%dT%H%M%S')
else:
end_time = start_time + __import__('datetime').timedelta(hours=1)
is_all_day = False
The natural-language strings in the module docstrings and all user-facing output are exclusively in Chinese, including operational status messages and reminder content. This appears to impose a specific language/locale on users without any visible opt-in or documented locale constraint, which matches the policy-violation criterion for language or locale restrictions.
When provided, the Feishu user ID is appended to the command string and then persisted into the cron_jobs.json file as part of the saved job definition. This is handling user-related data, but the file contains no user-facing notice that such identifiers will be stored locally for later task execution.
This code creates and updates a local cron configuration file that persists reminder jobs, and the paired deletion flow later removes entries from that file. Although there are internal comments and docstrings for developers, there is no explicit user-facing warning, confirmation, or disclosure near these data-modifying operations to inform the user that reminder tasks are being stored and changed locally.
The module description, command help, and examples are entirely in Chinese, and the skill presents itself as a natural-language interface without indicating language options or user opt-in. This can violate language/locale policy requirements because the skill implicitly constrains interaction to a specific language.
The manifest describes a personal scheduling skill with natural-language scheduling, reminders, recurring events, web UI, and import/export. Spawning a subprocess to run another script is not an obvious or necessary capability for that purpose from the stated intent, and expands execution capability beyond ordinary schedule management logic.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f" - {job['event_title']}: {job['reminder_time']}")
# 执行发送
import subprocess
subprocess.run(['python', 'send_reminder.py', job['event_id']])
else:
print("没有待发送的提醒")
The skill deletes a matched schedule entry immediately once a single match is found, without confirmation or undo capability. In a natural-language scheduler, ambiguous parsing or unintended invocations can cause irreversible data loss, making this a real integrity issue even if not a classic exploit primitive.
This code file contains natural-language documentation saying the skill converts Chinese natural language to schedule data, which implies a fixed language constraint. Under the policy, forcing a specific language without user opt-in or documented justification is a violation.
The module description and user-facing strings present the skill as a Chinese-language personal scheduler, and the configuration also fixes the timezone to Asia/Shanghai by default. Under the policy, forcing a specific language or locale without user choice can be a natural-language policy violation unless clearly justified or offered as an option.
The code embeds and persists a specific Feishu user identifier as a default configuration value, creating an undeclared external messaging integration and exposing a real platform identifier in source. This can lead to privacy issues, misdirected reminders, and unauthorized linkage of user scheduling data to a third-party messaging account if deployed as-is.
This code saves scheduler configuration to config.json, including a Feishu user identifier, but provides no confirmation prompt, print/log message, or warning comment beyond an internal docstring. For a code file, persistent file writes involving user-related data should have some visible disclosure unless already clearly communicated elsewhere in markdown, which is not available in this file.
The code writes event details to a SQLite database and later writes reminder job metadata to reminder_jobs.json, but there is no visible disclosure to the user that calendar content and reminder metadata will be persisted locally. This is safety-relevant because it affects user data storage and later deletion behavior, yet the file contains no prompt, logging, or warning text for these operations.
The stated purpose supports storing events and reminders, but this code additionally prepares OS-level command execution metadata (python .../send_reminder.py) for later use. Building executable commands is a broader orchestration capability than simple schedule management and is not declared in the manifest.
This code file contains natural-language strings such as the module description, error messages, and CLI usage entirely in Chinese. Under the policy rule, forcing a specific language without offering the user a language or locale choice is a natural-language policy violation.
The module docstring and startup messages are written only in Chinese, which imposes a specific language on users without offering a locale choice. Under the policy, language constraints should be opt-in or clearly justified as region-specific.
This code file exposes a POST endpoint that creates calendar events, which is a user-data write operation. While the function has an internal docstring, there is no confirmation, user-facing notice, or broader warning in this file that the request will persist changes to the user's schedule.