Back to skill

Security audit

Beatra AI Image Studio

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real cloud image-generation skill, but it needs Review because it obtains broad non-image Beatra permissions and silently self-updates installed code by default.

Review before installing. Be comfortable with prompts and images being sent to Beatra, a shared local Beatra token with permissions beyond images, and automatic package updates that are enabled by default. Consider disabling automatic updates, using a dedicated Beatra account or low-balance wallet, and revoking the device from the Beatra Console when done.

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

Error
Location
scripts/authorize.py:33
Finding

Overprivileged Device Token and Unrestricted MCP Tool Dispatch

Content
View full analysis

Vulnerability Details

File Location: scripts/authorize.py:33-37
Vulnerability Type: Excessive authorization scope
Risk Level: High

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 excessive scope is compounded by unrestricted tool dispatch at scripts/mcp_client.py:1463-1479:

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 declares image generation, transformation, and editing functionality. However, its authorization request also obtains privileges for video generation, music generation, speech generation, voice reading and modification, and wallet spending.

The MCP client accepts an arbitrary tool name and does not enforce a package-specific allowlist. Therefore, any process or agent capable of invoking the bundled client can attempt unrelated MCP operations using the shared bearer credential. Although the documentation discloses that approval covers several media types, these permissions exceed the minimum privileges needed by this image-focused Skill.

Attack

...[truncated 1276 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the shared full-scope request with the narrowest scopes required for:
    • image generation and editing;
    • approved artifact uploads;
    • model capability and pricing lookup;
    • task status retrieval;
    • user-requested task cancellation;
    • billing only where strictly necessary.
  2. Remove video, music, speech, and voice-write scopes from this package.
  3. Avoid broad wallet privileges where the API supports operation-specific spending authorization.
  4. Enforce an explicit MCP tool allowlist in _run_command, covering only the tools documented by this Skill.
  5. Reject unknown tool names locally before establishing a business-operation request.
  6. Use separate, narrowly scoped credentials for different Skill families rather than one shared full-scope bearer token.
  7. Add automated tests proving that unrelated media, voice, and account-management tools cannot be called through this package.
  8. Clearly display the exact requested scopes before the user approves authorization.

other

Warning
Location
scripts/authorize.py:361
Finding

Automatic Collection, Persistence, and Transmission of the Local Hostname

Content
View full analysis

Vulnerability Details

File Location: scripts/authorize.py:361-370
Vulnerability Type: Unnecessary host-information collection
Risk Level: Medium

Vulnerable Code

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

The hostname is persisted at scripts/authorize.py:373-386:

python
def write_host_config(state_dir: Path, *, platform: str, device_name: str | None) -> None:
    """Persist detection results so mcp_client never re-detects per request
    and still has a truth source when its own env detection comes up empty.
    Best-effort: config failure must never block authorization."""
    try:
        payload: dict[str, Any] = {"platform": platform}
        if device_name:
            payload["device_name"] = device_name
        (state_dir / "host.json").write_text(
            json.dumps(payload, ensure_ascii=False, separators=(",", ":")) + "\n",
            encoding="utf-8",
        )
    except OSError:
        pass

It is transmitted during authorization at scripts/authorize.py:456-467:

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_version": PACKAGE_VERSION,
    "package_slug": PACKAGE_SLUG,
}
if device_name:
    form["device_name"] = device_name

Technical Analysis

Running the authorization helper automatically reads the machine hostname, stores it in ~/.beatra/host.json, and submits it to https://api.beatra.ai/oauth/device_authorization.

A hostname may disclose a pe ...[truncated 1535 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not collect or transmit the operating-system hostname by default.
  2. Use a generic device label or the existing opaque installation UUID when a console identifier is needed.
  3. If a recognizable label is optional, prompt the user and explain exactly what will be transmitted.
  4. Permit a user-supplied, non-sensitive alias rather than deriving a hostname automatically.
  5. Avoid storing device_name in host.json unless it is required for local functionality.
  6. Document the recipient, purpose, retention expectations, and opt-out mechanism for all installation telemetry.
  7. Add a regression test confirming that authorization requests omit device_name unless the user explicitly enables it.
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 (34)

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The requested scopes include unrelated media capabilities such as video, music, speech, and voice read/write that are not supported by the skill description. This broadens access unnecessarily and creates opportunities for misuse of the shared credential for other generation services or data domains.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill also covers uninstall logic, local inventory inspection under ~/.beatra, credential/state-file deletion, token revocation, and shared connection-state management, which are administrative behaviors outside the stated creative purpose. When destructive local cleanup and shared-state manipulation are hidden behind an innocuous description, users and hosts cannot properly assess the risk of data loss, credential disruption, or cross-skill side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill also covers uninstall logic, local inventory inspection under ~/.beatra, credential/state-file deletion, token revocation, and shared connection-state management, which are administrative behaviors outside the stated creative purpose. When destructive local cleanup and shared-state manipulation are hidden behind an innocuous description, users and hosts cannot properly assess the risk of data loss, credential disruption, or cross-skill side effects.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill also covers uninstall logic, local inventory inspection under ~/.beatra, credential/state-file deletion, token revocation, and shared connection-state management, which are administrative behaviors outside the stated creative purpose. When destructive local cleanup and shared-state manipulation are hidden behind an innocuous description, users and hosts cannot properly assess the risk of data loss, credential disruption, or cross-skill side effects.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · manifest.json (reported line 72)May include surrounding context.

json
```

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/installation-and-auth.md (reported line 14)May include surrounding context.

text

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/installation-and-auth.md (reported line 21)May include surrounding context.

text

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/installation-and-auth.md (reported line 49)May include surrounding context.

text

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/mcp-connection.md (reported line 10)May include surrounding context.

text

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/authorize.py (reported line 207)May include surrounding context.

python
```

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/authorize.py (reported line 514)May include surrounding context.

python
```

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/mcp_client.py (reported line 1025)May include surrounding context.

python
```

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/uninstall.py (reported line 40)May include surrounding context.

python
```

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/uninstall.py (reported line 109)May include surrounding context.

python
```

They share the one full-scope Device Token stored in
`~/.beatra/credentials.json`. Installing or switching packages must not trigger
another authorization when that credential is already valid. Do not add,
enable, trust, or configure a host Beatra Connector. Never print or move the
token into command arguments, environment variables, logs, chat, or another

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The OAuth scope string requests many capabilities that are not needed for an image-studio skill, including video, music, speech, voice management, wallet spending, and task controls. Overbroad scopes violate least privilege and materially increase blast radius if the token is abused, leaked, or the backend later honors more actions than the skill actually needs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The requested scopes include unrelated media capabilities such as video, music, speech, and voice read/write that are not supported by the skill description. This broadens access unnecessarily and creates opportunities for misuse of the shared credential for other generation services or data domains.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
96% confidence
Finding

Exposing self-update functionality in a skill client allows the package to modify its own code on disk, which is a powerful primitive outside the declared image-studio role. In the context of an agent skill, self-modification is especially dangerous because it can silently change future behavior, expand capabilities, and persist compromised code if the update source or release process is ever abused.

Content

Scanner excerpt · scripts/mcp_client.py (reported line 1503)May include surrounding context.

python
)
    update = subparsers.add_parser(
        "update",
        help="Check, install, or configure Beatra package self-updates",
    )
    update.add_argument(
        "--check",

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares broad operational behavior that includes shell, file, network, and environment interactions, but it does not expose an explicit tool/permission scope in the manifest. That weakens least-privilege guarantees and makes it harder for users or hosts to understand and constrain what the skill can do, especially given its ability to upload files, manage credentials, and invoke remote operations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation states that the bundled client silently checks for and applies newer releases as part of ordinary command execution. Self-update behavior materially changes local code after installation, creating supply-chain and trust-boundary risk that goes beyond the stated image-editing function, especially if users do not expect the package to modify itself over time.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

An automatic download-and-replace mechanism gives the skill ongoing authority to fetch and install new local code, which is a powerful capability unrelated to basic image creation. Even with integrity checks, this increases the blast radius of any compromise in the vendor update channel, signing process, or package ownership logic, and turns a content-generation skill into a persistent software installer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill says newer releases install without separate confirmation, but the top-level skill description does not clearly warn that local package files may be silently modified. Silent mutation of installed code undermines informed consent and makes the skill more dangerous in context because it already has file, network, and execution-related capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This manifest file describes a cloud-backed AI image studio and also specifies a remote MCP endpoint, indicating prompts and images are likely sent off-device for processing. The user-facing descriptions do not disclose this privacy-relevant behavior, which is a missing warning for a skill handling potentially sensitive visual and textual content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document states that the client performs silent automatic update checks by default and installs higher versions automatically without separate confirmation. Even though the text describes integrity checks and rollback protections, silently replacing installed files changes executable behavior without an explicit upfront opt-in, which creates a supply-chain and user-consent risk if the update channel is ever compromised or if users are unaware of the default behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill describes submitting prompts, source images, and billable image operations to an external service, but it does not clearly disclose that user-provided content will be transmitted off-platform. In an image-editing skill, prompts and images often contain sensitive personal, commercial, or copyrighted material, so lack of disclosure can lead to unintended data exposure and consent/privacy failures.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/installation-and-auth.md (reported line 64)May include surrounding context.

md
the user signs in or creates their account there, and the approval page
  continues automatically after sign-in;
- say once that the connection continues automatically after Allow, then
  detect completion yourself — never ask the user to confirm in chat that
  they approved.

Approval legitimately takes minutes when sign-in or account creation is

Static analysis

No suspicious patterns detected.