Back to skill

Security audit

CPAP PrismaAPP Log

Security checks for vulnerabilities and agentic risk

Overview

This CPAP logging skill is purpose-aligned, but it needs review because it stores a medical account password in plaintext and can send credentials to a configurable API origin.

Install only if you are comfortable storing PrismaAPP credentials locally and writing sensitive sleep therapy records into your Obsidian vault. Before use, remove or pin api_base to https://my.prismacloud.com, protect config.json carefully, add a real .gitignore entry for it, and avoid enabling cron until you have reviewed where notes will be written.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch-cpap.py:53
Finding

Configurable API Origin Can Receive PrismaAPP Credentials and Bearer Tokens

Content
View full analysis
str: resp = http_post_form(f"{api_base}/connect/token", { "grant_type": "password", "username": email, "password": password, "scope": "profile offline_access", "tenant": "patientapp", "client_id": "patient-app-client", }) return resp["access_token"] # ── API ──────────────────────────────────────────────────────────────────────── def get_dashboard(token: str, api_base: str) -> dict: return http_get(f"{api_base}/api/Dashboard", token) def get_week(token: str, date_in_week: str, api_base: str) -> list[dict]: data = http_get(f"{api_base}/api/Dashboard/week?dateInWeek={date_in_week}", token) ``` The destination is read directly from configuration and then used for authentication: ```python api_base = cfg.get("api_base", "https://my.prismacloud.com").rstrip("/") ``` ```python token = login(cfg["email"], cfg["password"], api_base) ``` Authenticated requests also transmit the resulting token: ```python def http_get(url: str, token: str) -> dict: req = urllib.request.Request(url, headers={"Authorization": f"Bearer {token}", "Accept": "application/json"}) with urllib.request.urlopen(req, timeout=15) as r: return json.loads(r.read()) ``` ### Technical Analysis The Skill's declared functionality requires network access to the PrismaAPP service. Sending credentials to the official authentication endpoint and using a bearer token to retrieve CPAP records are therefore functionally necessary. However, the implementation does not enforce that `api_base` is the documented official origin, `https://my.prismacloud.com`. It accepts any configured ...[truncated 2237 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch-cpap.py:224
Finding

Reusable PrismaAPP Password Is Stored in an Unprotected Plaintext Configuration File

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
| Endpoint | Description |
|----------|-------------|
| `POST /connect/token` | OAuth2 password grant → access token |
| `GET /api/Dashboard` | Returns `minDate` (first sync) and `serialNumber` |
| `GET /api/Dashboard/week?dateInWeek=YYYY-MM-DD` | Week data (7 days) |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill performs network access to a third-party medical API and writes files into a local Obsidian vault, but the manifest declares no explicit tool scope such as permissions or allowed-tools. That creates an overbroad trust boundary: an agent may execute the skill with capabilities the user cannot readily inspect or constrain, increasing the risk of unintended file modification or unauthorized outbound requests.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
## When Triggered

- User says: "CPAP log", "CPAP data", "write sleep therapy", "prisma log", "CPAP today/yesterday/[date]"
- Daily cron job fires (configurable)
- User requests a historical backfill

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This file defines all user-facing strings exclusively in Spanish, which indicates the skill can present output in a fixed language. Under the policy rule, forcing a specific language without user opt-in or a clearly documented locale-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This localization file defines all user-facing strings exclusively in French, which can contribute to a language/locale policy violation if the skill forces this locale without user opt-in. There is no natural-language indication in the file that French is optional, selectable, or restricted to a justified region-specific context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code logs into a medical-data service, retrieves therapy information, and persists it to the configured vault path. Although it prints progress messages, those messages do not warn that sensitive health information will be downloaded and stored locally, which is a safety-relevant disclosure gap for a code file handling personal health data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

In backfill mode, the script loads all available days and writes one markdown file per day into the user's vault. The status output reports progress, but it does not disclose up front that a potentially large amount of sensitive historical medical data will be imported into local storage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This localization file contains only German strings, which can reflect a language-specific behavior if used as the sole or forced output locale. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This localization file defines all user-visible strings in Italian, which suggests the skill may present content in a fixed language. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This localization file contains only Polish-language strings, which can represent a language-policy concern if the skill forces this locale without user selection. The file itself does not show any opt-in, fallback, or documentation that Polish is optional or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This localization file contains only Portuguese user-facing strings, and there is no natural-language indication in the file that the language is optional, selectable, or limited to a justified region-specific context. Under the policy, forcing a specific language without user opt-in can be a violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This locale file contains only Serbian-language strings for user-facing output, with no indication in the text that language selection is optional or user-driven. Per the policy, forcing a specific language without user opt-in can be a natural-language locale policy violation.

Content

No source excerpt is available for this finding.