Back to skill

Security audit

Community Site One-Shot Clips

Security checks for vulnerabilities and agentic risk

Overview

The skill can perform its advertised clip workflow, but it also uses a broad shared Beatra credential, arbitrary authenticated tool dispatch, telemetry, shared uninstall state, and silent self-updates that warrant review before installation.

Install only if you are comfortable granting this Beatra package a shared, broad Device Token and allowing default silent package updates. Before use, consider disabling auto-updates with the documented command, verify the Beatra account and wallet implications, and avoid installing it in environments where hostname/platform telemetry or shared credential revocation would be unacceptable.

Vulnerability Patterns
  • 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
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/authorize.py:33
Finding
Overprivileged Shared Device Credential and Unrestricted MCP Tool Dispatch## Vulnerability Details **File Location**: `scripts/authorize.py:33-37`; secondary dispatch location: `scripts/mcp_client.py:1463-1481` **Vulnerability Type**: Excessive OAuth scopes and unrestricted authenticated tool invocation **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" ) ``` The authenticated command handler permits the caller to supply an arbitrary MCP tool name: ```python def _run_command(command: str, tool_name: str | None = None) -> dict[str, Any]: session = _session_with_registration( state_dir=Path.home() / ".beatra", post_json=_default_post_json, ) if command == "tools": return session.request(2, "tools/list", {}) try: arguments = json.load(os.sys.stdin) except json.JSONDecodeError as exc: raise RuntimeError("Tool arguments on stdin must be one JSON object") from exc if not isinstance(arguments, dict): raise RuntimeError("Tool arguments on stdin must be one JSON object") assert tool_name is not None return session.request( 2, "tools/call", {"name": tool_name, "arguments": arguments}, ) ``` ### Technical Analysis The Skill's declared purpose is to upload authorized photographs and generate one video clip per photograph. Its legitimate operations require capabilities such as artifact upload, model discovery, video generation, wallet reads, and task inspection or cancellation. The requested credential additionally includes unrelated privileges for image generation, music generation, speech generation, voice reads, and voice writes. These permissions are not necessary for the declared photo-to-video workflow. The authorization documentation also states that this is a shared, ful ...[truncated 2168 chars]
Remediation
## Remediation Suggestions 1. Replace the full shared scope with the minimum capabilities required by this package: - Artifact upload/write. - Model discovery. - Video generation. - Necessary task read and user-requested cancellation. - Wallet read operations only where required. 2. Remove image, music, speech, and voice permissions from this Skill's authorization request. 3. Use package-specific or capability-specific credentials instead of one full-scope credential shared by all Beatra Skills. 4. Add a strict local allowlist in `mcp_client.py` for this package, covering only documented tools such as: - `beatra.assets.upload` - `beatra.models.list` - `beatra.videos.animate` - `beatra.tasks.get` - `beatra.tasks.list` - `beatra.tasks.cancel` - Required read-only wallet tools - Installation registration, if retained 5. Reject all other tool names before creating an authenticated request. 6. Require fresh, explicit user authorization whenever a package genuinely needs additional scopes. 7. Display the requested capabilities clearly on the approval page so users can make an informed authorization decision.

other

Note
Location
scripts/authorize.py:337
Finding
Unnecessary Collection and Transmission of Host-Identifying Telemetry## Vulnerability Details **File Location**: `scripts/authorize.py:337-370`; transmission location: `scripts/authorize.py:478-493` **Vulnerability Type**: Environment reconnaissance and privacy overcollection **Risk Level**: Low ### Vulnerable Code The authorization helper detects the Agent environment from process environment signatures and reads the local hostname: ```python def detect_host_platform(explicit: str | None = None) -> str: """The agent environment this process runs inside (docs/device-model.md). Order: explicit agent self-report > environment signatures > unknown. Detection reads the process environment only — nothing else runs, nothing reaches the network. """ if explicit: candidate = explicit.strip().lower().replace(" ", "-") if _PLATFORM_VALUE.fullmatch(candidate): return candidate env = os.environ if env.get("CLAUDECODE") == "1" or "CLAUDE_CODE_ENTRYPOINT" in env: return "claude-code" if any(key.startswith("CODEX_") for key in env): return "codex" ai_agent = env.get("AI_AGENT", "").lower() matched = re.match(r"([a-z0-9-]+)_", ai_agent) if matched and _PLATFORM_VALUE.fullmatch(matched.group(1)): return matched.group(1) return "unknown" def device_display_name() -> str | None: """A hostname the user will recognise in the console device list.""" try: name = socket.gethostname().strip() except OSError: return None if not name or not name.isprintable(): return None return name[:120] ``` These values are included in the remote device-authorization request: ```python form: dict[str, str] = { "client_id": CLIENT_ID, "resource": MCP_URL, "scope": SCOPE, "platform": host_platform, "client_name": PACKAGE_DISPLAY_NAME, "external_installation_ref": external_reference, "package_ver ...[truncated 2845 chars]
Remediation
## Remediation Suggestions 1. Do not collect or transmit the hostname by default. 2. Replace the hostname with a locally generated, non-identifying label if a device-list entry is operationally necessary. 3. Make hostname and Agent-platform telemetry explicitly opt-in. 4. Before authorization, clearly disclose every field sent to Beatra, its purpose, and its retention period. 5. Allow users to provide a custom device label rather than automatically reading the system hostname. 6. Avoid stable cross-session identifiers unless required for security or device management; otherwise rotate or scope identifiers per package. 7. Minimize local persistence in `host.json` and protect it with the same strict permissions used for other Beatra state. 8. Provide a configuration option that suppresses `source_platform`, registration telemetry, and device-name transmission without blocking the core photo-to-video workflow.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (25)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares a narrow media-generation purpose but instructs use of shell, local file handling, network access, persistent state, and remote tool invocation without any declared permission boundary. That mismatch is dangerous because it hides powerful capabilities from users and reviewers, increasing the chance of unauthorized file access, data exfiltration, or execution of unintended remote operations through the bundled client.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description says the skill only turns event photos into short clips, but the embedded behavior includes authentication, credential storage, arbitrary MCP tool calls, uploads, telemetry/registration, self-update, and uninstall/state-deletion flows. This is a serious trust-boundary violation because users may invoke the skill expecting simple media processing while it performs broad account, network, and system-affecting operations not clearly disclosed by its stated purpose.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The documentation states that a single approval grants broad access across image, video, music, speech, upload, model, and task tools, which exceeds the skill’s stated purpose of creating community photo clips. This violates least-privilege and creates unnecessary expansion of accessible capabilities if the skill, host, or token is later abused.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
Granting or relying on unrelated music, speech, model, and generic task capabilities for a photo clip skill unnecessarily broadens what the credential can do. If compromised, the token could be used for unrelated operations well beyond the user’s expected consent and the manifest’s declared function.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The documentation describes an automatic backend registration call on first use that transmits package, version, platform, and installation-reference metadata, which exceeds the narrowly stated photo-to-clip functionality of the skill. Even if framed as non-billable and best-effort, this is still telemetry-like behavior that creates unnecessary data disclosure and trust risk when not clearly justified by the skill’s core purpose.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
A capability to register installations with a backend is documented even though the skill’s declared purpose is local creative processing of community event photos into clips. That mismatch increases supply-chain and privacy risk because users may authorize or install the skill without expecting environment-linked outbound communication unrelated to the advertised function.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The OAuth scope string requests a very broad set of capabilities far beyond the stated purpose of creating silent community site photo clips. This violates least privilege and means that if the credential is later misused, stolen, or the skill is extended maliciously, it can access unrelated high-risk APIs under the user's authorization.

Context-Inappropriate Capability

Critical
Confidence
91% confidence
Finding
The requested tasks:cancel capability is not clearly necessary for a simple one-photo-one-clip authorization helper. While less severe than spending or voice scopes, it still grants control over unrelated task lifecycle operations and can interfere with other user work if abused.

Context-Inappropriate Capability

High
Confidence
91% confidence
Finding
The requested tasks:cancel capability is not clearly necessary for a simple one-photo-one-clip authorization helper. While less severe than spending or voice scopes, it still grants control over unrelated task lifecycle operations and can interfere with other user work if abused.

Context-Inappropriate Capability

High
Confidence
91% confidence
Finding
The requested tasks:cancel capability is not clearly necessary for a simple one-photo-one-clip authorization helper. While less severe than spending or voice scopes, it still grants control over unrelated task lifecycle operations and can interfere with other user work if abused.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The requested tasks:cancel capability is not clearly necessary for a simple one-photo-one-clip authorization helper. While less severe than spending or voice scopes, it still grants control over unrelated task lifecycle operations and can interfere with other user work if abused.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The client embeds a full self-update channel and remote package discovery logic despite the skill being described as a photo-to-clip tool. Even though the update path includes integrity checks, it introduces hidden code-delivery behavior and extra network trust that materially expands the attack surface beyond user expectations.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The code records local skill inventory and transmits installation registration data to a remote service, which is unrelated to the stated clip-generation purpose. This creates undisclosed local tracking and outbound telemetry, increasing privacy risk and violating least surprise in a creative media skill.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The client fingerprints the execution environment using environment variables and host metadata, then attaches platform attribution to tool calls. For a photo-to-clip skill, this data collection is not functionally necessary and can be used for tracking, correlation, or differential behavior across agent environments.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
This code can download, validate, and replace package files on disk, giving the skill a self-modifying capability far outside its declared creative scope. Any compromise of the update trust chain, packaging process, or distribution authority would let an attacker ship new code into the local environment through a media skill entrypoint.

Description-Behavior Mismatch

High
Confidence
90% confidence
Finding
The script manages a shared global Beatra credential store and installation inventory, which is a privileged capability unrelated to the skill’s stated photo-to-clip function. Even if intended as uninstall logic, touching shared cross-skill authentication state creates a broad blast radius: uninstalling this skill can affect every other installed skill on the device.

Context-Inappropriate Capability

High
Confidence
94% confidence
Finding
This code performs a remote revocation of device authorization over HTTP using the bearer token from local state. In the context of a media-processing skill, that is an unjustified account/control-plane action; if invoked unexpectedly, it can disconnect the device and disrupt all skills relying on the shared authorization.

Context-Inappropriate Capability

High
Confidence
93% confidence
Finding
The script enumerates and deletes shared files under ~/.beatra, including credentials and global installation metadata. Because these files are shared across skills, modification or deletion can disable unrelated skills and destroy authentication state, making this far more sensitive than a normal package uninstall action.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill states that the bundled client silently installs newer releases automatically without separate confirmation. Silent self-update is dangerous because it changes executable behavior after initial review, can introduce new capabilities or malicious code through the update channel, and removes the user's chance to re-consent to materially different behavior.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document states that the client silently checks for updates and automatically installs newer versions before ordinary commands, without separate confirmation. Even though the text describes integrity protections, this still normalizes unattended replacement of executable/package files, which is a security-sensitive system modification that can expand supply-chain risk and reduce user awareness or consent if the update channel is ever compromised or misconfigured.

Missing User Warnings

Low
Confidence
83% confidence
Finding
The file states that installation and environment metadata are transmitted on first use, but it does not indicate any user-facing warning, consent flow, or opt-in notice. While the transmitted fields are not described as secrets, silent collection of platform and installation identifiers undermines transparency and can contribute to tracking across environments.

Credential Access

High
Category
Privilege Escalation
Content
},
  "mcp": {
    "authentication": "device-bearer",
    "credential_file": "~/.beatra/credentials.json",
    "name": "beatra",
    "transport": "streamable-http",
    "url": "https://mcp.beatra.ai/mcp"
Confidence
89% confidence
Finding
The manifest declares use of a local credential file at ~/.beatra/credentials.json for device-bearer authentication to a remote MCP endpoint. Referencing host-stored bearer credentials increases sensitivity because any overbroad tool access, prompt injection, or unintended server interaction could leverage those credentials to perform authenticated actions or access protected data.

Credential Access

High
Category
Privilege Escalation
Content
#: these and then removes the directory only if it is empty — the script
#: never recursively deletes a directory it does not fully understand.
_STATE_FILES = (
    "credentials.json",
    "installation.json",
    "host.json",
    "skills.json",
Confidence
88% confidence
Finding
Referencing credentials.json as part of the removable shared state indicates this skill can act on stored authentication material. In this skill context, access to shared credentials is over-privileged and dangerous because compromise or misuse can affect the full Beatra device authorization, not just this skill.

Credential Access

High
Category
Privilege Escalation
Content
def _device_token(state_dir: Path) -> str | None:
    path = state_dir / "credentials.json"
    try:
        value = json.loads(path.read_text(encoding="utf-8"))
    except (OSError, ValueError):
Confidence
95% confidence
Finding
The _device_token function reads the access_token from credentials.json and passes it to revocation logic, giving the script direct credential-handling capability. In a photo/clip skill, this is unnecessary and increases the risk of unauthorized account actions, token misuse, or accidental service disruption during uninstall.

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
95% confidence
Finding
The exposed CLI includes a self-update command, confirming that this skill can intentionally modify its own installed code. In the context of a simple community photo clip skill, self-modification is an unnecessary high-risk capability that broadens persistence and post-deployment code-change opportunities.

Static analysis

No suspicious patterns detected.