Back to skill

Security audit

bilibili-thumbnail-maker

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real thumbnail-making Beatra integration, but it persists broad account permissions and silently updates its own code, so it needs Review before installation.

Install only if you trust Beatra with a shared device credential that can spend credits and access broader media/task tools than thumbnails require. Consider disabling automatic updates immediately with the documented update --auto off command, and revoke the Beatra device from the console if you stop using the skill.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/authorize.py:34
Finding

Excessive OAuth scopes and unrestricted remote tool invocation

Content
View full analysis
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}, ) ``` ```python call = subparsers.add_parser("call", help="Call one tool with a JSON object on stdin") call.add_argument("tool_name") ``` ### Technical Analysis The declared Skill functionality is Bilibili thumbnail generation and refinement. It legitimately requires image generation or editing, selected-file upload, artifact access, task tracking, and the ability to pay for approved image work. The authorization request additionally obtains video generation, music generation, speech generation, and voice read/write privileges. These capabilities are not necessary for thumbnail creation. The credential also includes general MCP tool and wallet-spending access. The client compounds this excessive authorization by accepting an arbitrary `tool_name` from the command line and forwarding it ...[truncated 1629 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/mcp_client.py:969
Finding

Silent remote payload retrieval and executable package replacement without independent signature verification

Content
View full analysis
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_json(update_home / "state.json", state) checked = check_update(get_bytes=get_bytes) if not checked["update_available"]: return False _ensure_owned_baseline( install_root=resolved_ ...[truncated 4029 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/mcp_client.py:1044
Finding

Windows bearer credential confidentiality relies on unverified inherited ACLs

Content
View full analysis
None: # POSIX gets explicit 700/600. On Windows the state directory lives under # the user profile, whose default ACL is already private to the user — # the same posture as gh/aws/gcloud credential stores. The former custom # DACL ceremony was dropped deliberately: its command patterns read as # hostile to agent safety policies and endpoint security, failing installs # while adding no protection an elevated administrator could not bypass. path.mkdir(mode=0o700, parents=True, exist_ok=True) if os.name == "posix": path.chmod(0o700) def _restrict_file(path: Path) -> None: if os.name == "posix": path.chmod(0o600) ``` ```python def _read_private_credentials(state_dir: Path, path: Path) -> str: if os.name == "nt": # The state directory lives under the user profile, whose default # ACL is already private to the user (the gh/aws/gcloud posture). # The former custom DACL verification was dropped deliberately: its # command patterns read as hostile to agent safety policies and # endpoint security, failing installs while adding nothing an # elevated administrator could not bypass. return path.read_text(encoding="utf-8") ``` ### Technical Analysis On POSIX systems, authorization explicitly sets the state directory to mode `0700` and credential files to mode `0600`. The client later verifies directory type, file type, ownership, and exact permissions before reading the token. On Windows, the code neither creates an explicit restrictive DACL nor verifies the inherited DACL before reading `credentials.json`. It assumes that every user-profile directory has an ...[truncated 1744 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation references uninstall and disconnect behavior that reads and modifies local state, accesses credentials, performs authenticated revocation, and removes package files—operations far outside thumbnail creation. Bundling package teardown and credential-affecting operations into a creative skill broadens trust requirements and increases the chance of unintended destructive actions on the host.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation references uninstall and disconnect behavior that reads and modifies local state, accesses credentials, performs authenticated revocation, and removes package files—operations far outside thumbnail creation. Bundling package teardown and credential-affecting operations into a creative skill broadens trust requirements and increases the chance of unintended destructive actions on the host.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation references uninstall and disconnect behavior that reads and modifies local state, accesses credentials, performs authenticated revocation, and removes package files—operations far outside thumbnail creation. Bundling package teardown and credential-affecting operations into a creative skill broadens trust requirements and increases the chance of unintended destructive actions on the host.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

md
Use only this Skill's bundled `scripts/mcp_client.py` for every remote Beatra

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 101)May include surrounding context.

md
Use only this Skill's bundled `scripts/mcp_client.py` for every remote Beatra

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
Use only this Skill's bundled `scripts/mcp_client.py` for every remote Beatra

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 103)May include surrounding context.

md
Use only this Skill's bundled `scripts/mcp_client.py` for every remote Beatra

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 60)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
99% confidence
Finding

The OAuth scope request is dramatically overbroad for a thumbnail-making skill. It includes wallet spending plus unrelated generation, voice, and task capabilities, so if the credential is granted or later stolen, the skill can act far beyond its stated purpose and violate least-privilege.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Requesting wallet:spend and broad media/task permissions for a Bilibili thumbnail maker creates a privilege mismatch between advertised function and actual authority. This is especially dangerous because users may consent expecting image-only behavior, while the issued token can authorize spending or other non-thumbnail operations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file implements a full self-update and self-modifying package mechanism, including downloading manifests and archives and replacing installation files, which is unrelated to the advertised thumbnail-making purpose. Even with checksum and path validation, this materially expands the trust boundary: a creative skill can silently alter its own codebase and persist new behavior on the host.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
95% confidence
Finding

The explicit self-update command exposes a self-modification capability in a skill whose stated purpose is thumbnail creation, enabling remote code replacement on the local installation. Although some integrity checks exist, the mere presence of self-modifying behavior substantially raises risk because compromise of the vendor update channel or trust model would directly lead to persistent code execution changes.

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
87% confidence
Finding

The script explicitly enumerates credentials.json among files it owns and removes, showing awareness of and access to shared credential material. In the context of a thumbnail-maker skill, any access path to shared credentials is over-privileged and dangerous because it could be extended to read, misuse, or destroy authentication state used by other skills.

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
96% confidence
Finding

The _device_token function reads ~/.beatra/credentials.json and extracts an access token for subsequent remote use. Direct token access by a skill package is especially risky here because the skill's stated purpose is image/thumbnail creation, so credential handling is unjustified and creates an opportunity for account-impacting abuse if the package is modified or malicious.

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
93% confidence
Finding

The skill declares a narrow thumbnail-generation purpose, but the analysis indicates it can access environment data, local files, shell, and network without any explicit tool-scope restrictions. This creates unnecessary privilege and makes it harder for users or a host platform to constrain what the skill may do, increasing the blast radius if the bundled client is compromised or misused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly permits a bundled client to auto-update and install newer code, which is unrelated to thumbnail creation and materially changes the local codebase after initial trust is granted. Any updater broadens the attack surface and can convert a benign creative tool into a software-delivery mechanism if the update channel, package metadata, or signing workflow is ever compromised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation authorizes automatic package updates and replacement of package-owned files despite the manifest presenting the skill as a thumbnail creator. This creates a hidden software installation pathway under the guise of a media tool, weakening informed consent and exposing the host to code changes not obviously connected to the skill's advertised function.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Allowing automatic client updates without separate confirmation, while only mentioning it deep in documentation, undermines informed user consent for code-changing behavior. In the context of a thumbnail-making skill, hidden update semantics are especially risky because users do not reasonably expect a design workflow to modify installed software in the background.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.