Back to skill

Security audit

Anthropomorphic Agent Engine · Your Soulmate

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because its guardian service exposes protected controls, accepts unsafe notification destinations, and inconsistently protects sensitive records.

Prefer the bundled offline core for experiments. Before using the HTTP service with real minors or sensitive conversations, fix guardian authentication, restrict webhook destinations, and enforce accurate masking and scheduled retention. Keep logs in a dedicated directory and establish explicit memory deletion controls. The compliance document identifies this as a research/demo framework, not a certification. This static review did not validate the external PyPI package or upstream assurance claims.

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
assets/minor-protection/SPL-anthropic-minor-server.py
Finding

Unauthenticated consent endpoint discloses existing guardian credentials

Content
View full analysis

Impact

The disclosed token satisfies the checks protecting session export, deletion, guardian state, role blocking, and contact registration. A non-guardian session participant can obtain these privileges. Another reachable client with a known session ID can similarly retrieve its stored conversation summaries or delete its records. The same unauthenticated endpoint also permits changing the existing guardian webhook and consent metadata.

T09 · Insecure Skill Coding Practices

Warning
Location
assets/minor-protection/SPL-anthropic-minor-server.py
Finding

Client-controlled guardian webhook enables server-side requests to internal destinations

Content
View full analysis

Impact

The caller can induce JSON POST requests to loopback or private-network HTTP services reachable by the server, crossing network access boundaries and exposing limited delivery success information through the returned channel. The request body is constrained to the verification payload; arbitrary response-body disclosure, arbitrary headers, and code execution are not established.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (20)

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

Critical
Category
Data Flow
Confidence
99% confidence
Finding

The stated environment-credential provenance is unsupported, but the network sink has a real SSRF vulnerability: session users can supply guardian webhook URLs that the server requests without destination validation. Guardian verification can trigger these requests, allowing access to server-reachable internal services or delivery of verification codes and crisis metadata to attacker-controlled destinations; loopback binding does not prevent outbound SSRF.

Content

Scanner excerpt · assets/minor-protection/SPL-anthropic-minor-server.py (reported line 642)May include surrounding context.

python
headers={"Content-Type": "application/json"},
                method="POST",
            )
            with urllib.request.urlopen(req, timeout=timeout) as resp:
                return resp.status, attempt, None
        except Exception as e:
            last_err = str(e)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The guardian-consent and crisis-handling functions are consistent with the description, and their local HTTP interface, persistence, and audit mechanisms are supporting implementation details. However, _post_webhook uses urllib.request.urlopen to contact registered URLs, and both _vpc_send_code and _guardian_notify invoke it when a webhook is configured. This is actual external communication, not merely a local interface, and the description does not disclose an exception to its no-network claim for guardian notifications. Randomness is used for session identifiers, tokens, and verification codes; that alone does not establish that the psychological engine is nondeterministic. The imported core is not supplied, so its detailed psychological capabilities cannot be verified from this chunk.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **`COMPLIANCE.md` wording synced** to the repository: the IMDA AI Verify PDF is described as the provider's own self-assessment (95/100) submitted as develope

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
epo's v1.2** (2026-10-08), which adds Art. 1.3 "Evaluation Purpose Exception"; `assets/minor-protection/COMPLIANCE.md` synced. The package `README.md` was kept

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `assets/minor-protection/COMPLIANCE.md` (mapping to the PRC anthropomorphic-interaction service measures)

The claimed verifiable guardian-consent flow allows the session user to choose the verification destination and obtain guardian-control credentials.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The unauthenticated consent endpoint accepts the session user's chosen verification webhook and returns the guardian-control token. A child can receive the verification code at their own endpoint and approve their own access, while possession of a session ID also permits obtaining credentials for guardian controls and data access. This defeats the guardian/user separation central to the minor-protection service.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Neutral-signal interpretation reverses the documented effects of hostile and benevolent attribution.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The comment at L128 explicitly states that hostile attribution pushes signals negative and benevolent attribution pushes them positive. However, L129–L130 add a positive adjustment when hostility exceeds benevolence and a negative adjustment in the opposite case, reversing the intended psychological behavior; for example, the paranoid preset interprets a neutral signal positively.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

The documented automatic audit-log expiration is not implemented.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The retention field promises automatic expiration, but this file only provides an explicitly invoked cleanup method; no initialization, logging, or scheduled path calls it. With auditing enabled by default, sensitive psychological state and guardian contact information can remain on disk indefinitely unless an external caller performs cleanup, increasing privacy exposure in a service intended for minors.

Content

No source excerpt is available for this finding.

Audit-log cleanup deletes expired JSONL files without verifying that they are engine audit logs.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The cleanup method deletes every sufficiently old file ending in .jsonl in audit_log_dir, without checking whether the engine owns it. Because the directory is configurable and defaults to the generic logs directory, invoking cleanup in a shared directory can destroy unrelated application logs or records; this requires cleanup invocation and is not evidence of remote arbitrary deletion.

Content

No source excerpt is available for this finding.

Tainted flow: 'LOG_DIR' from os.environ.get (line 90, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · assets/minor-protection/SPL-anthropic-minor-server.py (reported line 251)May include surrounding context.

python
entry = {"ts": datetime.datetime.now().isoformat(timespec="milliseconds"),
                 "level": level, "msg": msg}
        entry.update({k: _mask(v) if isinstance(v, str) else v for k, v in extra.items()})
        with open(os.path.join(LOG_DIR, "runtime.jsonl"), "a", encoding="utf-8") as f:
            f.write(json.dumps(entry, ensure_ascii=False) + "\n")
    except Exception:
        pass

Guardian contact details are persisted unmasked despite the privacy notice promising masking before disk storage.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Guardian contact objects are serialized in full and passed to _enc, which returns plaintext when encryption is unavailable or unconfigured. Consequently, the default database can contain complete phone numbers, email addresses, and potentially secret-bearing webhook URLs despite the notice promising masking before disk storage. The minor-focused context increases the sensitivity of these linked records.

Content

No source excerpt is available for this finding.

Expired-record cleanup runs only at startup, contradicting the stated automatic retention limit.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

cleanup_expired is invoked only during startup, so an uninterrupted server can retain interaction, complaint, referral, and notification records indefinitely beyond the configured retention period. This expands the exposure window for sensitive minors' records and does not enforce the advertised automatic retention limit.

Content

No source excerpt is available for this finding.

Conversation-derived memory is persisted across sessions without a user-facing privacy warning.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

The persistence contract explicitly carries conversation-derived working memory and social state across sessions without requiring user notice, a retention limit, or a deletion mechanism. In an emotional-companion skill, this can silently retain sensitive personal disclosures beyond users' expectations; local storage reduces external transmission risk but does not eliminate persistence-related privacy exposure. This is a design-level omission, not proof that every integration lacks notice.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/SPL-anthropic-engine.py (reported line 1930)May include surrounding context.

python
"""OpenAI / 兼容 API 适配器(GPT-4o, o1, DeepSeek, 通义千问等)"""

    DEFAULTS = {
        "api_base": "https://api.openai.com/v1",
        "model": "gpt-4o",
        "system_prompt": "你是一个角色语言生成器。根据给定的风格指令,产出一句符合角色当前情感状态的中文台词。不要输出解释,只输出台词本身。",
    }

Both LLM adapters explicitly require Chinese output without user language opt-in.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The default system prompts at L1932 and L2010 instruct the model to produce Chinese dialogue ("中文台词"), irrespective of the user's language. Although callers can replace the entire system prompt, the file does not explicitly offer a language choice or justify a Chinese-only constraint.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/SPL-anthropic-engine.py (reported line 2008)May include surrounding context.

python
"""Anthropic Claude 适配器"""

    DEFAULTS = {
        "api_base": "https://api.anthropic.com/v1",
        "model": "claude-3-5-sonnet-20241022",
        "system_prompt": "你是一个角色语言生成器。根据给定的风格指令,产出一句符合角色当前情感状态的中文台词。不要输出解释,只输出台词本身。",
    }

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · assets/feature-guide/world module.py (reported line 67)May include surrounding context.

python
"""
        if not hasattr(self, domain):
            return
        current = getattr(self, domain)
        # 负面经验学习权重更高(负向偏见)
        if experience < current:
            lr = self.world_learning_rate * self.negativity_bias_in_learning