Back to skill

Security audit

Social media autopilot

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent and purpose-aligned, but it asks users to pass a powerful SocialEcho Team API key on the command line for tools that can publish content and sync TikTok Shop products.

Review before installing. Use this only with a least-privilege SocialEcho Team API key, avoid putting real keys directly in shell commands or shared scripts, rotate any key that may have been logged, and require a fresh user confirmation before any publish or TikTok Shop sync action.

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

Warning
Location
client.js:46
Finding

Team API Key Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:24-25, 43-59, 66-68; client.js:46-52
Vulnerability Type: Sensitive credential exposure through process arguments and shell history
Risk Level: Medium

Vulnerable Code

SKILL.md:24-25:

markdown
- `--api-key` (required)
- `--base-url` (optional; only the SocialEcho production or development API host is accepted, default `https://api.socialecho.net`)

SKILL.md:43-59:

markdown
./team.js --api-key YOUR_KEY
./account.js --api-key YOUR_KEY --page 1 --type 1
./oauth-links.js --api-key YOUR_KEY
./article.js --api-key YOUR_KEY --page 1 --account-ids 41,42
./report.js --api-key YOUR_KEY --start-date 2026-01-01 --end-date 2026-03-24 --time-type 1 --group day --account-ids 41,42

./upload-url.js --api-key YOUR_KEY --content-type image/png
# Or: --content_type video/mp4
./reddit-communities.js --api-key YOUR_KEY --account-id 163751
./pinterest-boards.js --api-key YOUR_KEY --account-id 163751
./tiktokshop-products.js --api-key YOUR_KEY --account-id 43 --page 1 --per-page 20
./tiktokshop-music-genres.js --api-key YOUR_KEY
./tiktokshop-music-trending.js --api-key YOUR_KEY --account-id 43 --country-code US --genre BGM --date-range 7DAY

SKILL.md:64-68:

markdown
./publish-article.js --payload ./publish-payload.example.json
./publish-article.js --api-key YOUR_KEY --payload ./publish-payload.example.json --execute --confirm-account-id 163751
./tiktokshop-product-sync.js --account-id 43
./tiktokshop-product-sync.js --api-key YOUR_KEY --account-id 43 --execute --confirm-account-id 43

client.js:46-52:

js
export function buildRequestOptions(args) {
  return {
    apiKey: getOption(args, "api-key"),
    baseUrl: normalizeBaseUrl(getOption(args, "base-url", false, "https://api.socialecho.net")),
    teamId: getOption(args, "team-id", false, ""),
    lang: getOption(args, "lang", false, "zh_CN")
  };
}

...[truncated 2840 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --api-key as the recommended credential transport mechanism.
  2. Add an interactive hidden prompt that reads the key without echoing it when standard input is attached to a terminal.
  3. Support reading the key from standard input for automated use, preferably through an explicit option such as --api-key-stdin.
  4. If environment-variable support is necessary for CI/CD, use a narrowly scoped variable and document that the CI secret store must mask it. Avoid printing inherited environment data.
  5. Preserve the existing destination allowlist so credentials can only be sent to approved HTTPS hosts.
  6. Update every command example to avoid placing real credentials in command arguments.
  7. Ensure errors, debug output, telemetry, and request logging redact the Authorization header and any credential-bearing input.
  8. Recommend immediate key rotation for users who previously supplied real keys through command lines, shared scripts, or logged CI jobs.
  9. Add automated tests confirming that credentials are never included in standard output, standard error, URLs, dry-run previews, or thrown error messages.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This code chunk only implements a read-only fetch of article data from the /v1/article endpoint, with optional pagination and account filtering. The declared description presents a broader skill that includes explicit queries plus user-authorized TikTok Shop sync or cross-platform publishing and a requirement for confirmation before live writes. Those write/sync behaviors are not present here. Because the implemented behavior is a narrow article query endpoint rather than the broader declared multi-capability skill, this is a description-behavior mismatch for the supplied code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description suggests an API-integrated skill capable of querying SocialEcho data and performing authorized publishing or sync operations. The actual code does none of that: it simply selects one of two local markdown files and outputs its contents. Its primary purpose is documentation display, not API access or publishing. This is a clear material mismatch in behavior and capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code only performs a read request for Reddit communities associated with an account via the SocialEcho API. The declared description focuses on team/account/content queries plus user-authorized TikTok Shop sync or cross-platform publishing with confirmation before live writes. Reddit community retrieval is not disclosed, and the code does not implement TikTok Shop sync, cross-platform publishing, or any write confirmation flow. Although it does use an API key and queries an account-scoped API, the actual resource and purpose are materially different from the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code does not implement team/account/content queries, TikTok Shop sync, or cross-platform publishing. Instead, it performs a specific read-only lookup against a TikTok Shop music genres endpoint. While this may loosely fall under API querying, the declared description is materially different because it focuses on SocialEcho team/account/content operations and authorized write-related workflows, whereas the actual code accesses a different, specific resource type not mentioned in the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The code implements a narrow read-only query against a TikTok Shop trending music endpoint. While the description broadly mentions TikTok Shop and explicit queries, it specifically frames the skill around team/account/content queries and user-authorized sync or cross-platform publishing. Trending music retrieval is a distinct capability and is not clearly represented by that description. The code also contains no write operation or confirmation flow. This is best classified as a description-behavior mismatch because the actual primary behavior is a specific TikTok Shop music-trending query absent from the declared purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code assigns a default lang value of zh_CN whenever the user does not explicitly provide --lang. This imposes a specific locale by default, which matches the policy concern for language/locale constraints without user choice or stated regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The X-Lang header allows both "zh_CN" and "en", but the default is set to "zh_CN", which means clients that do not explicitly choose a language will be driven to a specific locale. This appears repeatedly across the spec and is a natural-language locale policy issue because the file does not present this as an explicit user choice or a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The listAccounts operation again defaults X-Lang to "zh_CN" even though English is also supported, so omitted language selection results in an imposed locale. Because this pattern is repeated rather than isolated, it indicates a systematic language policy issue in the API description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The X-Lang header allows both "zh_CN" and "en", but the default is set to "zh_CN". This creates a natural-language locale policy issue because the skill will force a specific language when the caller does not explicitly choose one.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This endpoint again sets X-Lang to default to "zh_CN" while also supporting English. Automatically choosing Chinese without an explicit user preference violates the requirement to avoid forcing a language or locale absent opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The specification defaults X-Lang to "zh_CN" even though English is also supported. That means a specific locale is imposed unless the user overrides it, which is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The X-Lang header's default remains "zh_CN" despite bilingual support. This causes the skill to prefer one language automatically rather than offering a user-directed choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The report endpoint will default to Chinese-language behavior when no preference is supplied. Because English is also available, this is an avoidable forced locale choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This endpoint also hardcodes zh_CN as the default locale while supporting English. That introduces a policy issue by selecting a language for the user without consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The X-Lang header again defaults to zh_CN even though the API supports English. This reflects a language policy violation because a specific locale is imposed by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The endpoint's locale behavior defaults to Chinese in the absence of a user preference. Since another language option is available, the specification should not silently force one.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This endpoint continues the same pattern of setting zh_CN as the default language while also supporting English. That means the skill can respond in a forced locale without explicit user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The schema defaults X-Lang to zh_CN on this endpoint as well. Because this is not documented as a justified region-specific restriction, it appears to force a language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trending music endpoint also defaults to zh_CN despite offering English. This is a policy concern because the specification imposes a language choice when the user has not made one.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The prerequisites specify --lang as optional with default zh_CN, which imposes a specific locale by default. Under the policy, forcing a language or locale without user choice or explicit opt-in is a natural-language policy concern unless clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest includes a locale-specific documentation file named "platform-publish-limits_cn.md", which suggests the skill may ship or rely on Chinese-language material. In this file, there is no accompanying natural-language indication that users can choose their preferred language or that the locale restriction is justified, so this may conflict with language-choice policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script selects Chinese as the default language when no --lang argument is provided. This imposes a locale choice on the user rather than offering a neutral default or requiring explicit selection, which can violate language-choice policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

该文件是面对研发、运营和对外集成说明的技能文档,但全文以中文呈现,未见任何关于语言适用范围、可切换语言或需用户自行选择语言的说明。按规则,若技能或文档强制特定语言而没有用户 opt-in,属于自然语言层面的语言/locale 策略风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example content and title are hardcoded in Chinese ("示例内容", "示例标题"), which suggests a default language choice in user-facing material. For a general example payload, this can violate language/locale policy when no opt-in, alternative locale, or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The usage string presents --lang zh_CN as the language parameter example, which can indicate a default or expected forced locale without any mention of alternatives or user opt-in. This may violate language/locale policy guidance because the file contains natural-language guidance steering users toward a specific locale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.