T03 · Remote Payload Retrieval and Execution
- Location
references/scripts.md:8- Finding
Unpinned Remote Installer Executed Directly Through Bash
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This WeChat publishing skill is mostly coherent, but it needs review because it can publish or save content to an external account while also using unsafe runtime installation paths and optional no-confirm publishing.
Review this skill before installing. Keep final publish confirmation enabled, avoid Turbo/no-confirm mode for live accounts, install Bun through a trusted pinned process instead of `npx -y` or `curl | bash`, and store WeChat secrets outside project directories with strict permissions or a credential manager.
references/scripts.md:8Unpinned Remote Installer Executed Directly Through Bash
references/scripts.md:3Automatic Execution of an Unpinned npm Package Through npx
The declared description emphasizes a publishing skill that posts content to a WeChat Official Account, including article and image-text publishing workflows. The actual code chunk does not publish anything, does not interact with WeChat APIs or a browser, and does not process content beyond declaring an intended conversion purpose in comments. At runtime it simply prints an error and exits. Even considering the comments, the script's stated purpose is conversion to WeChat-ready HTML without publishing, which is materially different from the declared primary purpose of publishing to WeChat. Therefore this is a clear description-behavior mismatch.
The declared description presents a functioning WeChat Official Account publishing skill. However, the actual executable behavior of the provided code chunk is just a stub: it emits two error messages and terminates. While comments describe intended publishing features, comments are not runtime behavior. Therefore the supplied code materially fails to match the declared primary purpose.
The description presents a functioning WeChat Official Account publishing skill with multiple content modes and publishing paths. However, the provided code chunk contains no publishing logic, no browser automation, no API interaction, no content transformation, and no image-text handling. It only outputs a message that the full runtime is required and terminates. This is a material description-behavior mismatch because the primary declared purpose is not carried out by the supplied code at all.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Parallel side-computation in editorial pass
- Industry terminology protection via config
- Domain-specific AI-tone signal suppression
- Access token cache with auto-refresh
- Image source resolution with graceful fallback
- version: 2.1.0
changes:
Referenced artifact was not completely inspected
- `references/fsm.md` — Full FSM state table
Referenced artifact was not completely inspected
- `references/fsm.md` — Full FSM state table
The skill specifies local access-token cache files in predictable locations without documenting protections such as restricted permissions, encryption, OS keychain storage, or avoidance of workspace exposure. Cached API tokens for a publishing account can be stolen by other local processes, included in backups, or accidentally committed if stored in project directories, enabling unauthorized publication.
---
## Access Token Cache
Cache location (in priority order): `amiao/.wechat-token-cache` → `~/amiao/.wechat-token-cache`
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
If `confirm_before_publish: false` and no warnings: skip confirmation, show summary inline in completion report instead.
Referenced artifact was not completely inspected
- `SKILL.md` is the primary agent contract; keep it self-contained and readable
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
→ ACTION: halt + request cover image (LEVEL 3)
STATE: pre_publish_confirm
→ confirm_before_publish: false AND no warnings
→ skip confirmation UI
→ STATE: publishing
→ confirm_before_publish: true OR any warnings present
curl -fsSL https://bun.sh/install | bash downloads a remote script and immediately executes it in the shell, which is a classic unsafe installation pattern. If the remote source, transport path, DNS, or hosting account is compromised, arbitrary code can run on the user's machine.
Bun runtime required.
Install: curl -fsSL https://bun.sh/install | bash
Or via npm: npm install -g bun
The | bash construct directly chains fetched content into shell execution, removing any opportunity for review and amplifying the risk of remote code execution. In the context of a skill intended for end users to follow, this materially increases the chance that users will execute untrusted code without validation.
Bun runtime required.
Install: curl -fsSL https://bun.sh/install | bash
Or via npm: npm install -g bun
Mentioning an access token cache indicates credentials may be stored locally for reuse, which creates exposure if the cache is persisted insecurely or shared across accounts/users. In a content-publishing skill, cached API tokens could let an attacker publish unauthorized content or access account capabilities if the host is compromised.
| Comment control | ✗ | ✓ | ✗ |
| Requires Chrome | ✓ | ✗ | ✓ |
| Requires API credentials | ✗ | ✓ | ✗ |
| Access token cache | — | ✓ | — |
| Speed | Medium | Fast | Slow |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Error | Auto-action |
|-------|-------------|
| Access token expired | Refresh token from AppID/AppSecret, update cache, retry |
| Transient network error (timeout, 5xx) | Wait 3s, retry; wait 10s, retry again |
| WeChat API rate limit (temporary) | Wait 10s, retry once |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Error | Auto-action |
|-------|-------------|
| Access token expired | Refresh token from AppID/AppSecret, update cache, retry |
| Transient network error (timeout, 5xx) | Wait 3s, retry; wait 10s, retry again |
| WeChat API rate limit (temporary) | Wait 10s, retry once |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
3. Copy AppID and AppSecret
Where to save:
A) Project-level: amiao/.env
B) User-level: ~/amiao/.env
Format:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
3. Copy AppID and AppSecret
Where to save:
A) Project-level: amiao/.env
B) User-level: ~/amiao/.env
Format:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
3. Copy AppID and AppSecret
Where to save:
A) Project-level: amiao/.env
B) User-level: ~/amiao/.env
Format:
The trigger list is broad and includes vague phrases like 'or similar', increasing the chance the skill activates on ordinary conversational requests. Because the skill can lead to external publishing actions, over-broad activation raises the risk of unintended invocation and downstream unauthorized or accidental posting behavior.
The skill metadata allows runtime fallback to npx, which fetches and executes packages without a pinned version. That creates a supply-chain risk: a compromised or newly published package version could be executed in the agent environment unexpectedly.
Turbo mode explicitly skips pre-publish confirmation and auto-proceeds to publishing. For a skill that performs an external side effect against a real account, removing the human confirmation gate materially increases the risk of accidental publication, prompt-triggered abuse, or misuse from ambiguous user instructions.
The workflow allows skipping user confirmation and proceeding with publication when configuration disables confirmation and no warnings are detected. Autonomous execution of an external publishing action is dangerous because configuration mistakes, prompt injection, or false-negative warning logic can cause unauthorized posting to a live WeChat account.
确认发布?(y/n / 输入 e 返回编辑)
If `confirm_before_publish: false` and no warnings: skip confirmation, show summary inline in completion report instead.
---
The documented runtime fallback npx -y bun will download and run the latest resolved Bun package at execution time. In an automated publishing skill, that exposes the environment to unreviewed upstream changes or package compromise, which is a realistic supply-chain execution risk.
The instructions require 'Natural Chinese phrasing' and alignment with 'likely WeChat search intent,' which imposes a specific language/locale expectation in natural-language guidance. The document does not indicate this is optional or user-selected, nor does it provide an opt-in or alternative language path.
The FSM allows publishing to proceed without a confirmation UI when configuration disables confirmation and no warnings are present. Because publishing is an external side effect that can affect a real WeChat account, skipping an explicit final consent step increases the risk of unintended or premature publication caused by misclassification, content errors, or account-selection mistakes.
STATE: pre_publish_confirm
→ confirm_before_publish: false AND no warnings
→ skip confirmation UI
→ STATE: publishing
→ confirm_before_publish: true OR any warnings present
→ ACTION: show_confirmation_summary (see SKILL.md format)