Back to skill

Security audit

Baoyu Post To Xhs

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it has review-worthy risks around browser control, unpinned runtime execution, automatic Chrome process termination, and sensitive page diagnostics.

Install only if you are comfortable giving the skill access to an authenticated Xiaohongshu browser profile and local posting assets. Prefer using a preinstalled trusted Bun runtime, avoid --submit unless you intend immediate public posting, avoid --debug/probe scripts on sensitive pages, and do not let it automatically kill Chrome CDP processes without reviewing what will be stopped.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
SKILL.md:26
Finding

Unpinned Remote Runtime Package Is Automatically Downloaded and Executed

Content
View full analysis
.ts` 3. Replace all `{baseDir}` in this document with the actual path 4. Resolve `${BUN_X}` runtime: if `bun` installed → `bun`; if `npx` available → `npx -y bun`; else suggest installing bun ``` ```bash ${BUN_X} {baseDir}/scripts/check-permissions.ts ``` ### Technical Analysis When Bun is unavailable, the instructions direct the agent to run `npx -y bun`. No package version or integrity digest is specified. Consequently, `npx` may retrieve the currently published `bun` package and execute its package entry point with the permissions of the invoking user. The effective runtime payload can therefore change after the Skill has been reviewed. The local lockfile does not mitigate this behavior because it only locks the vendored `baoyu-chrome-cdp` dependency and does not pin the package selected by the standalone `npx -y bun` command. This is an unsafe supply-chain execution path. Exploitation depends on compromise or malicious control of the resolved registry package, registry configuration, network resolution, or package source. ### Attack Path 1. Bun is not installed, but `npx` is available. 2. The agent follows the Skill instruction and resolves `${BUN_X}` to `npx -y bun`. 3. `npx` queries the configured package registry for the unpinned `bun` package. 4. A compromised package, registry, mirror, or resolution path supplies attacker-controlled code. 5. `npx` downloads and executes that code without an interactive installation confirmation because of `-y`. 6. The payload runs with the same filesystem, network, environment-variable, and process privileges as the agent. ### Impact Assessment Successful exploi ...[truncated 401 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:183
Finding

Recovery Instructions Can Terminate Unrelated Chrome Debugging Sessions

Content
View full analysis
/dev/null; sleep 2 ``` ```powershell # PowerShell (Windows) Get-Process chrome -ErrorAction SilentlyContinue | Where-Object { $_.CommandLine -match 'remote-debugging-port' } | Stop-Process -Force Start-Sleep -Seconds 2 ``` **Important**: This should be done automatically — when encountering this error, kill Chrome CDP instances and retry the command without asking the user. ``` ### Technical Analysis The Unix command selects processes by a broad command-line regular expression rather than by a PID created and tracked by this Skill. The Windows command similarly terminates every Chrome process whose command line contains `remote-debugging-port`. These selectors are not restricted to the Skill's dedicated profile directory, selected debugging port, current process tree, or a recorded child PID. They can therefore match unrelated browser automation, developer tools, testing sessions, or other Skills using Chrome CDP. The instruction explicitly requires automatic execution without obtaining user consent, exceeding the minimum privileges needed to launch or reconnect to the Skill's own Chrome instance. ### Attack Path 1. The Skill encounters or reports `Chrome debug port not ready`. 2. The agent follows the mandatory troubleshooting instruction without asking the user. 3. The agent runs the supplied `pkill` or PowerShell process-termination command. 4. The broad process match identifies all qualifying Chrome CDP instances owned by the user, including unrelated instances. 5. Those processes are terminated, after which the Skill retries its operation. ### Impact Assessment This can terminate unre ...[truncated 328 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/xhs-utils.ts:57
Finding

Shell Command Injection in WSL Profile Path Conversion

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

General Chrome discovery, reuse of arbitrary remote-debugging sessions, arbitrary CDP command capability, and enabling Runtime/DOM/Network domains are materially broader than posting to Xiaohongshu. This effectively grants a browser-control primitive that could inspect or manipulate unrelated tabs, traffic, and authenticated contexts if misused or if the skill is invoked unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

General Chrome discovery, reuse of arbitrary remote-debugging sessions, arbitrary CDP command capability, and enabling Runtime/DOM/Network domains are materially broader than posting to Xiaohongshu. This effectively grants a browser-control primitive that could inspect or manipulate unrelated tabs, traffic, and authenticated contexts if misused or if the skill is invoked unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

General Chrome discovery, reuse of arbitrary remote-debugging sessions, arbitrary CDP command capability, and enabling Runtime/DOM/Network domains are materially broader than posting to Xiaohongshu. This effectively grants a browser-control primitive that could inspect or manipulate unrelated tabs, traffic, and authenticated contexts if misused or if the skill is invoked unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

General Chrome discovery, reuse of arbitrary remote-debugging sessions, arbitrary CDP command capability, and enabling Runtime/DOM/Network domains are materially broader than posting to Xiaohongshu. This effectively grants a browser-control primitive that could inspect or manipulate unrelated tabs, traffic, and authenticated contexts if misused or if the skill is invoked unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

General Chrome discovery, reuse of arbitrary remote-debugging sessions, arbitrary CDP command capability, and enabling Runtime/DOM/Network domains are materially broader than posting to Xiaohongshu. This effectively grants a browser-control primitive that could inspect or manipulate unrelated tabs, traffic, and authenticated contexts if misused or if the skill is invoked unexpectedly.

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 36)May include surrounding context.

md
| `scripts/check-permissions.ts` | Verify environment & permissions |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill explicitly instructs execution of local scripts that use environment variables, browser automation, and networked browser/CDP access, yet it declares no tool scope or permission boundaries. This makes the skill under-specified from a security perspective and increases the risk that an agent will grant broader capabilities than users expect.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
83% confidence
Finding

Using npx -y bun without a pinned version allows fetching whatever package/version is current at execution time, creating a supply-chain risk and undermining reproducibility. If the upstream package is compromised or behavior changes, the skill may execute unexpected code on the user's machine.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
87% confidence
Finding

The directive to kill Chrome CDP instances and retry 'without asking' authorizes autonomous destructive action affecting local processes. Even if intended as convenience, removing the consent step is unsafe because it can impact unrelated browser automation and violate the user's expectations about control over their environment.

Content

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

Start-Sleep -Seconds 2

text

**Important**: This should be done automatically — when encountering this error, kill Chrome CDP instances and retry the command without asking the user.

## Notes

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instruction to automatically terminate Chrome CDP processes is broader than the stated purpose and can disrupt other active automation, browser sessions, or user workflows. In shared or multi-task environments, indiscriminate process killing can cause data loss or break unrelated tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Including destructive process-kill instructions without an explicit warning deprives the user of informed consent and can unexpectedly close sessions or discard unsaved work. The danger is amplified because the command pattern may match broader Chrome/CDP usage than this single skill instance.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code extracts outerHTML from the upload area and prints it, which can expose hidden values, internal identifiers, embedded text, or other sensitive DOM content from the authenticated Xiaohongshu page. Because it operates against an attached existing browser session, the risk is higher than generic scraping: it can leak user-specific data from a live account into logs or downstream systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script attaches to an existing logged-in Chrome session, reads all visible text from the Xiaohongshu creator page, and prints it to stdout. Visible page text can include account information, draft content, business data, or other sensitive information, and emitting it to logs creates an unnecessary data exposure channel outside the browser context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This script connects to a live Chrome debugging session and prints DOM structure plus an outerHTML snippet from the active Xiaohongshu creator page. Even though it is framed as a diagnostic probe, those logs can expose user content, draft text, account-specific metadata, or other sensitive on-page information to terminal history, CI logs, or other observers without any warning or minimization.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This probe script uses Chrome DevTools Runtime.evaluate to enumerate and print broad page data, including visible text, button labels, file input metadata, and chunks of HTML from the Xiaohongshu creator page. In a logged-in browser context, those debug dumps can capture account-specific or sensitive content unrelated to the minimum data needed for posting, and may leak it into console logs, CI logs, or agent telemetry.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script relies throughout on fixed Chinese strings such as 上传图文, 上传照片, 发布, and the usage examples are likewise Chinese-specific. This effectively forces a single locale and may fail or behave unpredictably for users whose browser/account language differs, without any user opt-in or documented locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

When submit is enabled, the script programmatically clicks the live publish button and waits for confirmation without requiring an execution-time confirmation from the operator. In an agent skill context, this increases the chance of unintended public posting, reputational damage, accidental disclosure of sensitive content, or irreversible publication triggered by prompt misunderstanding or automation errors.

Content

No source excerpt is available for this finding.