Back to skill

Security audit

tax-policy-brief-clip

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it asks for broad Beatra account powers and silently self-updates local package code by default.

Install only if you are comfortable giving this Beatra package a shared account credential with broad generation and tool access, and with default-on silent package updates. Consider disabling automatic updates with the documented update command and prefer a version with narrower OAuth scopes and a tool allowlist.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/authorize.py:34
Finding
Overprivileged OAuth Scope and Unrestricted MCP Tool Dispatch## Vulnerability Details **File Location**: `scripts/authorize.py:34-37`; `scripts/mcp_client.py:1458-1476`; `scripts/mcp_client.py:1515-1516` **Vulnerability Type**: Least-privilege violation and unrestricted remote tool invocation **Risk Level**: Medium ### Vulnerable Code `scripts/authorize.py:34-37`: ```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" ) ``` `scripts/mcp_client.py:1458-1476`: ```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}, ) ``` `scripts/mcp_client.py:1515-1516`: ```python call = subparsers.add_parser("call", help="Call one tool with a JSON object on stdin") call.add_argument("tool_name") ``` ### Technical Analysis The Skill’s declared workflow requires image generation, speech synthesis, video animation, media upload and retrieval, model and voice discovery, task polling, limited billing queries, and installation registration. The authorization request nevertheless includes capabilities outside that workflow, notably `music:generate` and `voices:write`. This broad authorization is combined with a generic command dispatcher that accepts any MCP tool name from a command-line argument and forwards it to ...[truncated 2346 chars]
Remediation
## Remediation Suggestions 1. **Reduce the authorization scope** - Remove `music:generate` because the declared workflow performs no music generation. - Remove `voices:write` unless the Skill has a documented, user-approved voice-management feature. - Review whether `tasks:cancel` is required by default or should be requested only when the user explicitly asks to cancel a task. - Request only the minimum artifact, model, voice-read, generation, task-read, and billing permissions needed by this package. 2. **Add a strict MCP tool allowlist** - Reject any tool name not explicitly required by the Skill. - Include only documented operations such as required model and voice discovery, image generation, speech synthesis, video animation, asset upload, task retrieval, narrowly scoped wallet reads, and installation registration. - Keep administrative and unrelated generation tools outside the allowlist. 3. **Separate privilege levels** - Use read-only authorization for discovery, task inspection, wallet balance, and ledger queries. - Require a separate explicit approval before enabling spending, cancellation, resource modification, or other state-changing capabilities. - If supported by the backend, use a package-specific credential instead of one shared full-scope credential across multiple Skills. 4. **Validate calls against the declared workflow** - Check both the tool name and argument schema locally. - Require explicit user confirmation before billable or destructive calls. - Deny unknown tools by default, even if the remote server advertises them. 5. **Add security regression tests** - Verify that `music:generate`, voice-write operations, and unknown tool names are rejected. - Verify that required image, speech, video, upload, task, and read-only billing operations continue to function with the reduced scope.
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 (20)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares no permissions, yet its instructions clearly rely on shell execution, local file access, network calls, environment use, and package/file modification through the bundled client. This creates a hidden capability gap that prevents informed consent and weakens sandboxing or policy enforcement, especially because the skill can upload local media and invoke remote operations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill is presented as a simple tax-policy media-generation workflow, but it also performs sensitive account authorization, persists bearer credentials, uploads files, calls arbitrary remote MCP tools, sends installation telemetry, supports uninstall-side credential revocation, and includes self-update behavior. This broad hidden behavior materially expands the trust boundary and could expose credentials, local data, or system integrity far beyond what a user would expect from the stated purpose.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The requested OAuth scope bundle is far broader than the skill’s stated purpose of turning tax-policy source material into a still, speech brief, and short clip. It includes unrelated high-risk capabilities such as wallet spending, generic MCP tool access, voice management, and task cancellation, violating least-privilege and increasing the blast radius if the skill or its credentials are abused.

Context-Inappropriate Capability

Critical
Confidence
97% confidence
Finding
Including mcp:tools and tasks:cancel grants broad control outside the narrow clip-generation workflow, enabling use of arbitrary MCP tools or cancellation of unrelated tasks. In the context of a tax-policy briefing skill, these permissions materially expand what a stolen or abused token could do across the user’s environment.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
Including mcp:tools and tasks:cancel grants broad control outside the narrow clip-generation workflow, enabling use of arbitrary MCP tools or cancellation of unrelated tasks. In the context of a tax-policy briefing skill, these permissions materially expand what a stolen or abused token could do across the user’s environment.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
Including mcp:tools and tasks:cancel grants broad control outside the narrow clip-generation workflow, enabling use of arbitrary MCP tools or cancellation of unrelated tasks. In the context of a tax-policy briefing skill, these permissions materially expand what a stolen or abused token could do across the user’s environment.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The client includes a full self-update subsystem that downloads manifests and archives, verifies them, and mutates the local installation tree, which is unrelated to generating tax policy brief clips. Even with checksum and path checks, embedding autonomous code replacement in a content-production skill expands the trust boundary substantially and creates a supply-chain and persistence mechanism if the update channel or vendor account is compromised.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The skill records installation telemetry and a device-local skill inventory unrelated to the stated tax-policy briefing purpose, including platform and install path metadata. This creates unnecessary data collection and local persistence behavior that broadens privacy exposure and may aid tracking or later lifecycle actions without a clear user need.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The CLI exposes a generic tools/list and tools/call dispatcher that can invoke arbitrary Beatra tools using shared credentials, far beyond the narrow task of creating a tax policy brief clip. In skill context, this is dangerous because it turns a domain-specific package into a general remote capability broker, increasing the chance of privilege misuse, data access outside scope, and abuse if chained by other components.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
This code performs device-token revocation against a shared Beatra authorization endpoint during uninstall. Even though it tries to avoid revoking while other skills remain, this is still privileged platform-state management unrelated to the advertised tax-policy clip functionality, and a compromised or misleading skill could use the same mechanism to disrupt other installed skills by revoking a shared credential.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The script deletes files in ~/.beatra including credentials, installation, host, skills, and registrations state, which are clearly global/shared application artifacts rather than assets specific to this tax-policy skill. That creates cross-skill impact: uninstalling this package can erase shared state and disconnect unrelated skills, causing denial of service and loss of local platform configuration.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The code reads the global skills inventory and reasons about other installed skills to decide whether a shared device authorization should be kept or revoked. That gives this skill visibility into the local skill inventory and authority over shared connection handling, which exceeds what a tax-policy clip generator should need and increases the blast radius if the package is tampered with.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill documents silent automatic updates that download and replace package-owned files without separate confirmation, but this behavior is not prominently disclosed near the summary of what the skill does. Silent self-modification increases supply-chain and integrity risk because users may execute materially changed code after installation without clear awareness or renewed consent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document explicitly states that the client silently checks for and automatically installs newer releases by default without separate confirmation. Even with later claims of fixed sources, checksum verification, and rollback, silently replacing executable package files changes the local system state without clear user consent, which creates supply-chain and trust risks if the update channel, signing process, or publisher account is ever compromised.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The document describes automatic installation registration to a remote service and persistence of registration state in a local file, but it does not clearly warn users that metadata will be transmitted and stored. Even though the data is described as non-secret and non-billable, undisclosed telemetry and local persistence can create privacy, compliance, and trust issues, especially in managed or regulated environments.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The standalone Chinese text `筹划` introduces an unexplained language switch in a workflow that otherwise states language should be driven by advisor-supplied facts and requirements. This can cause the skill to emit Chinese content without user request, creating output-integrity and usability issues, especially in compliance-sensitive tax communications where unintended language changes may mislead recipients or require costly rework.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The code requests several high-impact permissions but only prints generic authorization instructions, without explicitly warning the user about sensitive capabilities such as wallet spending or voice management. This undermines informed consent and makes overprivileged access more likely to be approved without understanding the risk.

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
91% confidence
Finding
The presence of credentials.json in the list of files this skill uninstall process manages shows the package is designed to handle shared credential material. Even though the current code deletes rather than exfiltrates the file, direct skill-level access to shared credentials is dangerous because any future modification or malicious variant could read, misuse, or leak tokens outside the skill's stated purpose.

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
97% confidence
Finding
This function opens ~/.beatra/credentials.json and extracts an access token for use in an authenticated revocation request. Reading a shared bearer token from disk gives the skill direct credential access far beyond tax-policy media generation, and if abused or repurposed it could enable unauthorized API actions, token theft, or disruption of all skills using that device authorization.

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
96% confidence
Finding
The exposed self-update command enables local package self-modification, which is not necessary for a tax-policy brief generation skill and materially increases risk. Even though the implementation includes several integrity checks, self-modifying behavior creates a privileged persistence/update path that can be abused through supply-chain compromise or social engineering to alter code on disk.

Static analysis

No suspicious patterns detected.