Back to skill

Security audit

garmin-panorama-training-analysis

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it handles Garmin credentials, health data, and precise locations in ways users should review carefully before installing.

Install only if you are comfortable giving this skill access to Garmin credentials and detailed health, sleep, recovery, and GPS activity history. Before use, remove the sibling-skill .env fallbacks, prefer environment variables or this skill's own credential file, consider disabling or coarsening Open-Meteo weather lookups, protect or delete generated data/ reports, and use an isolated pinned Python environment.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/garmin_client.py:34
Finding

Automatic Access to Credentials Stored by Unrelated Skills

Content
View full analysis
str: if not path.exists(): return "" try: for line in path.read_text(encoding="utf-8").splitlines(): line = line.strip() if line.startswith(key + "="): return line.split("=", 1)[1].strip().strip('"').strip("'") except Exception: pass return "" def _env_or_envfile(key: str) -> str: val = os.environ.get(key, "").strip() if val: return val for path in [ENV_FILE] + FALLBACK_ENV_FILES: val = _read_env_file(path, key) if val: return val return "" ``` ### Technical Analysis The Skill automatically probes `.env` files belonging to two unrelated installed Skills and extracts `GARMIN_EMAIL`, `GARMIN_PASSWORD`, and `GARMIN_IS_CN`. This crosses the logical trust boundary between Skills. Garmin authentication is necessary for the declared functionality, but reading secret files owned by other Skills is not necessary. Credentials could instead be supplied through process environment variables, this Skill's own configuration file, an OS credential manager, or an explicitly selected credential file. The implementation does not require explicit consent before accessing the sibling files. It also does not validate file ownership, symbolic links, or restrictive file permissions. A maliciously prepared path or compromised sibling Skill could therefore influence the credentials used by this Skill. ### Attack Path 1. A user installs this Skill alongside one of the named fallback Skills. 2. The user stores Garmin ...[truncated 1092 chars]
Remediation
View remediation

other

Warning
Location
scripts/fetch_data.py:119
Finding

Precise Activity Locations and Times Are Disclosed to Open-Meteo

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/generate_report.py:680
Finding

Generated Report Makes an Inaccurate Third-Party Upload Claim

Content
View full analysis
Data source: Garmin Connect + Open-Meteo.
Pace calculations use moving duration.
Generated at {meta['fetched_at']} · The report is stored locally and no data was uploaded to a third party. ``` The source file renders the equivalent assertion while the fetch pipeline sends coordinates and dates to Open-Meteo through `httpx.get()`. ### Technical Analysis It is accurate that the resulting HTML report is written locally. It is not accurate to state that no data was uploaded to a third party. During data collection, the Skill sends activity-derived latitude, longitude, date, and time context to Open-Meteo. The footer mentions Open-Meteo as a data source but does not state that user-derived location and temporal data are transmitted to that service. The affirmative claim that no data was uploaded can therefore cause users to misunderstand the actual data flow. This is particularly significant because the report contains a visible privacy indicator suggesting local-only handling. ### Attack Path 1. A user runs the fetch process expecting local-only handling. 2. The fetch process sends activity coordinates and dates to Open-Meteo. 3. The report generator creates an HTML file containing a no-third-party-upload assurance. 4. The user relies on that assurance when storing, sharing, or continuing to use the Skill. 5. The user is deprived of an informed opportunity to disable or limit the location disclosure. ### Impact Assessment This issue does not independently grant system privileges. Its impact is loss of informed consent and inaccurate privacy expectations concerning sensitive location data. The misleading statement can also increase organizational compliance risk where health or location data must not ...[truncated 73 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_data.py:505
Finding

Sensitive Health and GPS Records Are Persisted in Plaintext with Excessive Raw Data

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:24
Finding

Dependency Installation Instructions Use Unlocked Packages

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (44)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · .gitignore (reported line 2)May include surrounding context.

text
# 凭据(永远不要提交)
.env
*.env

# Garmin OAuth token 缓存

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · .gitignore (reported line 3)May include surrounding context.

text
# 凭据(永远不要提交)
.env
*.env

# Garmin OAuth token 缓存

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 154)May include surrounding context.

md
├── LICENSE                        MIT
├── config.example.json            配置模板(入库)
├── config.json                    个人档案(**不入库**)
├── .env                           凭据(**不入库**)
├── .garth/                        token 缓存(**不入库**)
├── scripts/
│   ├── garmin_client.py           凭据解析 + 登录 + 限流重试

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a full-featured Garmin training analytics workflow. However, the provided code chunk contains only what appears to be a bundled Chart.js library placeholder/source map reference. That is merely a generic supporting visualization dependency, not evidence of the described end-user functionality. Since the actual supplied code does not demonstrate the primary declared purpose or capabilities, the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

该代码块的实际用途是一个狭义的“热适应评价”辅助模块,主要负责热环境相关指标和跨日适应信号计算,属于声明中“热适应评价”能力的一小部分实现。但声明描述的是一个覆盖 Garmin 数据抓取、负荷恢复分析、天气融合和完整 HTML 报告生成的全景训练分析技能。两者在主要目的和实现范围上明显不一致。此外,代码注释明确写的是“COROS 训练 + Open-Meteo 天气”,与声明中的 Garmin Connect 来源也不一致。虽然热适应是声明功能的一部分,但仅凭该代码块无法支持整体声明,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

md
$PY scripts/generate_report.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 53)May include surrounding context.

md
$PY scripts/generate_report.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 67)May include surrounding context.

md
$PY scripts/generate_report.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 328)May include surrounding context.

md
$PY scripts/generate_report.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 371)May include surrounding context.

md
`assets/chart.umd.min.js`(Chart.js 4.4.4,205 KB)在生成时内联进 HTML,

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The skill documents direct use of a local .env file for Garmin credentials and a .garth token cache, plus auto-discovery of reusable credentials from other installed skills. This is dangerous because it normalizes credential harvesting across skill directories and expands the blast radius of a compromise: one skill can access secrets intended for another, and cached tokens may enable account access without re-authentication.

Content

Scanner excerpt · SKILL.md (reported line 476)May include surrounding context.

md
├── SKILL.md                       本文件
├── README.md                      人类可读说明
├── config.json                    运动员档案 / 目标 / 坐标
├── .env                           凭据(不入库)
├── .garth/                        token 缓存(不入库)
├── scripts/
│   ├── garmin_client.py           凭据解析 + 登录 + safe_call 限流重试

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The documented credential source order includes reading secrets from other installed skills for 'zero-config reuse,' which is an explicit credential access capability beyond what is necessary for this skill's stated purpose. In this context, the skill analyzes Garmin data; it does not need to harvest or silently inherit secrets from sibling skills to function safely.

Content

Scanner excerpt · scripts/garmin_client.py (reported line 10)May include surrounding context.

python
凭据来源优先级:
  1. 环境变量 GARMIN_EMAIL / GARMIN_PASSWORD / GARMIN_IS_CN
  2. 本 skill 根目录的 .env
  3. 已安装的其他 skill 的 .env(如 run-coach__skillhub,自动发现,零配置复用)

token 缓存目录:本 skill 根目录的 .garth(与 run-coach 相互独立,互不覆盖)。

Credential Access

High
Category
Privilege Escalation
Confidence
78% confidence
Finding

This line defines the local .env path and is not dangerous by itself, but within the broader module it is part of a secret-loading mechanism that handles plaintext credentials. The actual security concern is the surrounding design that reads .env secrets, especially from external skill directories.

Content

Scanner excerpt · scripts/garmin_client.py (reported line 31)May include surrounding context.

python
SKILL_ROOT = Path(__file__).resolve().parent.parent
GARTH_HOME = str(SKILL_ROOT / ".garth")
ENV_FILE = SKILL_ROOT / ".env"

# 自动发现的其他 .env 位置(按优先级)
FALLBACK_ENV_FILES = [

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

This section introduces a list of fallback .env locations in other skill directories, enabling direct access to credentials outside this skill's boundary. That is a concrete secret-discovery behavior and materially increases the chance of unauthorized credential use if the skill is installed or modified maliciously later.

Content

Scanner excerpt · scripts/garmin_client.py (reported line 33)May include surrounding context.

python
GARTH_HOME = str(SKILL_ROOT / ".garth")
ENV_FILE = SKILL_ROOT / ".env"

# 自动发现的其他 .env 位置(按优先级)
FALLBACK_ENV_FILES = [
    Path.home() / ".workbuddy" / "skills" / "run-coach__skillhub" / ".env",
    Path.home() / ".workbuddy" / "skills" / "coros-mcp-energy-lab__skillhub" / ".env",

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

This hard-coded path targets another installed skill's .env file for credential extraction. Such cross-directory secret access is unnecessary for ordinary Garmin report generation and meaningfully increases exposure of stored credentials.

Content

Scanner excerpt · scripts/garmin_client.py (reported line 35)May include surrounding context.

python
# 自动发现的其他 .env 位置(按优先级)
FALLBACK_ENV_FILES = [
    Path.home() / ".workbuddy" / "skills" / "run-coach__skillhub" / ".env",
    Path.home() / ".workbuddy" / "skills" / "coros-mcp-energy-lab__skillhub" / ".env",
]

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

This line adds a second sibling skill .env file as a credential source, reinforcing a pattern of unauthorized cross-skill secret harvesting. The repeated fallback logic shows this is deliberate design rather than incidental behavior.

Content

Scanner excerpt · scripts/garmin_client.py (reported line 36)May include surrounding context.

python
# 自动发现的其他 .env 位置(按优先级)
FALLBACK_ENV_FILES = [
    Path.home() / ".workbuddy" / "skills" / "run-coach__skillhub" / ".env",
    Path.home() / ".workbuddy" / "skills" / "coros-mcp-energy-lab__skillhub" / ".env",
]

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The natural-language instructions are entirely in Chinese, and the file does not indicate that the skill is China-specific only or that users may choose another language. Under the policy, forcing a specific language without opt-in can be a locale/language policy violation unless the restriction is documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README explicitly describes collecting, normalizing, and storing highly sensitive fitness and health data such as HRV, resting heart rate, sleep, Body Battery, GPS-linked workouts, and recovery metrics, but does not present a clear privacy warning, retention policy, or handling guidance at the point of collection. In this skill context, the generated JSON/HTML outputs and local caches materially increase privacy risk because they may expose health inferences and location history if the workstation, skill directory, or backups are accessed by others.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill describes capabilities that involve environment-variable access, reading/writing local files, network access, and shell execution, but it does not declare any explicit tool scope or permission boundaries. This creates an over-privileged integration risk: an agent may invoke the skill with broader access than users expect, including access to credentials, cached tokens, and generated reports containing sensitive health data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough that the skill may activate on generic fitness-analysis requests, causing unnecessary access to Garmin credentials and personal health/training data. In a privacy-sensitive skill, over-broad invocation increases the chance of unintended data collection or report generation beyond what the user explicitly requested.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly uses Garmin credentials and collects sensitive personal health/training information including HRV, sleep, readiness, body battery, and location-linked activities, but it does not present a clear user-facing privacy warning or consent model. This is dangerous because users may not realize the full scope of personal and potentially regulated data being accessed, cached, and written into local JSON/HTML outputs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The 'When to Use' guidance includes broad activation conditions such as any request involving Garmin data retrieval and visualization, which can cause the skill to be selected in ambiguous situations. Because the skill processes highly sensitive health, location, and training data, ambiguous routing materially increases privacy and least-privilege risk.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
75% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · assets/chart.umd.min.js (reported line 19)May include surrounding context.

js
* https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function _t(t){return t+.5|0}const yt=(t,e,i)=>Math.max(Math.min(t,i),e);function vt(t){return yt(_t(2.55*t),0,255)}function Mt(t){return yt(_t(255*t),0,255)}function wt(t){return yt(_t(t/2.55)/100,0,1)}function kt(t){return yt(_t(100*t),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Pt=[..."0123456789ABCDEF"],Dt=t=>Pt[15&t],Ct=t=>Pt[(240&t)>>4]+Pt[15&t],Ot=t=>(240&t)>>4==(15&t);function At(t){var e=(t=>Ot(t.r)&&Ot(t.g)&&Ot(t.b)&&Ot(t.a))(t)?Dt:Ct;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Tt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Et(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Rt(t,e,i){const s=Lt(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function It(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,h,n),r=60*r+.5),[0|r,l||0,a]}function zt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(Mt)}function Ft(t,e,i){return zt(Lt,t,e,i)}function Vt(t){return(t%360+360)%360}function Bt(t){const e=Tt.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?vt(+e[5]):Mt(+e[5]));const n=Vt(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return zt(Rt,t,e,i)}(n,o,a):"hsv"===e[1]?function(t,e,i){return zt(Et,t,e,i)}(n,o,a):Ft(n,o,a),{r:i[0],g:i[1],b:i[2],a:s}}const Wt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg"
...[truncated 28 chars]

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains natural-language documentation and user-facing strings entirely in Chinese, including the module docstring and training advice text. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the regional constraint is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language documentation and output labels entirely in Chinese, and exported helpers such as status_zh, load_balance_zh, and readiness_label return Chinese-only text. Under the policy rule, forcing a specific language without offering a locale choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.