T09 · Insecure Skill Coding Practices
- Location
app_v2.py:2856- Finding
Unauthenticated Localhost APIs Exposed Through Wildcard CORS
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent local second-brain app, but its local APIs and model configuration expose personal memory and prompts too broadly for automatic approval.
Install only if you are comfortable reviewing and hardening the local server first. At minimum, require an auth token, remove wildcard CORS, restrict allowed model provider URLs, avoid setting cloud API keys until you understand what text may be sent, and do not run it while browsing untrusted websites.
app_v2.py:2856Unauthenticated Localhost APIs Exposed Through Wildcard CORS
app_v2.py:298User-Controlled Model Base URL Enables SSRF and Disclosure of Prompts and Activated Memory
User messages and activated memory context are sent to external LLM providers using URLs and credentials drawn from configuration. In a skill marketed as a local personal cognitive system, this creates a clear confidentiality risk because sensitive conversations and recalled memory can leave the host without meaningful in-band disclosure or consent enforcement.
if api_key and not is_ollama:
headers["Authorization"] = f"Bearer {api_key}"
req = urlrequest.Request(url, data=data, headers=headers, method="POST")
with urlrequest.urlopen(req, timeout=120) as resp:
payload = json.loads(resp.read().decode("utf-8", errors="replace"))
reply = ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
base = _ollama_base_url()
try:
req = urlrequest.Request(f"{base}/api/tags", method="GET")
with urlrequest.urlopen(req, timeout=3) as resp:
payload = json.loads(resp.read().decode("utf-8", errors="replace"))
except Exception:
return []
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
base = _ollama_base_url()
try:
req = urlrequest.Request(f"{base}/api/tags", method="GET")
with urlrequest.urlopen(req, timeout=3) as resp:
payload = json.loads(resp.read().decode("utf-8", errors="replace"))
except Exception:
return []
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/json"},
method="POST",
)
with urlrequest.urlopen(req, timeout=5.0) as response:
res_data = json.loads(response.read().decode("utf-8", errors="replace"))
vector = res_data.get("embedding") or []
if vector:
This path transmits input text to cloud embedding providers when API keys are present, creating silent off-host disclosure of user content. Because embedding requests can include private conversations, uploaded files, or memory fragments, the confidentiality impact is significant, especially given the product's local-personal positioning.
},
method="POST",
)
with urlrequest.urlopen(req, timeout=12.0) as response:
res_data = json.loads(response.read().decode("utf-8", errors="replace"))
vector = None
if isinstance(res_data.get("embedding"), list):
The image-ingestion feature forwards user-supplied image content to an Ollama vision model over HTTP. While intended for local analysis, this still sends potentially sensitive uploaded content to another service and becomes more dangerous if the Ollama host is reconfigured away from localhost.
headers={"Content-Type": "application/json"},
method="POST",
)
with urlrequest.urlopen(req, timeout=30.0) as response:
res_data = json.loads(response.read().decode("utf-8", errors="replace"))
raw_text = res_data.get("response", "")
return _parse_visual_relationships(raw_text)
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/json"},
method="POST",
)
with urlrequest.urlopen(req, timeout=30) as resp:
json.loads(resp.read().decode("utf-8", errors="replace"))
return {"success": True, "detail": f"Ollama 已连接 · 模型 {resolved}"}
if not installed:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
base = (base_url or _ollama_base_url()).rstrip("/")
try:
req = urlrequest.Request(f"{base}/api/tags", method="GET")
with urlrequest.urlopen(req, timeout=3) as resp:
payload = json.loads(resp.read().decode("utf-8", errors="replace"))
except Exception:
return []
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def _probe_ollama():
try:
req = urlrequest.Request(f"{_ollama_base_url()}/api/tags", method="GET")
with urlrequest.urlopen(req, timeout=2) as resp:
return resp.status == 200
except Exception:
return False
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.
This finding explicitly notes hidden Tauri IPC/plugin communication alongside absent claimed features. Native bridge capability materially changes the risk profile because it can provide access beyond ordinary web UI behavior.