Back to skill

Security audit

Social media autopilot

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its SocialEcho management purpose, but it tells users to pass a powerful API key on the command line where it can leak through local history or logs.

Review before installing. Use a narrowly scoped and easily revocable SocialEcho Team API Key, avoid pasting real keys into shell history or shared logs, rotate any key already used in command examples, and only run --execute after checking the exact target account and payload.

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

Team API Key Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: client.js:7-19, 48; documented usage in SKILL.md:24, 43-59, 66, 68
Vulnerability Type: Sensitive credential exposure through process arguments
Risk Level: Medium

Complete Code Snippet

js
export function parseArgs(argv) {
  const args = {};
  for (let i = 2; i < argv.length; i += 1) {
    const token = argv[i];
    if (!token.startsWith("--")) continue;
    const key = token.slice(2);
    const next = argv[i + 1];
    if (!next || next.startsWith("--")) {
      args[key] = true;
      continue;
    }
    args[key] = next;
    i += 1;
  }
  return args;
}
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")
  };
}

The documented invocation pattern includes:

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

Technical Analysis

The Team API key is required as a --api-key command-line argument and is read directly from process.argv. Secrets passed this way can be exposed through shell history, process inspection facilities, endpoint-monitoring software, audit logs, terminal recording, or automation logs.

This handling also conflicts with the security guidance in SKILL.md:12, which states that the key must never be persisted and specifically identifies shell history as a sensitive source. The implementation does not intentionally transmit the credential to unrelated hosts—the HTTP client restricts destinations to approved HTTPS SocialEch ...[truncated 1679 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove support for supplying API keys directly through ordinary command-line arguments.
  2. Read the key from standard input or a dedicated file descriptor, ensuring the value does not appear in process arguments.
  3. For interactive use, employ a hidden prompt with terminal echo disabled.
  4. For automation, accept the secret through a protected secret manager integration or inherited file descriptor rather than a command string.
  5. Update every example in SKILL.md so no example encourages secret-bearing command lines.
  6. Avoid printing the key in errors, debug logs, request traces, dry-run previews, or serialized option objects.
  7. Document key rotation and revocation procedures for users who may already have exposed keys through shell history or logs.
  8. Apply narrowly scoped server-side permissions and short key lifetimes where supported, limiting the impact of credential disclosure.
  9. Add automated tests confirming that process arguments and normal output do not contain the supplied credential.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (34)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description implies an operational integration skill that can interact with SocialEcho services and potentially perform user-authorized publishing or sync actions. The supplied code instead implements a simple documentation viewer for bundled platform limit markdown files. Its primary purpose is materially different from the declared purpose, and it lacks the described network/API behavior, user authorization handling, and live write safeguards.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied code does not implement TikTok Shop sync, cross-platform publishing, or any write operation requiring confirmation. Instead, it performs a specific read-only query against a Reddit communities endpoint for a provided account ID. While the description broadly mentions team/account/content queries via SocialEcho OpenAPI, it does not disclose Reddit community retrieval specifically, and its emphasis is on TikTok Shop sync and publishing. That makes the actual behavior materially narrower and directed at a different resource/domain than the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description centers on SocialEcho team/account/content queries and authorized TikTok Shop sync or cross-platform publishing. The supplied code instead only fetches TikTok Shop music genre information from a specific endpoint. While this is adjacent to TikTok Shop, it is a materially different and much narrower capability than the declared primary purpose, and the specific resource type (music genres) is not represented in the description. Therefore, this is a description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The prerequisites specify --lang as optional with a default of zh_CN, which imposes a specific locale if the user does not choose one. The policy requires offering language choice or documenting a justified locale constraint; this default is not paired with user opt-in or a region-specific 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 code sets the default lang option to zh_CN when the user does not provide --lang. This imposes a specific locale by default, and the file does not indicate any user choice or region-specific justification for that 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 X-Lang header defaults to "zh_CN", which forces a specific language/locale when the caller does not explicitly choose one. The policy requires language choice or documented justification; this spec provides an English option but still silently defaults users into Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This X-Lang definition again sets the default to "zh_CN", causing requests to use a specific locale unless the user overrides it. That is a natural-language policy issue because it imposes language behavior without explicit opt-in or justification.

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 here also defaults to "zh_CN", which means the skill will prefer Chinese even when the user has not requested it. The file does not justify this locale restriction as region-specific behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This parameter definition silently applies the Chinese locale by default. Because the user is not offered an explicit choice at invocation time and no justification is given, it conflicts with the language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default locale remains set to "zh_CN" for this endpoint, which imposes a language preference absent user consent. This is a policy concern even though another locale is available as an enum value.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This endpoint's X-Lang header defaults to Chinese, again forcing a locale choice the user may not have made. The spec does not indicate that the skill is limited to a Chinese-only context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The parameter silently defaults to "zh_CN" here as well. Without explicit user opt-in or a documented reason, this constitutes a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This repeated X-Lang declaration sets a Chinese default, which can override user expectations about response language. The policy allows locale constraints only when users opt in or the constraint is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The spec again defaults to "zh_CN" for X-Lang, creating a forced locale outcome when the user has not chosen a language. No region-specific rationale is documented for this behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This endpoint also defaults X-Lang to Chinese without any explicit user choice. Repeated forced locale defaults across the spec indicate a consistent policy issue rather than an isolated case.

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 for this endpoint defaults to "zh_CN", imposing a language preference automatically. The file offers no opt-in flow or clear justification for forcing that default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This manifest file applies a default language of zh_CN for request handling, which forces a specific locale when the caller does not explicitly choose one. The same pattern repeats across many endpoints, indicating the skill may operate in Chinese by default rather than offering a neutral default or requiring user selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This endpoint also defaults X-Lang to zh_CN, continuing a pattern of imposing a specific language automatically. Because the file supports both zh_CN and en, defaulting to one language without user choice is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The schema sets zh_CN as the default language even though English is also supported. This creates a forced locale behavior instead of giving the user a choice or preserving their existing preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This endpoint's language header defaults to zh_CN, which can cause responses or behavior in Chinese even when the user did not request it. That is a locale-policy issue because the file does not present this as an opt-in choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The endpoint sets zh_CN as the default value for X-Lang while also supporting English. Without documented justification for a region-specific constraint, this is a forced locale choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest continues to default the language header to zh_CN rather than requiring a user-selected locale. This can cause the skill to return content in a language the user did not choose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This endpoint automatically applies zh_CN as the language default despite supporting multiple locales. That is a policy concern because it imposes a specific language without user consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The schema again defaults X-Lang to zh_CN, which constitutes a forced locale selection. The file does not indicate that the tool is region-specific enough to justify this behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The endpoint defaults to zh_CN for X-Lang instead of making the language choice opt-in. Because English is available too, this is an avoidable locale-policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.