T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/authorize.py:31- Finding
Device Authorization Requests Permissions Beyond the Skill's Functional Requirements
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill's core copywriting purpose is clear, but it bundles broad paid-service authority, arbitrary local file upload, and silent self-updating that users should review before installing.
Install only if you are comfortable granting a shared Beatra credential with broad media, artifact, task, and wallet authority. Consider disabling automatic updates with the documented update command, avoid using the upload subcommand unless you intentionally choose the exact file, and treat paid lookup or cover generation as requiring clear price and action confirmation.
scripts/authorize.py:31Device Authorization Requests Permissions Beyond the Skill's Functional Requirements
scripts/mcp_client.py:1428Bundled Client Can Read and Upload Arbitrary Local Files
scripts/mcp_client.py:969Automatic Updates Silently Replace Executable Package Files
scripts/authorize.py:348Authorization and Registration Collect Persistent Host and Agent Telemetry
Requesting wallet:spend gives the skill authority to spend user funds even though the skill description is about copywriting, cover generation, and Xiaohongshu research. A compromised skill, stolen token, or backend misuse could turn this into direct financial loss, making the mismatch between requested privilege and expected behavior especially dangerous.
The skill also includes uninstall and cleanup behaviors that inspect and modify local Beatra state, revoke authorization remotely, and remove files unrelated to copy generation. Embedding administrative lifecycle actions inside a content skill makes the package more dangerous because a user or host may grant trust based on the narrow declared purpose while the package can alter local installation state and credentials.
The skill also includes uninstall and cleanup behaviors that inspect and modify local Beatra state, revoke authorization remotely, and remove files unrelated to copy generation. Embedding administrative lifecycle actions inside a content skill makes the package more dangerous because a user or host may grant trust based on the narrow declared purpose while the package can alter local installation state and credentials.
The skill also includes uninstall and cleanup behaviors that inspect and modify local Beatra state, revoke authorization remotely, and remove files unrelated to copy generation. Embedding administrative lifecycle actions inside a content skill makes the package more dangerous because a user or host may grant trust based on the narrow declared purpose while the package can alter local installation state and credentials.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
```
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
```
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
```
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
```
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
The OAuth scope string requests many powerful capabilities far beyond the stated function of generating Xiaohongshu copy and doing limited platform research, including artifacts, media generation, voice operations, task control, and wallet spending. Overbroad authorization violates least privilege and materially increases blast radius if the token is misused, leaked, or the backend/tooling behaves unexpectedly.
The exposed self-update capability enables the package to modify its own local code and supporting files. Self-modifying behavior is particularly risky in an agent skill because it expands the trust boundary from a static reviewed package to a remotely mutable one, which can undermine review, reproducibility, and operator control even if the current update path uses checksums.
)
update = subparsers.add_parser(
"update",
help="Check, install, or configure Beatra package self-updates",
)
update.add_argument(
"--check",
The script explicitly targets credentials.json as part of the shared ~/.beatra state it manages. Access to credential-bearing files is sensitive because any code path that can read, use, or delete them can impact authentication for other skills, and this is especially concerning in a skill whose advertised purpose is unrelated to credential management.
#: 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",
The _device_token function reads access_token from credentials.json and passes it to revocation logic, meaning the skill code can directly access and use a bearer credential. Direct bearer-token access is high risk because any malicious modification of the package, unexpected execution context, or future code change could exfiltrate or misuse the token beyond simple uninstall behavior.
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):
The skill declares no explicit tool scope while instructing use of shell, network access, filesystem operations, and environment-dependent behavior through a bundled client. That broad undeclared capability increases the chance of over-privileged execution, hidden side effects, and accidental misuse because reviewers and hosts cannot easily constrain what the skill may access.
The instructions say to default to five titles and a 250–500 Chinese-character note body unless another language is requested. This imposes a specific language/locale by default rather than offering a user choice or requiring opt-in, which can violate language/locale policy expectations.
The skill enables silent automatic updates that download and replace package-owned files without separate confirmation, yet this is not prominently disclosed in the top-level description. Even with integrity checks described, silent code replacement in a skill that already has shell/network/file capabilities raises supply-chain and trust risks because behavior can change after installation without meaningful user awareness.
The manifest positions the skill around trilingual SEO and provides localized metadata for English, Japanese, and Chinese, but the skill branding and descriptions center a specific platform/locale context without stating that language choice is user-selectable. Under the policy, locale or language constraints should be offered as a user choice or explicitly justified.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
"icon": "https://beatra.ai/textures/icons/zhongcao-note-copywriter-0.1.1.png",
"localized": {
"en": {
"description": "Create Xiaohongshu or REDnote copy from a product, experience, topic, or audience brief. This AI Xiaohongshu copywriter produces title options, a structured note body, cover wording, relevant hashtags, and a natural comment starter for product discovery, local experiences, beauty, food, fashion, travel, and knowledge posts. It then renders a matching vertical 3:4 Xiaohongshu cover built around the chosen title, with a headline-safe composition. Optionally it reads Xiaohongshu itself — the notes already running for the topic, one page of a note's top comments, and an account's own recent notes — so Xiaohongshu research, competitor note analysis and comment analysis rest on the platform instead of on guesswork.",
"display_name": "Zhongcao Note Copywriter",
"summary": "Turn a product, experience, topic, or audience brief into Xiaohongshu title options, a readable note body, cover text, hashtags, and a natural comment starter.",
"tags": [
The manifest advertises reading Xiaohongshu notes, top comments, and recent account posts, but it provides no user-facing disclosure about what data is accessed, how it is used, retained, or shared. Even if the data is platform-visible, combining and processing it for competitor/account analysis can create privacy, consent, and compliance risk for users who invoke the skill without understanding the scope of collection.
The document explicitly states that the client silently checks for and automatically installs newer releases by default, without separate confirmation. Even though the text describes integrity checks and rollback protections, automatic code replacement without explicit user consent materially changes installed software and expands supply-chain risk if the update source, signing process, or release pipeline is ever compromised.
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.
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
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.
**The two topic operations are deliberately absent.** `social.xiaohongshu.topic.get` and
`social.xiaohongshu.topic.notes.list` both require an opaque `page_id`, and nothing on this
whitelist returns one. They are 60-credit calls this Skill could never legitimately make,
so they are not on the list. Do not ask the user for a `page_id`; search by keyword
instead.
## Turning what the user has into arguments
No suspicious patterns detected.