Back to skill

Security audit

Toutiao Publisher

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Toutiao publishing helper, but it needs Review because it can post to a live account using stored login sessions and includes under-scoped automation and setup behavior.

Review this before installing. Use it only if you are comfortable letting an agent operate a real Toutiao account, upload the specified local files, and publish externally. Prefer visible, non-headless runs with --dry-run until content is reviewed, keep data/browser_state private, clear saved sessions when done, and run the skill in an isolated environment because setup downloads executable dependencies and Chrome.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run.py:61
Finding

Arbitrary Python File Execution Through Path Traversal

Content
View full analysis
int: """Run a script with the virtual environment""" script_path = self.skill_dir / "scripts" / script_name if not script_path.exists(): print(f"❌ Script not found: {script_path}") return 1 # Ensure venv is set up if not self.ensure_venv(): print("❌ Failed to set up environment") return 1 # Build command cmd = [str(self.venv_python), str(script_path)] if args: cmd.extend(args) print(f"🚀 Running: {script_name} with venv Python") try: # Run the script with venv Python result = subprocess.run(cmd) ``` ### Technical Analysis Both entry points accept a caller-controlled script name and append it ...[truncated 1691 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup_environment.py:52
Finding

Automatic Execution of Unverified Third-Party Dependencies and Browser Installer

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth_manager.py:176
Finding

Toutiao Authentication State Stored Without Explicit Access Controls

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/config.py:23
Finding

Remote Browser Content Processed With the Chrome Sandbox Disabled

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (21)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · README.md (reported line 60)May include surrounding context.

md
*   **首次使用**:直接运行发布命令(不带 `--headless`)。脚本会自动弹出浏览器,请扫码登录。登录后脚本会自动保存状态。
*   **状态失效**:如果遇到 `No valid authentication` 且自动重试无效,可手动清理状态:
    ```bash
    rm -rf data/browser_state
    ```
    然后重新运行发布命令。

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill documentation frames the capability as a focused publishing helper, but it also indicates environment creation, dependency installation, browser installation, and a generic script runner. Hidden or under-emphasized execution, installation, and environment-management behavior expands the attack surface substantially because running the skill can modify the host, fetch code, and execute scripts beyond what a user may expect from a simple publisher.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill documentation frames the capability as a focused publishing helper, but it also indicates environment creation, dependency installation, browser installation, and a generic script runner. Hidden or under-emphasized execution, installation, and environment-management behavior expands the attack surface substantially because running the skill can modify the host, fetch code, and execute scripts beyond what a user may expect from a simple publisher.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README encourages natural-language driven publishing, including generating content and directly posting it to a live Toutiao account, but it does not clearly warn that these actions modify external account state and may cause irreversible publication. In an agent setting, this increases the risk of users invoking real-world side effects without informed consent, especially when login state is persisted and reused.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises commands that read and write local files, persist browser session state, and execute shell commands, but it declares no explicit tool scope or permission boundaries. That makes it harder for users or orchestrators to understand what capabilities are being granted and increases the chance of over-privileged execution or unintended local side effects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Triggering the skill merely when 'toutiao' or '头条号' is mentioned is overly broad and can cause the agent to invoke browser automation, session handling, or publication-related actions outside a clear user request. In this context, the skill has side effects and external network interaction, so loose activation criteria materially increase the risk of unintended execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill persists authentication state and browser data locally, but the user-facing instructions do not clearly warn that cookies and session material will remain on disk. Persisted session artifacts are sensitive because compromise of the local machine or workspace could allow reuse of the authenticated Toutiao account.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation presents the workflow as manual and interactive, but it also exposes a headless fully automated publishing mode. That discrepancy is dangerous because users may authorize the skill expecting human review in the browser, while the automation path can submit content and files directly to an external service without the same visibility or confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The automated publishing mode accepts a local content file and cover image, but the documentation does not clearly warn that those local files will be uploaded to an external Toutiao service. Without that disclosure, users may unintentionally transmit sensitive local data, especially if file paths are supplied by an agent or reused from prior context.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: python-dotenv==1.0.0 — 2 advisory(ies): CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via ); CVE-2026-28684 (python-dotenv reads key-value pairs from a .env file and can set them as environ)

Medium
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency is pinned to python-dotenv 1.0.0, which is reported as affected by a symlink-following/arbitrary file overwrite issue in set_key. Even if this requirements file alone does not prove the vulnerable API is used, shipping a version with known advisories is a real supply-chain risk because the skill handles persistent authentication and may process local environment files or secrets during setup.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code reads persisted browser state from state.json and restores cookies into a live browser session, which affects authentication state and may involve sensitive session data. While there is a failure log on exception, there is no confirmation prompt, user-facing disclosure, or explanatory comment warning users that stored session cookies will be reused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs a real publication by default whenever --dry-run is not set, and it does so without an explicit confirmation prompt immediately before the irreversible action. In an agent/automation context, this creates a meaningful risk of unintended external side effects such as accidental posting, publication of draft or attacker-supplied content, and reputational damage to the authenticated account owner.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run.py (reported line 38)May include surrounding context.

python
print("   This may take a minute...")

        # Run setup with system Python
        result = subprocess.run([sys.executable, str(setup_script)])
        if result.returncode != 0:
            print("❌ Failed to set up environment")
            sys.exit(1)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run.py (reported line 89)May include surrounding context.

python
# Run the script
    try:
        result = subprocess.run(cmd)
        sys.exit(result.returncode)
    except KeyboardInterrupt:
        print("\n⚠️ Interrupted by user")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup_environment.py (reported line 139)May include surrounding context.

python
# Run the script
    try:
        result = subprocess.run(cmd)
        sys.exit(result.returncode)
    except KeyboardInterrupt:
        print("\n⚠️ Interrupted by user")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup_environment.py (reported line 54)May include surrounding context.

python
print("📦 Installing dependencies...")
            try:
                # Upgrade pip first
                subprocess.run(
                    [str(self.venv_pip), "install", "--upgrade", "pip"],
                    check=True,
                    capture_output=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup_environment.py (reported line 62)May include surrounding context.

python
)

                # Install requirements
                result = subprocess.run(
                    [str(self.venv_pip), "install", "-r", str(self.requirements_file)],
                    check=True,
                    capture_output=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup_environment.py (reported line 73)May include surrounding context.

python
# Install Chrome for Patchright (not Chromium!)
                print("🌐 Installing Google Chrome for Patchright...")
                try:
                    subprocess.run(
                        [
                            str(self.venv_python),
                            "-m",

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. The document consistently instructs usage in Chinese and provides only Chinese natural-language examples, which can amount to a de facto language constraint without an explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The configuration defines persistent storage locations for browser state and authentication information, including state.json and auth_info.json. In this file, there is no user-facing disclosure, prompt, or warning comment indicating that login/session data may be written locally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The automation relies on Chinese UI text such as 标题, 添加封面, 本地上传, 无封面, 发布成功, and related labels, which effectively forces operation in a Chinese-language interface. There is no opt-in, language selection, or explicit documentation in this file that the skill is region- or locale-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.