Back to skill

Security audit

unattended-live-avatar

Security checks for vulnerabilities and agentic risk

Overview

The avatar workflow is mostly disclosed, but it needs review because it silently self-updates installed code and requests broader Beatra account permissions than the workflow needs.

Install only if you are comfortable granting a shared Beatra device token with broad media-generation and spending-related permissions, and consider disabling automatic updates with `python3 scripts/mcp_client.py update --auto off` before routine use. Use only portraits and voices you are authorized to use, and monitor Beatra credit usage and connected-agent revocation from the Beatra Console.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/authorize.py:31
Finding
OAuth Device Token Is Granted Capabilities Beyond the Skill's Functional Requirements<![CDATA[ ## Vulnerability Details **File Location**: `scripts/authorize.py:31-34` **Vulnerability Type**: Excessive OAuth scopes and violation of least privilege **Risk Level**: Medium ### Vulnerable Code ```python SCOPE = ( "mcp:tools artifacts:write images:generate videos:generate music:generate " "speech:generate voices:read voices:write wallet:spend tasks:read artifacts:read tasks:cancel" ) ``` ### Technical Analysis The Skill's declared workflow requires uploading portrait and audio files, reading available models and voices, cloning voices, synthesizing speech, generating videos, reading and canceling tasks, and spending credits for approved operations. The authorization request additionally includes: - `images:generate` - `music:generate` - The broad `mcp:tools` capability Independent image generation and music generation are not part of the declared portrait-driven talking-avatar workflow. The broad MCP tool scope may also expose tools beyond those explicitly required by this Skill. The credential is described as a shared, full-scope Device Token used by multiple Beatra Skills. Consequently, unnecessary permissions increase the blast radius if the bearer token, the Skill, or another component using the shared credential is compromised. No evidence was found that the Skill currently invokes the unrelated image-generation or music-generation permissions. The vulnerability is the unnecessary authorization itself. ### Attack Path 1. The user runs `scripts/authorize.py`. 2. The user approves the complete scope set presented by the Beatra authorization service. 3. Beatra issues a bearer token containing the unrelated `images:generate` and `music:generate` capabilities. 4. An attacker obtains access to the token through a separate local compromise, malicious future update, or another component sharing the credential. 5. The attacker authenticates to Beatra using the token. 6. The attacker invokes unrelated image or music generation operatio ...[truncated 913 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove scopes unrelated to the declared workflow, particularly: - `images:generate` - `music:generate` 2. Replace `mcp:tools` with individual tool-specific or capability-specific scopes where the Beatra authorization service supports them. 3. Restrict the requested permissions to: - Artifact upload and read access. - Model discovery. - Voice listing and cloning. - Speech generation. - Video generation. - Required task read and user-requested cancellation operations. - Wallet spending and read-only billing access required for explicitly approved paid operations. 4. Prefer a package-specific credential over a full-scope credential shared by every installed Beatra Skill. 5. Make the authorization page clearly enumerate the exact capabilities being granted. 6. Add automated tests that compare the requested scopes against an explicit allowlist for this package and fail release validation if unrelated scopes are introduced. 7. If the backend cannot issue narrower credentials, document that limitation prominently and apply server-side authorization policies restricting this package identifier to its approved tool set. ]]>

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/mcp_client.py:969
Finding
Silent Automatic Updates Permit Post-Review Retrieval and Execution of Remote Code<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/mcp_client.py:23-24` - `scripts/mcp_client.py:969-1019` - `scripts/mcp_client.py:1543` - `SKILL.md:181-198` - `references/automatic-updates-and-safety.md:3-19` **Vulnerability Type**: Automatic retrieval and replacement of executable package files without an independently pinned signature **Risk Level**: Medium ### Vulnerable Code The remote release locations are embedded in the client: ```python PACKAGE_DISCOVERY_URL = "https://beatra.ai/skills/unattended-live-avatar/channels/clawhub/install.json" PACKAGE_CDN_BASE_TEMPLATE = "https://cdn.beatra.ai/agent-packages/unattended-live-avatar/channels/clawhub/v{version}" ``` Automatic updates are enabled when the state does not explicitly disable them: ```python def maybe_auto_update( *, state_dir: Path | None = None, install_root: Path | None = None, get_bytes: GetBytes = _default_get_bytes, now: float | None = None, ) -> bool: """Best-effort silent update. Never block the requested MCP command.""" resolved_state = state_dir or Path.home() / ".beatra" try: resolved_root = (install_root or _current_install_root()).resolve() update_home = _update_home(resolved_state, resolved_root) observed_at = time.time() if now is None else now nonce = _lock_update(update_home, now=observed_at) if nonce is None: return False try: recover_update(state_dir=resolved_state, install_root=resolved_root) state = _read_update_state(update_home) if state.get("auto_update", True) is False: return False last_checked = state.get("last_checked_at") if ( isinstance(last_checked, (int, float)) and observed_at - float(last_checked) < UPDATE_CHECK_MAX_AGE_SECONDS ): return False state["last_checked_at"] = observed_at _write_private ...[truncated 4417 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Disable automatic installation by default. 2. Separate update checks from update installation: - Silent checks may report availability. - File replacement should require explicit user approval. 3. Cryptographically sign release metadata with an offline-controlled signing key. 4. Embed or pin the corresponding public key in the reviewed package. 5. Verify signatures before trusting the version, manifest digest, archive digest, or file list. 6. Use a signed-update framework with rollback and key-rotation protections, such as TUF or an equivalent design. 7. Preserve the existing defenses for: - Fixed domains. - Redirect rejection. - Version downgrade prevention. - Archive limits. - Path traversal and symlink rejection. - Package ownership checks. - Transactional replacement and rollback. 8. Display the new version, release identity, and files to be replaced before installation. 9. Provide a policy mode that permits only manual, administrator-approved updates in managed environments. 10. Ensure signing keys are isolated from the web-serving and CDN infrastructure so compromise of the distribution service alone cannot authorize executable updates. 11. Consider having the Skill host or package manager perform updates outside ordinary business operations rather than allowing the credential-bearing MCP client to replace itself. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (8)

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill exercises sensitive capabilities including filesystem access, shell execution, environment access, and network communication, yet declares no permissions. That creates an authorization transparency gap: operators and users cannot accurately assess what the skill can do, and high-risk actions may run without explicit review. In this context the risk is elevated because the workflow includes uploading local media, credentialed client use, and package modification.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documented purpose is avatar generation, but the skill also performs unrelated high-impact behaviors such as OAuth/device auth, credential storage, generic remote tool invocation, telemetry/registration, uninstall state handling, and self-update with file replacement. This mismatch is dangerous because users may authorize the skill expecting limited media generation while it can persist credentials, communicate broadly with external services, and alter local package files. The context makes this more serious because the skill is framed as an unattended overnight workflow, reducing operator scrutiny.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill states that it silently checks for updates and installs newer releases without separate confirmation, while replacing package-owned files. Even with checksum and source validation claims, silent self-modification materially increases supply-chain risk and can change behavior after initial approval without user awareness; if the update channel or signing process is compromised, the skill becomes a remote code delivery path. In a skill with shell, file-write, and network capabilities, that context raises the danger substantially.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The manifest explicitly describes creating unattended looping avatar content from a person's portrait and a cloned or selected voice, but provides no visible consent, authorization, or disclosure safeguards. In this context, that omission materially increases the risk of non-consensual impersonation, privacy abuse, and deceptive synthetic media deployment, especially because the content is designed for unattended operation.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The document states that the client silently checks for updates and automatically installs newer releases without separate confirmation before ordinary commands. Even though it describes integrity checks and rollback protections, this is still system-modifying behavior performed by default and in the background, which creates security and trust risks if users are not given a clear upfront warning and explicit consent model.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The client performs silent automatic self-updates during normal command execution, downloading remote manifests and archives and replacing installed package files without a contemporaneous user prompt. Although there are integrity checks and path-safety validations, this still creates a remote code-update channel that can change executable behavior in the background; compromise of the update origin, signing workflow, or trusted account would yield code execution on the host.

Missing User Warnings

Medium
Confidence
78% confidence
Finding
The code sends installation telemetry on use via beatra.installations.register and records local inventory without any user-facing notice in this file. Even if framed as best-effort telemetry, it discloses package, version, platform, and installation reference during ordinary operations, which can violate privacy expectations and create unwanted tracking of skill usage.

Self-Modification

High
Category
Rogue Agent
Content
)
    update = subparsers.add_parser(
        "update",
        help="Check, install, or configure Beatra package self-updates",
    )
    update.add_argument(
        "--check",
Confidence
84% confidence
Finding
This package includes a built-in self-update capability that can replace its own installed files, and elsewhere it is invoked automatically before normal operations. Self-modifying behavior is especially sensitive in an agent skill because it changes future execution semantics and can introduce new capabilities or malicious logic outside the user's immediate awareness.

Static analysis

No suspicious patterns detected.