Back to skill

Security audit

AI Photo Restyler

Security checks for vulnerabilities and agentic risk

Overview

The skill does photo restyling, but it also requests broad Beatra account permissions and silently self-updates local code by default.

Install only if you are comfortable granting Beatra a shared credential that can cover more than photo restyling, including wallet-spend and other media capabilities. Consider disabling automatic updates immediately after install, and review Beatra console/device revocation controls before using it with sensitive photos or an account balance.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/authorize.py:34
Finding

Image-restyling Skill requests a shared bearer token with excessive cross-media and wallet privileges

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/mcp_client.py:969
Finding

Silent self-updater retrieves and installs remotely changeable executable Skill code

Content
View full analysis
dict[str, Any]: path = update_home / "state.json" try: value = json.loads(path.read_text(encoding="utf-8")) except (OSError, json.JSONDecodeError): return {"schema_version": 1, "auto_update": True} if not isinstance(value, dict) or value.get("schema_version") != 1: return {"schema_version": 1, "auto_update": True} return value ``` The automatic path downloads and applies a remote package without per-update confirmation: ```python checked = check_update(get_bytes=get_bytes) if not checked["update_available"]: return False _ensure_owned_baseline( install_root=resolved_root, update_home=update_home, get_bytes=get_bytes, ) discovery = checked["discovery"] manifest, new_files = download_update(discovery, get_bytes=get_bytes) _apply_update( install_root=resolved_root, update_home=update_home, discovery=discovery, manifest=manifest, new_files=new_files, ) return True ``` It runs before ordinary commands: ```python else: maybe_auto_update() ``` The updater permits replacement of the client itself, deliberately placing it last: ```python ordered_new = sorted( new_files, key=lambda path: (path == "scripts/mcp_client.py", path), ) ``` ### Technical Analysis The updater contains several good defensive measures: - HTTPS is required. - Redirects are refused. - Package, channel, locale, version, and CDN paths are constrained. - Archive and file sizes are bounded. - Path traversal, symlinks, duplicate paths, and unsafe archive members are rejected. - Manifest, archive, and i ...[truncated 2881 chars]
Remediation
View remediation

other

Note
Location
scripts/authorize.py:362
Finding

Authorization helper collects and transmits the local hostname without a dedicated opt-out

Content
View full analysis
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] ``` It persists the value locally: ```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 then included in the remote device-authorization request: ```python if device_name: form["device_name"] = device_name status, created = post_form(DEVICE_AUTHORIZATION_URL, form) ``` The collection is automatic: ```python host_platform = detect_host_platform(platform) device_name = device_display_name() write_host_config(state_dir, platform=host_platform, device_name=device_name) ``` ### Technical Analysis The hostname is used as a recognizable device label in the Beatra console. This is a legitimate convenience feature, but it is not necessary to transform an image or establish an OAuth device flow. A random installation identifier already exists a ...[truncated 1943 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation for a creative image tool also covers uninstall flows, local state mutation under ~/.beatra, credential access, token revocation, and package lifecycle management. Embedding administrative and credential-sensitive operations in a consumer-facing art skill is risky because it expands the blast radius from media processing into account, host, and installation management.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation for a creative image tool also covers uninstall flows, local state mutation under ~/.beatra, credential access, token revocation, and package lifecycle management. Embedding administrative and credential-sensitive operations in a consumer-facing art skill is risky because it expands the blast radius from media processing into account, host, and installation management.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation for a creative image tool also covers uninstall flows, local state mutation under ~/.beatra, credential access, token revocation, and package lifecycle management. Embedding administrative and credential-sensitive operations in a consumer-facing art skill is risky because it expands the blast radius from media processing into account, host, and installation management.

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 71)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

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The authorization scope is far broader than the skill's stated purpose of photo restyling. Requesting wallet spending, task control, voice, speech, music, and video permissions violates least privilege and would let a compromised or misused skill access unrelated capabilities and potentially incur charges or manipulate user resources.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This client contains extensive package lifecycle logic—discovery, download, verification, extraction, rollback, locking, and file replacement—despite the skill being presented as a photo restyling tool. Even though there are integrity checks, bundling autonomous installation-management behavior into a creative skill materially expands attack surface and gives remote infrastructure the ability to change local code over time, which is especially concerning when updates may occur automatically.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
94% confidence
Finding

The CLI exposes explicit self-update functionality for the installed package, enabling the skill to replace its own code on disk. In the context of a photo-restyling skill, self-modification is unnecessary and dangerous because it enlarges the blast radius of any compromise in the update channel or vendor infrastructure and undermines the expectation of static reviewed code.

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",

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The script is designed to access and delete shared state files including credentials.json, showing that this skill package can interact with authentication material outside its stated functionality. Access to shared credential storage by an unrelated media-processing skill increases blast radius: a compromised or modified package could read, misuse, or destroy credentials affecting the whole Beatra environment.

Content

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

python
#: 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",

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The _device_token function reads an access token from credentials.json so it can be used in an Authorization header for remote revocation. Direct token access by a photo-restyling skill is dangerous because any code execution in the package can repurpose that token for unauthorized API actions or exfiltration, extending impact beyond this single skill.

Content

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

python
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):

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares no explicit tool scope even though its instructions rely on powerful capabilities including shell, network, file read/write, and environment access. That absence of least-privilege boundaries increases the chance that the host agent can invoke broader capabilities than required for simple photo restyling, especially given the skill also performs registration, updates, and remote operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes self-updating package behavior unrelated to its core photo-restyling function. Even with integrity claims, embedded self-update logic introduces a software supply-chain and persistence mechanism into a content-processing skill, increasing risk if the update channel, package signing, or client is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill allows automatic package updates without separate user confirmation. Silent updates reduce user control and can turn the skill into a moving trust target, where future code with different behavior is introduced after the original review or consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The changelog text says to lead with the Simplified Chinese display name, which is a natural-language locale preference embedded in the manifest. This appears to impose a language/locale ordering choice without indicating user choice or a region-specific justification, matching the policy-violation category.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document states that the client silently checks for updates by default and automatically installs a newer release without separate confirmation. Even though the text describes integrity checks and rollback protections, silently modifying installed code expands the trust boundary and removes explicit user consent, which is dangerous in an agent context because future package behavior can change before ordinary commands run.

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

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The code fingerprints the host agent platform from environment variables and captures the device hostname, then persists and later transmits that metadata. For a photo restyling skill, this data is not obviously necessary and increases privacy and tracking risk by exposing details about the user's environment beyond the core function.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill writes a persistent local inventory of installed skills and install paths, which creates unnecessary local surveillance data unrelated to transforming photos. This expands the sensitivity of local state and could reveal user tooling, filesystem layout, and usage patterns if accessed by other software or through later compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

maybe_auto_update() can silently check for, download, and apply code updates during normal command execution, without user-facing notice at the moment of modification. Even with checksum validation, silent code replacement changes the local trust boundary and can convert a later server/CDN compromise into immediate code execution on user systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.