Back to skill

Security audit

Garmin Connect CLI

Security checks for vulnerabilities and agentic risk

Overview

The skill is aligned with Garmin Connect CLI use, but it deserves review because it handles sensitive health data and account tokens with limited privacy and secret-handling warnings.

Review before installing if you are comfortable letting an agent operate an authenticated Garmin account. Avoid exporting tokens unless necessary, do not store exported credentials in plaintext, prefer interactive login over command-line MFA codes, and confirm before any upload, delete, schedule, or public course/event change.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:15
Finding
MFA Code Exposed Through Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 15 **Vulnerability Type**: Sensitive authentication data exposed in command-line arguments **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown - Headless: `gccli auth login you@example.com --headless` (with `--mfa-code <code>` for MFA) ``` ### Technical Analysis The documented headless authentication workflow instructs users to supply a sensitive MFA code through a command-line argument. Command-line arguments can be exposed through: - Shell history files. - Process inspection tools while the command is executing. - Terminal logging or session recording. - Diagnostic reports and command telemetry. - Accidental copying of complete commands into tickets, chat messages, or documentation. Although MFA codes are short-lived, they remain sensitive authentication material during their validity period. Passing the code as an argument provides weaker confidentiality than a masked interactive prompt, protected standard-input channel, or secure credential broker. The network communication with Garmin is consistent with the Skill's declared functionality. The issue is specifically the local handling of the MFA code, rather than the necessary transmission of authentication information to Garmin. ### Attack Path 1. A user follows the documented headless-login procedure and executes `gccli` with `--mfa-code` followed by a valid code. 2. The complete command is retained in shell history, captured by terminal logging, or temporarily made available through local process inspection. 3. A local user, monitoring process, telemetry collector, or party with access to the history file obtains the MFA code. 4. Before the code expires, the party attempts to use it in a compatible Garmin authentication flow for which the other required authentication conditions are available. 5. If accepted, the party may complete an authentication attempt and obtain access associated with the affected Garmin acc ...[truncated 914 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prefer a masked interactive prompt that reads the MFA code without displaying it or placing it in process arguments. 2. For headless environments, support reading the code from standard input or a protected file descriptor, for example: ```bash read -rsp "MFA code: " MFA_CODE printf '%s\n' "$MFA_CODE" | gccli auth login you@example.com --headless --mfa-code-stdin unset MFA_CODE ``` This example requires corresponding safe standard-input support from `gccli`; such support should be implemented upstream if it does not currently exist. 3. Avoid recommending environment variables as the primary replacement because they can also leak through process environments, diagnostics, or inherited child processes. 4. If command-line submission remains the only supported mechanism: - Clearly warn that the code may enter shell history and appear in process listings. - Recommend temporarily disabling history before the command and restoring it afterward. - Advise users not to run the command in recorded or shared terminal sessions. - Ensure the code is never included in logs or error messages. 5. Update the documentation to present the secure authentication mechanism as the default workflow rather than an optional precaution. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill provides broad access to highly sensitive health, wellness, and activity data including sleep, heart rate, blood pressure, menstrual cycle, pregnancy, and location/activity history, yet it does not include any privacy or handling warning. This can lead users or downstream agents to expose regulated or intimate personal data in logs, prompts, terminals, or shared environments without understanding the sensitivity.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly documents exporting and importing authentication credentials and even suggests piping them to a file or copying them to another machine, but it does not warn that these tokens are bearer credentials that may grant full account access. In a skill centered on personal fitness and health data, this omission increases the risk of accidental credential disclosure, token reuse on insecure hosts, or persistence in shell history and files.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Schedule workout: `gccli workouts schedule add <id> 2024-06-20`
- List scheduled workouts: `gccli workouts schedule list 2024-06-20`
- List scheduled workouts in range: `gccli workouts schedule list --start 2024-06-01 --end 2024-06-30`
- Remove scheduled workout: `gccli workouts schedule remove <schedule-id>` (use `--force` to skip confirmation)
- Delete workout: `gccli workouts delete <id>`
- Create running workout with pace: `gccli workouts create "Easy Run" --type run --step "warmup:5m" --step "run:20m@pace:5:00-5:30" --step "cooldown:5m"`
- Create workout with HR targets: `gccli workouts create "HR Run" --type run --step "warmup:10m" --step "run:20m@hr:140-160" --step "cooldown:10m"`
Confidence
85% confidence
Finding
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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Schedule workout: `gccli workouts schedule add <id> 2024-06-20`
- List scheduled workouts: `gccli workouts schedule list 2024-06-20`
- List scheduled workouts in range: `gccli workouts schedule list --start 2024-06-01 --end 2024-06-30`
- Remove scheduled workout: `gccli workouts schedule remove <schedule-id>` (use `--force` to skip confirmation)
- Delete workout: `gccli workouts delete <id>`
- Create running workout with pace: `gccli workouts create "Easy Run" --type run --step "warmup:5m" --step "run:20m@pace:5:00-5:30" --step "cooldown:5m"`
- Create workout with HR targets: `gccli workouts create "HR Run" --type run --step "warmup:10m" --step "run:20m@hr:140-160" --step "cooldown:10m"`
Confidence
85% confidence
Finding
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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Schedule workout: `gccli workouts schedule add <id> 2024-06-20`
- List scheduled workouts: `gccli workouts schedule list 2024-06-20`
- List scheduled workouts in range: `gccli workouts schedule list --start 2024-06-01 --end 2024-06-30`
- Remove scheduled workout: `gccli workouts schedule remove <schedule-id>` (use `--force` to skip confirmation)
- Delete workout: `gccli workouts delete <id>`
- Create running workout with pace: `gccli workouts create "Easy Run" --type run --step "warmup:5m" --step "run:20m@pace:5:00-5:30" --step "cooldown:5m"`
- Create workout with HR targets: `gccli workouts create "HR Run" --type run --step "warmup:10m" --step "run:20m@hr:140-160" --step "cooldown:10m"`
Confidence
85% confidence
Finding
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.

Static analysis

No suspicious patterns detected.