Back to skill

Security audit

douyin-data-brief

Security checks for vulnerabilities and agentic risk

Overview

The skill can produce Douyin briefs, but it also requests broad Beatra account powers, silently self-updates, and manages shared credentials beyond the narrow briefing purpose.

Review before installing. Use it only if you trust Beatra with a shared full-scope device authorization, possible paid lookups after confirmation, package registration telemetry, and silent package updates. Consider disabling automatic updates with `python3 scripts/mcp_client.py update --auto off`, and avoid installing in environments that require narrow OAuth scopes or host-mediated credential handling.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill declares itself as a simple Douyin briefing workflow, yet it explicitly instructs use of a bundled Python client with shell execution, network access, file read/write, and credential handling. That undeclared capability expansion increases the attack surface and can mislead users or policy engines into granting trust to a package that can execute local code, persist secrets, and modify files.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The documented behavior goes far beyond producing a Douyin brief: it includes OAuth authorization, persistent credential storage, arbitrary Beatra tool invocation, telemetry/registration, file upload capability, uninstall logic, and self-updating code. This description-behavior mismatch is dangerous because users may authorize a narrowly described analytics skill without realizing it can obtain tokens, communicate broadly with a remote service, and replace its own package files.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The skill’s execution path includes package self-update and file replacement, which are unrelated to generating a one-page Douyin brief. Any mechanism that can overwrite package-owned files creates a supply-chain and local integrity risk, especially when bundled into a skill whose primary purpose does not require self-modifying behavior.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
An automatic code update mechanism that downloads and installs new releases gives the package an ongoing ability to change behavior after initial review. Even with claimed verification checks, auto-update materially increases the blast radius of an upstream compromise, signing failure, repository takeover, or logic bug in the updater.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The file contains operational guidance for Beatra asynchronous task management that is unrelated to the skill’s stated purpose of producing Douyin briefs. This kind of cross-domain instruction can misdirect an agent into invoking or prioritizing the wrong tools, causing unintended external actions, data mix-ups, or incorrect billing/task handling in a workflow that should be focused on Douyin analysis.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The skill requests a very broad OAuth scope set, including artifacts, tasks, media generation, voices, and wallet spending, even though the stated purpose is only to produce a Douyin analytics brief. This violates least-privilege and means that if the skill, its backend, or stored token is abused, an attacker could exercise unrelated capabilities far beyond the user’s reasonable expectations for this package.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
Requesting wallet spending and multiple generation capabilities is especially dangerous in this skill context because a Douyin brief tool has no obvious need to spend funds or generate images, videos, music, speech, or manage voices. If compromised or misused, the token could trigger unauthorized charges or abuse high-impact capabilities under the user’s account.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The client contains extensive self-update logic that downloads manifests and archives from remote infrastructure and replaces local package files, behavior that is unrelated to generating a Douyin brief. Even with checksum and path validation, this creates a remote code modification channel inside a content-analysis skill, increasing supply-chain risk and allowing the skill's behavior to change after installation without the user reviewing new code.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill records installation telemetry, platform data, and a local inventory of installed skills, which is not necessary for producing Douyin analytics output. This expands data collection and persistence beyond the advertised purpose, creating privacy and tracking risk and making the skill harder to justify under least-privilege principles.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The code fingerprints the host environment using environment variables and host.json to determine the agent platform, then propagates that information in tool calls and registration data. For a Douyin brief skill, this collection is not functionally required and increases privacy exposure while enabling endpoint profiling across installations.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
This skill's uninstall path handles shared Beatra device authorization and local connection state, which is unrelated to the advertised Douyin analytics purpose and gives the package authority over cross-skill credentials. Even though the code is conservative and tries to avoid accidental revocation, the capability itself expands trust boundaries: a compromised or modified skill package could interfere with other installed skills or remove shared access.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The uninstall logic can POST a bearer token to a revoke endpoint and delete shared files under ~/.beatra, including credentials and inventory. That is a high-impact capability because it affects authentication and state beyond this single Douyin skill; if abused, it can disconnect other skills or destroy forensic/state information needed for recovery.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The document states that the client silently checks for updates and automatically installs newer releases by default without separate confirmation. Even with integrity checks, trusted-source pinning, rollback, and file ownership restrictions, this behavior modifies local files without explicit upfront consent, which can violate user expectations and create supply-chain risk if the official update channel is ever compromised.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The documentation states that the client automatically performs an installation registration call and writes a local cache file, but it does not prominently warn users that metadata will be transmitted externally and persisted on disk. This creates a transparency and consent problem: users or operators may unknowingly disclose environment-identifying information or violate internal policies that restrict unsolicited outbound network traffic or local state changes.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The workflow explicitly states that each `beatra.social.execute` lookup incurs a charge, but it does not require explicit user consent immediately before initiating that billable action. In an agent setting, this creates a real risk of unauthorized spending or surprise charges if the system performs a paid lookup based on an ambiguous or inferred request.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The client can silently auto-update in the background before normal commands run, modifying installation files without a contemporaneous user-facing prompt. In the context of an analytics skill, this weakens user control and review of code changes, making any compromise of the update channel or publisher trust more consequential.

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
79% confidence
Finding
Referencing credentials.json as part of the files this script may delete indicates the skill is aware of and allowed to manipulate shared authentication material. In this context, the danger is not mere string presence but that the package is coupled to credential storage and cleanup, which is unnecessary for a content-analytics skill and increases the blast radius of any compromise.

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
93% confidence
Finding
This function reads an access token directly from credentials.json and uses it for revocation, giving the skill direct access to bearer credentials. Direct token access is highly sensitive because any code execution in the skill context could repurpose the token for unauthorized API calls or revoke shared authorization unexpectedly.

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
97% confidence
Finding
The exposed self-update capability enables the package to replace its own installed files, which is a form of self-modification. In a skill whose declared purpose is Douyin analysis, that capability is overprivileged and materially raises the impact of any publisher compromise, update-channel failure, or user misunderstanding about what code is executing.

Static analysis

No suspicious patterns detected.