Back to skill

Security audit

wangyin-zhongnian-self-media

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent WeChat content workflow, but its draft-publishing path runs unpinned external tooling and an unreviewed local publisher script.

Review before installing. Use this only in a controlled environment for the named WeChat account, replace `npx -y bun` with a pinned or preinstalled verified Bun executable, and audit the external `baoyu-post-to-wechat` publisher plus its credential handling before allowing draft pushes.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:119
Finding

Unpinned Package Retrieval and Execution During WeChat Publication

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 119–122 and line 133
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Complete Code Snippet

markdown
Unique approved command:

```text
cd "<article directory>" && npx -y bun "C:\Users\guoyu\.workbuddy\skills\baoyu-post-to-wechat\scripts\wechat-api.ts" <article.md> --theme modern --color "#005BAC" --no-cite --cover <cover path> --account wangyinzhongnian
text

The documented fallback also invokes the same unpinned package:

```markdown
| Error `Cannot find module '@baoyu-skills/wechat-api'` | The obsolete script was used; switch to the approved path and retry | If the approved path also reports a missing module, run `npx -y bun --version` to verify Bun availability and provide the diagnostic result for manual review |

Technical Analysis

The command uses npx -y bun without an exact package version, lockfile, or integrity constraint. If Bun is not already available through an accepted local resolution, npx can retrieve the currently resolved bun package from the configured npm registry and execute it automatically. The -y option suppresses the normal installation confirmation.

Consequently, the effective executable is not fixed to the artifact that was audited. Its behavior can change after review due to package updates, registry compromise, account compromise, registry configuration changes, or dependency-resolution manipulation. The repository does not include the resolved package or the referenced external wechat-api.ts, so neither component can be verified from the reviewed project.

This is especially sensitive because the command runs during publication, when the process may have access to unpublished articles, cover files, environment variables, local publishing configuration, and WeChat credentials used by the external publishing script.

Attack Path

  1. An attacker compromises the remotely resolv ...[truncated 1553 chars]
Remediation
View remediation

Remediation Suggestions

  1. Install Bun in advance from an official, verified distribution and invoke the installed executable directly rather than using npx.
  2. If npm-based installation is unavoidable, pin an exact audited package version, for example bun@<exact-version>, rather than resolving the latest available version.
  3. Commit and enforce a lockfile containing integrity metadata. Use deterministic installation such as npm ci in a controlled setup phase.
  4. Disable implicit package downloads during publication. The publication step should fail closed if the approved local Bun executable is unavailable.
  5. Verify package signatures or integrity hashes against a trusted value before execution.
  6. Vendor or otherwise version-control the referenced publishing script and audit its full dependency tree.
  7. Execute the publisher in a least-privilege environment with access only to the required article, cover image, and narrowly scoped publishing credentials.
  8. Restrict environment-variable exposure and outbound network access to the endpoints required for WeChat publication.
  9. Replace npx -y bun --version with a direct check of the approved local binary, such as an absolute-path invocation.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · results.tsv (reported line 1)May include surrounding context.

text
timestamp	commit	skill	old_score	new_score	status	dimension	note	eval_mode
2026-07-27T14:50	baseline	wangyin-zhongnian-self-media	-	92.9	baseline	-	初始评估:dim7 含「值得注意的是/综上所述」字面触发词(dim7 -2)、dim5 缺具体标题样例(-1)、dim8 无输出骨架(-3)	full_test
2026-07-27T14:52	a1b2c3d	wangyin-zhongnian-self-media	92.9	98.0	keep	dim5/dim7/dim8	重写去AI味黑话清单(去字面触发词)、补教程类合规标题样例、补强制大纲骨架	partial_test

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description lists triggers such as "发一篇", "做选题", and "爆款公式", which are short, generic phrases that could easily appear in ordinary conversation outside the intended specialized workflow. Although some exclusions are listed, the activation phrases themselves are not scoped tightly enough to clearly distinguish when this skill should activate versus when it should not.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Examples like "写一篇/发一篇 XX" and "日报数据怎么样/复盘" are broad natural-language patterns that do not define clear scope constraints, making accidental activation more likely. The table provides examples but does not clearly state whether only these phrases trigger the skill or what nearby phrases should be excluded.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The writing and editing instructions mandate Chinese-language stylistic rules and Chinese-specific rewriting patterns, such as deslop-zh and specific Chinese phrasing conventions, without offering the user a language choice. This can constitute a language/locale policy violation unless the locale restriction is explicitly documented as required for a region-specific or account-specific workflow.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The skill executes npx -y bun without pinning an exact package/version, which allows the runtime or fetched package resolution to drift over time. In a workflow that performs external write actions to a real WeChat account, this creates supply-chain risk: a compromised or changed upstream package could execute unintended code, access local files, or alter publishing behavior.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The diagnostic step also uses npx -y bun without version pinning, so even the fallback path may fetch or run unexpected upstream code. Because this skill references local credential files and operational publishing commands, an unpinned tool in troubleshooting still expands the attack surface for supply-chain compromise.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire document prescribes content and compliance rules exclusively in Chinese, including Chinese-only trigger phrases and publication guidance, with no indication that language choice is optional. This can constitute a language/locale policy violation because it forces a specific language and regional framing without user opt-in or an explicit, documented justification in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The title explicitly states the standard is for a Chinese WeChat public account, and the document is written entirely as a prescriptive style guide in Chinese. This creates a language/locale constraint without any indication of user opt-in or an explanation that the skill is region-specific for compliance or other policy reasons.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The prompts and expected behavior are entirely specified in Chinese, and the expected outputs imply the skill should respond in Chinese by default. This creates a language-policy concern because the file does not indicate that users can choose another language or that the Chinese-only behavior is region-specific and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The title and all instructional content are written in Chinese, with no indication that users may choose another language or that the locale is required for a region-specific purpose. Under the stated policy, natural-language instructions that impose a language without opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The display name and description are entirely targeted to a Chinese WeChat public-account workflow, indicating a fixed language/locale context. Because the manifest does not mention that this is an optional locale setting or region-specific constraint, it may violate language/locale policy requirements for user choice.

Content

No source excerpt is available for this finding.