T09 · Insecure Skill Coding Practices
- Location
SKILL.md:78- Finding
Hardcoded Garmin Account Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Garmin sync skill handles private health data in ways that need careful review, including hardcoded credentials, broad browser-session reuse, privileged database writes, and git publication.
Install only if you fully control the Garmin account, browser profile, database paths, server, and git remotes. The embedded password should be treated as compromised and removed/rotated before use; the workflow should use a dedicated browser profile, explicit confirmations, allowlisted destinations, and avoid committing health databases to git history.
SKILL.md:78Hardcoded Garmin Account Credentials
SKILL.md:19Reuse of the User's General Authenticated Browser Profile
SKILL.md:138Automatic Publication of a Sensitive Health Database to Unspecified Git Remotes
scripts/sync_day.py:22Database Modification at Fixed Privileged Filesystem Locations
scripts/sync_day.py:42Database Synchronization Suppresses Failures and Reports Success
声明的核心能力是“抓取/同步 Garmin 数据”,重点包括浏览器自动化、访问 Garmin Connect、遇到 403 时利用已登录 Chrome 会话绕过限制,以及写入本地和服务器数据库。实际代码只是一个数据库写入脚本:从 sys.argv 接收值,构造 UPDATE 语句,写入两个 SQLite 文件中的 daily_summary 记录,并打印结果。它没有网络访问、没有浏览器控制、没有认证处理,也没有任何 Garmin 数据获取逻辑。虽然“写入本地和服务器数据库”这一部分与声明的一部分相符,但代码的主要行为只是同步链路中的末端写库步骤,无法支撑声明的主要用途,因此属于明显不匹配。
The skill contains hardcoded account credentials and automates login/MFA-adjacent flows, which can expose secrets to anyone with access to the skill file and enable unauthorized account use. It also encourages reuse of an existing authenticated browser session to bypass normal authentication friction, increasing the risk of account takeover, privacy violations, and abuse of a user's logged-in context.
The manifest presents the skill as a Garmin sync utility but the documentation includes additional publication behavior to git remotes, expanding data movement beyond what users may reasonably expect from the declared purpose. That hidden capability matters because the data involved is personal health information, so under-disclosure of outbound data flows increases privacy and trust risk.
The description lists activation phrases such as '同步佳明数据' and '同步今天的佳明数据' but does not define any exclusion conditions, required context, or negative examples. These phrases are generic enough in everyday assistant use that the skill could activate when a user is casually discussing Garmin data rather than explicitly requesting this automation workflow.
The description explicitly directs reuse of an already logged-in Chrome session to bypass OAuth restrictions, but does not warn about the security and privacy implications of operating inside a user's authenticated browser context. This is dangerous because browser-session reuse can access account data or perform actions under the user's identity without fresh authentication or meaningful consent.
The documented git commit/push to two remotes is unrelated to the minimum required act of reading Garmin data and broadens the skill's ability to exfiltrate or propagate sensitive database contents. Because the pushed artifact includes a health-data database, this creates a real confidentiality and integrity risk if triggered unexpectedly or pointed at the wrong repository/remotes.
The skill performs state-changing actions—database writes, server updates, and git pushes—without a clear up-front warning or explicit confirmation. In the context of personal health data, undisclosed modification and transmission can cause privacy breaches, unintended overwrites, and persistent propagation of sensitive information to external systems.
The document explicitly instructs reuse of a persistent logged-in browser session to access Garmin Connect without repeated verification, which can silently extend access to a user's authenticated account beyond an expected login flow. In the context of a data-sync skill handling health data, this increases the risk of unauthorized account access, session misuse, and privacy violations if the local browser profile or automation environment is shared or compromised.
The skill is designed to extract and store detailed health and activity information including heart rate, sleep, stress, body battery, activity history, and related metrics, yet the reference provides no user-facing notice, consent model, minimization guidance, or safeguards for sensitive personal data. Because this is health-adjacent personal data being written to local and server-side databases, the absence of transparency and handling controls materially increases privacy, compliance, and abuse risk.
The manifest describes a skill that uses browser automation or OAuth/session fallback to retrieve current Garmin health data, then syncs it to local and server databases. This file does not fetch data from Garmin at all; it only accepts precomputed values from command-line arguments and writes them into two SQLite databases, which is a materially narrower and different behavior than the claimed end-to-end sync workflow.
This code file contains user-facing natural-language text and comments exclusively in Chinese, including the module docstring and inline operational notes. Under the stated policy, forcing a specific language without user opt-in or a documented locale-specific justification is a natural-language policy violation.
The manifest description and the documented trigger phrases are entirely in Chinese, and the flow is tied to the China Garmin domain without stating that the skill is intentionally region-specific or offering language choice. Under the policy, forcing a specific language or locale without opt-in can be a natural-language policy issue.
The docstring says '写入当天 Garmin 数据到本地和服务器 DB', which suggests writing the day's Garmin data broadly. In practice, the script only consumes a fixed subset of metrics from command-line arguments and does not collect or handle other manifest-mentioned data such as sleep, stress, or body battery, so the documentation overstates what this code actually does.