Back to skill

Security audit

Strava Api

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims for Strava, but it handles OAuth tokens and private fitness data with weak local-file protections that deserve review before installation.

Review before installing if you use Strava data you consider private. Use a private token path, restrict file permissions, avoid writing activity exports to shared /tmp paths, and revoke/rotate Strava credentials if token files are exposed.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/strava_oauth_login.py:224
Finding

OAuth Authorization Flow Does Not Validate the State Parameter

Content
View full analysis
")) tok = exchange_code_for_token( code=code, client_id=client_id, client_secret=client_secret ) ``` ### Technical Analysis The OAuth authorization request does not contain a cryptographically random `state` parameter. Correspondingly, neither the copy-and-paste flow nor the loopback callback verifies that an incoming authorization response belongs to the authorization transaction initiated by the script. OAuth `state` is used to bind the authorization response to the initiating client session and prevent login CSRF or authorization-response substitution. The script accepts any authorization code supplied through standard input or received as the first valid loopback callback. The token exchange still occurs against Strava's fixed HTTPS token endpoint, so this is not arbitrary credential exfiltration. The weakness instead concerns the identity and authorization transaction associated with the accepted code. ### Attack Path 1. An attacker initiates or influences a separate Strava authorization flow using the same registered client and redirect URI. 2. The attacker o ...[truncated 972 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/strava_oauth_login.py:44
Finding

OAuth Tokens Are Written Before Restrictive File Permissions Are Applied

Content
View full analysis
str: p = path or token_path() _mkdirp(p) tmp = p + ".tmp" with open(tmp, "w", encoding="utf-8") as f: json.dump(tok, f, indent=2, sort_keys=True) f.write("\n") os.replace(tmp, p) try: os.chmod(p, 0o600) except PermissionError: pass return p ``` ### Technical Analysis The temporary token file is created using Python's ordinary `open(..., "w")`. Its initial permissions therefore depend on the process umask. Under a common `022` umask, a newly created file can initially be mode `0644`. The code applies mode `0600` only after the sensitive token contents have been written and the temporary file has been moved into place. The temporary filename is also predictable because it is always the configured token path followed by `.tmp`. Ordinary `open()` follows symbolic links and does not request exclusive creation. If the configured parent directory is writable by another local user, an attacker may pre-create the temporary path as a symbolic link or monitor it while credentials are being written. The stored JSON can include an access token and a long-lived refresh token. The post-write `chmod` reduces continuing exposure but does not eliminate the initial permission window, symlink risk, or the possibility that `chmod` fails and is silently ignored. ### Attack Path 1. The Skill runs with a permissive umask or uses a token directory accessible or writable by another local user. 2. A local attacker monitors the predictable `.tmp` filename or pre-creates it as a symbolic link. 3. The script opens the path and writes the OAuth token response before applying restrictive permissions. 4. Th ...[truncated 669 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/strava_fetch_activities.py:188
Finding

Normalized Health Data Is Written to an Insecure Caller-Supplied Path

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill invokes scripts that use environment variables, local file storage, network access, and shell execution, but it does not declare any explicit tool or permission scope. In an agent environment, missing scope declarations can lead to overbroad execution privileges and make it harder to enforce least-privilege controls around OAuth flows, token handling, and file writes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill documents OAuth client secrets, redirect URI configuration, and token persistence behavior without any guidance on secure secret handling or protection of stored tokens. Access and refresh tokens for a fitness account can enable long-lived unauthorized access to personal activity data if exposed through misconfigured files, shell history, screenshots, or shared environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs users to export Strava activity data to /tmp/strava_today.json without warning that workout history can contain sensitive personal information such as timestamps, routes, and behavioral patterns. Writing this data to a shared or weakly protected local path increases the risk of unintended disclosure to other local users, processes, backups, or logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This code writes structured Strava activity data, including workout timing and health-related metrics, to the path supplied by --out. Although the module docstring mentions writing raw JSON, there is no runtime disclosure, confirmation, or visible warning at the point of file creation that user activity data will be stored locally.

Content

No source excerpt is available for this finding.