Back to skill

Security audit

Cnexus2 Cognitive Os

Security checks for vulnerabilities and agentic risk

Overview

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.

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
app_v2.py:2856
Finding

Unauthenticated Localhost APIs Exposed Through Wildcard CORS

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
app_v2.py:298
Finding

User-Controlled Model Base URL Enables SSRF and Disclosure of Prompts and Activated Memory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (178)

Tainted flow: 'req' from os.environ.get (line 1672, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

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.

Content

Scanner excerpt · app_v2.py (reported line 334)May include surrounding context.

python
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 = ""

Tainted flow: 'req' from os.environ.get (line 1672, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · app_v2.py (reported line 804)May include surrounding context.

python
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 []

Tainted flow: 'req' from os.environ.get (line 1672, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · app_v2.py (reported line 1593)May include surrounding context.

python
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 []

Tainted flow: 'req' from os.environ.get (line 1672, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · app_v2.py (reported line 881)May include surrounding context.

python
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:

Tainted flow: 'req' from os.environ.get (line 1672, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
96% confidence
Finding

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.

Content

Scanner excerpt · app_v2.py (reported line 927)May include surrounding context.

python
},
            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):

Tainted flow: 'req' from os.environ.get (line 1672, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

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.

Content

Scanner excerpt · app_v2.py (reported line 1678)May include surrounding context.

python
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)

Tainted flow: 'req' from os.environ.get (line 2069, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · app_v2.py (reported line 2075)May include surrounding context.

python
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:

Tainted flow: 'req' from os.environ.get (line 2069, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · app_v2.py (reported line 2099)May include surrounding context.

python
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 []

Tainted flow: 'req' from os.environ.get (line 2069, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · app_v2.py (reported line 2178)May include surrounding context.

python
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

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.