T09 · Insecure Skill Coding Practices
- Location
SKILL.md:114- Finding
Plaintext Note Transmission and Unsafe Bearer Token Handling Contradict the Zero-Knowledge Security Model
- Content
View full analysis
."; // supplied by user const BASE = "https://privypad.com/api/v1"; async function privypad(method, path, body) { const res = await fetch(`${BASE}${path}`, { method, headers: { "Authorization": `Bearer ${PRIVYPAD_TOKEN}`, "Content-Type": "application/json", }, body: body ? JSON.stringify(body) : undefined, }); if (!res.ok) throw new Error(`PrivyPad ${res.status}: ${await res.text()}`); return res.json(); } // Examples const notes = await privypad("GET", "/notes?pinned=true"); const note = await privypad("GET", `/notes/${id}`); const created = await privypad("POST", "/notes", { title: "Hello", content: "World" }); const updated = await privypad("PATCH", `/notes/${id}`, { isPinned: true }); await privypad("DELETE", `/notes/${id}`); const groups = await privypad("GET", "/groups"); ``` Python example at lines 146–153: ```python TOKEN = "pp_." # supplied by user BASE = "https://privypad.com/api/v1" HEADERS = {"Authorization": f"Bearer {TOKEN}"} def privypad(method, path, **kwargs): r = httpx.request(method, BASE + path, headers=HEADERS, **kwargs) r.raise_for_status() return r.json() # Examples notes = privypad("GET", "/notes", params={"group": "Work"}) created = privypad("POST", "/notes", json={"title": "Hi", "content": "There"}) updated = privypad("PATCH", f"/notes/{note_id}", json={"isPinned": True}) privypad("DELETE", f"/notes/{note_id}?permanent=true") groups = privypad("GET", "/groups") ``` Conflicting zero-knowledge claim at lines 164–166: ```text - **Zero-knowledge**: The server stores notes encrypted. The ...[truncated 3328 chars]- Remediation
View remediation
