Back to skill

Security audit

The Semantic Translation Bridge

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent smart-home scene parser demo, but it writes persistent local orchestration and memory records and forwards unvalidated profile text into agent-like mandates.

Review before installing in any real smart-home or agent-orchestration environment. Run it only in a contained test directory unless you are comfortable with it creating local data folders, JSON files, and a SQLite database. Do not let downstream agents or device controllers execute rendered_tracks.json or s2_chronos.db records without revalidating them as untrusted data.

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

T09 · Insecure Skill Coding Practices

Warning
Location
skill.py:198
Finding

Untrusted Profile Content Is Injected into the Agent Orchestration Channel

Content
View full analysis

Vulnerability Details

File Location: skill.py:95-104 and skill.py:198-215
Vulnerability Type: Untrusted semantic instruction injection
Risk Level: Medium

Vulnerable Code

python
class AvatarRoamEngine:
    """Digital avatar preference extraction and roaming controller."""
    def __init__(self):
        with open(FILE_HABITS, 'r') as f:
            self.profile = json.load(f)
        self.avatar_id = self.profile.get("avatar_id", "UNKNOWN_AVATAR")
        self.overrides = self.profile.get("scene_overrides", {})

    def fetch_habit(self, scene_name):
        return self.overrides.get(scene_name, None)
python
base_intent = SCENE_MATRIX[target_scene]
habit = engine.fetch_habit(target_scene)

print(f"🧠 [Semantic Bridge] Translating rigid hardware command to 6-Element Tensor...")
time.sleep(0.5)

final_intent = base_intent
if habit:
    print(f"✨ [Avatar Habit Injection] Cloud habit found for '{target_scene}'. Overriding default matrix!")
    final_intent = f"{base_intent} | [AVATAR_MANDATE_OVERRIDE]: {habit}"

print("\n🎯 [Final Parsed 4D Intent]:")
print(f"   >> {final_intent}")

# Dispatch to the timeline engine
print("\n⏱️ [Timeline Orchestrator] Injecting keyframes into rendered_tracks.json...")
track_id = TimelineOrchestratorBridge.inject_track(location, target_scene, final_intent, agent_id)
print(f"✅ Track [ {track_id} ] assigned to Swarm Agent [ {agent_id} ] for execution.")

# Persist to the memory database
print("🗄️ [Chronos Memzero] Logging causality and legal mandate to SQLite DB...")
ChronosMemoryBridge.log_mandate(location, engine.avatar_id, target_scene, final_intent)

Technical Analysis

The application treats values loaded from the mutable local file s2_avatar_data/avatar_habits.json as trusted mandate instructions. The scene_overrides object receives no schema validation, type checking, length restriction, semantic filtering, sou ...[truncated 2458 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace free-form preference strings with a strict typed schema containing bounded fields such as temperature, illumination, volume, and enabled capabilities.
  2. Validate all loaded JSON data before use, including object types, permitted scene names, field lengths, numeric ranges, and enumerated values.
  3. Reject instruction-like fields and unknown properties rather than forwarding them to the orchestration channel.
  4. Serialize preferences as structured data and keep them separate from natural-language prompts or Agent control instructions.
  5. Apply an allowlist of actions that each scene may modify. Require explicit authorization or user confirmation for security-sensitive, privacy-sensitive, or safety-sensitive operations.
  6. Authenticate the source of profile data and integrity-protect the file, such as through signed records or a message authentication code with securely managed keys.
  7. Restrict filesystem permissions so only the intended profile-management component can modify avatar_habits.json.
  8. Treat rendered_tracks.json and database records as untrusted when consumed downstream. Revalidate them at the execution boundary and never grant authority based solely on labels such as AVATAR_MANDATE_OVERRIDE.
  9. Use atomic writes and safe failure behavior so malformed or partially written JSON cannot corrupt the orchestration state.
  10. Add tests covering oversized values, unexpected types, unknown actions, embedded prompt instructions, and unauthorized profile modifications.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document identifier explicitly ends with "-ZH", and the file content is written as a Chinese-only whitepaper while also presenting normative ecosystem guidance. There is no indication that the skill or specification offers language selection or that the Chinese-only constraint is a documented, region-specific requirement.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation assigns the skill unusually broad orchestration powers, including reading habit files, writing timeline payloads, and connecting to a SQLite database, without clear scoping, authorization, or user-consent boundaries. In skill ecosystems, overbroad capability claims are dangerous because they normalize cross-component data access and persistent logging that could be implemented later with excessive privileges.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly states it can auto-generate mock topologies, databases, and habit files on the user's hard drive, which is a local side effect beyond passive documentation or parsing behavior. Automatic filesystem and database creation without an explicit opt-in increases the risk of unauthorized persistence, data pollution, and abuse of local storage for follow-on actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation acknowledges automatic creation of local files and databases but does not provide a clear warning, consent flow, or operational details before instructing the user to run the skill. That omission is dangerous because users may execute the skill expecting a demo while unintentionally allowing persistent local changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file includes natural-language headings and operational text in Chinese, and later user-facing prompts also include Chinese phrasing, but there is no indication that language choice is optional or configurable. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill automatically creates directories and writes a habits file without explicit user consent or a clear warning. Silent filesystem modification can surprise users, persist data they did not intend to store, and create local state that later influences behavior, which is risky in an agent skill context where users may expect read-only or transparent operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code silently generates a topology file describing rooms, agents, and assigned units with no prior disclosure. Even though the current content is mock data, undisclosed creation of environment/topology artifacts can mislead downstream components, leak assumptions about physical layout, and establish persistent state that affects future automation decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill creates a SQLite database and persists mandate history without a clear prior warning, establishing durable logs of location, avatar identity, scene selection, and parsed intent. In this skill's context, that data has behavioral and potentially privacy-sensitive meaning, so undisclosed retention increases privacy risk and the chance of unintended data accumulation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code appends execution track data to a JSON file without informing the user, creating a persistent activity log that includes timestamps, location, agent identifiers, scene names, and intent payloads. In an automation/orchestration skill, silent accumulation of operational history can expose behavioral patterns and influence later components, making the lack of disclosure security-relevant rather than merely cosmetic.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document identifier ends with "-EN," which indicates an English-specific variant, but the whitepaper does not offer a language choice or explain why English is required. This is a natural-language locale policy concern under the rule for language or locale restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The heading states 'Bilingual Edition (English / 中文)' as a fixed presentation choice, and the document consistently enforces that format throughout. Because the skill does not indicate that users may choose a preferred language or opt in to a locale-specific mode, this may conflict with language/locale choice expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.