Back to skill

Security audit

toutiao-publish

Security checks for vulnerabilities and agentic risk

Overview

The skill is for a real publishing workflow, but it handles live account cookies and public posting through unsafe shell-style command templates.

Review this skill before installing. Only use it with a Toutiao account you intend to automate, treat cookie_header as a password-level secret, require a dry run before publish=true, and avoid executing the documented command strings through a shell with untrusted title, content, cookie, or path values.

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:42
Finding

Shell Command Injection Through Unsafe Parameter Interpolation

Content
View full analysis
' \ ./.venv/bin/python -m toutiao_poster post \ --title '' \ --content-text '<content>' \ --headless ``` ```bash TOUTIAO_COOKIE='<cookie_header>' \ ./.venv/bin/python -m toutiao_poster post \ --title '<title>' \ --content-text '<content>' \ --docx-wait-seconds 60 \ --headless \ --publish ``` ```bash TOUTIAO_COOKIE='<cookie_header>' \ ./.venv/bin/python -m toutiao_poster post \ --title '<title>' \ --content-text '<content>' \ --image '/abs/path/1.png' \ --image '/abs/path/2.jpg' \ --docx-wait-seconds 60 \ --headless \ --publish ``` ### Technical Analysis The documented commands place user-controlled `cookie_header`, `title`, and `content` values directly inside a shell command using single quotes. Dynamically supplied image paths are expected to be inserted in the same manner. Single quotes only protect a value while the value itself contains no single quote. An attacker can provide an apostrophe to terminate the quoted argument and then append shell operators and an arbitrary command. Subsequent text can be neutralized with a shell comment or otherwise arranged to preserve valid shell syntax. For example, a malicious title conceptually shaped as: ```text '; id > /tmp/proof; # ``` would transform the title argument into shell syntax resembling: ```bash --title ''; id > /tmp/proof; #' ``` If an agent constructs and executes the documented command through a shell, `id > /tmp/proof` is interpreted as a separate command rather than article text. The cookie assignment is vulnerable to the same quoting problem. This is particularly sensitive because the resulting process operates in an environment that may contain a valid Toutiao session cooki ...[truncated 1861 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs users to pass a raw cookie_header from a browser session but does not warn that this value is a live authentication secret equivalent to account access. In an agent setting, that omission increases the chance the cookie will be logged, echoed, stored in histories, or mishandled by downstream tooling, enabling account takeover or unauthorized posting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill supports --publish for live posting and also documents automatic movement of processed image/docx files to done/, but it does not prominently warn that these actions are irreversible operational side effects. In an automation context, users or agents may trigger publication assuming a dry run, causing accidental public posts and unintended file state changes that are hard to undo.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.