Back to skill

Security audit

书签智析专业版

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent X bookmark-analysis purpose, but it asks users to provide sensitive X session cookies and run an unreviewable background workflow with broad local and external data handling.

Review this carefully before installing. Only use it if you are comfortable extracting X session cookies, running a persistent local daemon, sending bookmark and linked-article content to AI services, and storing analyzed bookmark data locally. Prefer an implementation that ships auditable code, uses official OAuth or scoped tokens, and clearly documents credential handling and deletion.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:127
Finding

Collection and Persistent Handling of High-Value X Session Cookies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 127
Vulnerability Type: Sensitive session credential handling
Risk Level: High

Relevant snippet (English translation of the documented instruction):

text
The wizard sequentially performs: detection of Node/bird/PM2, guidance for extracting auth_token and ct0 from the browser, collection of active projects, configuration of notification preferences, and validation of the credentials.

Technical Analysis

The documented setup workflow instructs users to extract the auth_token and ct0 cookies from an authenticated X browser session. These are high-value session credentials: auth_token authenticates the session, while ct0 is commonly used as the corresponding CSRF token for authenticated requests.

The Skill claims elsewhere that credentials are stored locally in an .env file with owner-only permissions and are not uploaded. However, the audited project contains only SKILL.md; it does not contain the referenced setup script, package manifest, credential-storage implementation, or daemon source. Consequently, the audit cannot verify:

  • Atomic creation of the credential file with restrictive permissions.
  • Prevention of credentials being inherited or exposed by child processes.
  • Redaction of secrets from command output, PM2 logs, exceptions, and diagnostics.
  • Exclusion of credential files from source control and backups.
  • Restriction of network destinations receiving authenticated requests.
  • Secure credential deletion, expiration, and rotation.
  • The assertion that no telemetry or third-party credential transmission occurs.

Collecting raw browser-session cookies instead of using an official, narrowly scoped authorization mechanism increases the consequence of local file disclosure, process inspection, malicious dependencies, log leakage, or backup exposure.

Attack Path

  1. A user follows the setup instructions and extracts an active X auth_token and ct0 ...[truncated 1434 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace browser-cookie extraction with X's official OAuth flow wherever the required functionality is available.
  2. Request only the minimum scopes necessary to read bookmarks and avoid permissions for unrelated account actions.
  3. Ship the complete setup and daemon implementation so its credential handling and network behavior can be independently audited.
  4. If session cookies are unavoidable, display a prominent warning explaining that they are equivalent to active session credentials and may expose the user's account if disclosed.
  5. Create credential files atomically with owner-only permissions from the moment of creation; do not create a broadly readable file and restrict it afterward.
  6. Store credentials through the operating system's secret manager or a dedicated encrypted credential store rather than a plaintext .env file.
  7. Ensure secrets are never included in command-line arguments, standard output, exception messages, PM2 logs, telemetry, crash reports, or diagnostic bundles.
  8. Explicitly validate that secret files are excluded from version control and common backup or synchronization workflows.
  9. Restrict outbound requests to documented X endpoints and clearly disclose every service that receives bookmark content or related user data.
  10. Implement credential rotation, revocation, expiry detection, and secure deletion procedures.
  11. Run the daemon as a dedicated, unprivileged account with narrowly restricted filesystem and network access.
  12. Add automated tests that inspect logs and error paths for accidental credential disclosure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description states that it collects X bookmarks, fetches linked article bodies, analyzes them with AI, and pushes results externally, but this sensitive data flow is not surfaced with a prominent upfront warning. Users may not realize that private bookmark contents, linked documents, and inferred project context can be transmitted to third-party services.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The setup flow instructs users to extract X authentication cookies (auth_token and ct0) without an adjacent warning that these are highly sensitive session credentials that can enable account access if exposed. Presenting cookie extraction as a routine setup step materially increases the chance of unsafe handling, leakage, or phishing-style misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation text markets the skill for broad generic data-analysis and reporting use cases that exceed its stated bookmark-processing purpose. Overbroad trigger language can cause an agent to invoke this skill in unrelated contexts, unnecessarily granting it access to exec, write, external APIs, and sensitive local data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The description states '支持中文交互' and the document consistently presents Chinese as the required interaction mode, but it does not indicate that language selection is optional or user-controlled. This can violate language/locale policy where users should be allowed to choose their preferred language unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation makes a reassuring security claim that credentials 'will not leave your machine' while also admitting elsewhere that data is sent to X and AI providers during operation. This inconsistency can mislead users into granting sensitive X cookies and bookmark data under false assumptions, increasing the risk of credential misuse or privacy exposure.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.