Back to skill

Security audit

算力超市skills

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but it stores a tenant API key and the runtime can send it over unencrypted HTTP despite declaring an HTTPS-only boundary.

Review before installing. Only configure an HTTPS tenant URL, use a least-privilege API key with quotas, rotate it if HTTP was ever used, and require explicit user approval before uploads, destructive asset deletion, social-media lookup/list/search, or watermark-removal operations.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api-client.mjs:14
Finding

Bearer API Key Can Be Transmitted Over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: scripts/api-client.mjs:14-26, 71-79
Vulnerability Type: Insecure transport of authentication credentials
Risk Level: High

Vulnerable code:

js
export function normalizeBaseUrl(value) {
  const baseUrl = String(value || '').trim().replace(/\/+$/, '');
  if (!baseUrl) throw new Error('base_url is required. Configure credentials before calling the API.');
  let parsed;
  try {
    parsed = new URL(baseUrl);
  } catch {
    throw new Error('base_url must be an absolute http(s) URL.');
  }
  if (!['http:', 'https:'].includes(parsed.protocol)) throw new Error('base_url must use http or https.');
  return baseUrl;
}
js
export async function request(relativePath, options = {}, configuration = loadConfiguration()) {
  const response = await fetch(endpoint(relativePath, configuration), {
    ...options,
    headers: {
      Accept: 'application/json',
      Authorization: `Bearer ${configuration.apiKey}`,
      ...(options.headers || {}),
    },
  });

Technical Analysis

normalizeBaseUrl() accepts both HTTP and HTTPS tenant origins. The request() function subsequently attaches the persistent API key to every request as a Bearer credential.

When an ordinary http:// origin is configured, the Authorization header, request body, and response are transmitted without transport encryption or server authentication. This contradicts the HTTPS-only network boundary declared in manifest.yaml.

The issue affects discovery, model and application calls, task polling, and local-media uploads because all of them use the same request helper. The credential file's restrictive filesystem permissions do not protect a key once it is sent over an unencrypted connection.

Attack Path

  1. An attacker persuades a user to configure an http:// tenant origin, modifies the local configuration, or intercepts access to a legitimate HTTP depl ...[truncated 957 chars]
Remediation
View remediation

Remediation Suggestions

  • Reject all non-HTTPS tenant origins by default:

    js
    if (parsed.protocol !== 'https:') {
      throw new Error('base_url must use HTTPS.');
    }
    
  • If local development requires HTTP, permit it only for explicit loopback hosts such as 127.0.0.1, ::1, or localhost, and require a clearly named development-only opt-in.

  • Ensure the normalized URL does not contain username or password URL components.

  • Add automated tests confirming that public and private-network HTTP URLs are rejected.

  • Add an integration test verifying that authorization headers are sent only to approved HTTPS origins.

  • Keep the manifest and runtime enforcement consistent; do not rely solely on declarative httpsOutbound metadata.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build-contract-bundle.mjs:12
Finding

Documentation Bundle Builder Allows Source-Path Traversal

Content
View full analysis

Vulnerability Details

File Location: scripts/build-contract-bundle.mjs:12-20
Vulnerability Type: Path traversal and unintended local-file disclosure
Risk Level: Medium

Vulnerable code:

js
const manifestFile = path.join(sourceRoot, 'manifest.json');

if (!fs.existsSync(manifestFile)) throw new Error(`Missing documentation manifest: ${manifestFile}`);
const manifest = JSON.parse(fs.readFileSync(manifestFile, 'utf8'));
function safetyPrefix(document) {
  if (document.app_code !== 'watermark_removal') return '';
  return '## Authorized Use\n\nOnly process content the user owns or is authorized to process. Do not bulk collect social-media content, evade platform restrictions, or remove attribution from third-party media.\n\n';
}

const documents = manifest.documents.map((document) => ({
  ...document,
  contract_id: document.slug,
  content: `${safetyPrefix(document)}${fs.readFileSync(path.join(sourceRoot, document.file), 'utf8')}`,
}));

Technical Analysis

The builder treats document.file from manifest.json as a trusted relative path. path.join(sourceRoot, document.file) does not guarantee that the resulting path remains inside sourceRoot. A value containing parent-directory components, such as ../../sensitive-file, can escape the documentation tree.

An absolute path may also discard the intended base-directory boundary depending on path handling and input form. Additionally, the implementation does not account for symlinks inside the documentation tree that resolve outside it.

The selected file is read as UTF-8 and embedded directly into contracts.bundle.json. The builder does not itself send that content over the network, but the resulting artifact is intended for use, storage, and potential distribution as part of the Skill.

Attack Path

  1. An attacker supplies or modifies a documentation source tree or its manifest.json.
  2. The attacker sets a document's `fi ...[truncated 875 chars]
Remediation
View remediation

Remediation Suggestions

  • Reject absolute paths and normalize each manifest-supplied file path.

  • Resolve both the source root and candidate file, then verify containment:

    js
    const canonicalRoot = fs.realpathSync(sourceRoot);
    const candidate = fs.realpathSync(path.resolve(canonicalRoot, document.file));
    const relative = path.relative(canonicalRoot, candidate);
    
    if (relative.startsWith('..') || path.isAbsolute(relative)) {
      throw new Error(`Document path escapes source root: ${document.file}`);
    }
    
  • Use realpathSync() so symlink escapes are detected.

  • Optionally allow only expected documentation extensions such as .md.

  • Validate that manifest.documents is an array and that every document.file is a non-empty string.

  • Add tests covering ../ traversal, absolute paths, nested valid paths, and symlinks resolving outside the source tree.

  • Build artifacts in an isolated environment with no access to production credentials or unrelated sensitive files.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (34)

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The skill instructs the agent to read persistent credentials from a fixed file path before every network call, giving the skill direct access to a bearer API key. In a prompt-injection or skill-confusion scenario, this broad credential access increases the blast radius because the agent can authenticate to a tenant API and perform sensitive operations with long-lived secrets.

Content

Scanner excerpt · SKILL.md (reported line 15)May include surrounding context.

Before every network call, read persistent credentials from:

text
~/.likeadmin-market-skills/credentials.json

The user copies a JSON file to that exact location. Its only required fields are:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 32)May include surrounding context.

md
printf '%s\n%s\n' "$LIKEADMIN_MARKET_BASE_URL" "$LIKEADMIN_MARKET_API_KEY" | node scripts/api-client.mjs config import-lines

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 34)May include surrounding context.

md
printf '%s\n%s\n' "$LIKEADMIN_MARKET_BASE_URL" "$LIKEADMIN_MARKET_API_KEY" | node scripts/api-client.mjs config import-lines

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
printf '%s\n%s\n' "$LIKEADMIN_MARKET_BASE_URL" "$LIKEADMIN_MARKET_API_KEY" | node scripts/api-client.mjs config import-lines

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 103)May include surrounding context.

md
printf '%s\n%s\n' "$LIKEADMIN_MARKET_BASE_URL" "$LIKEADMIN_MARKET_API_KEY" | node scripts/api-client.mjs config import-lines

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

md
3. Read [capability-catalog.json](references/capability-catalog.json) for type contracts, then use `node scripts/read-contract.mjs <contract-id|model-code|app-c

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

md
3. Read [capability-catalog.json](references/capability-catalog.json) for type contracts, then use `node scripts/read-contract.mjs <contract-id|model-code|app-c

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

md
og.json](references/capability-catalog.json) for type contracts, then use `node scripts/read-contract.mjs <contract-id|model-code|app-code/api-code>` for the ma

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
og.json](references/capability-catalog.json) for type contracts, then use `node scripts/read-contract.mjs <contract-id|model-code|app-code/api-code>` for the ma

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 78)May include surrounding context.

md
Use [workflow-runner.mjs](scripts/workflow-runner.mjs) for fragile, repeatable chains after the agent has made the required capability and template choices. It

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
- [contracts.bundle.json](references/contracts.bundle.json): full local contract bundle; use `read-contract.mjs` to retrieve a single document without loading a

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The reference bundle exposes many capabilities far beyond the skill metadata’s stated scope, including social-media scraping, watermark removal, voice cloning, and various media transformation workflows. This scope expansion is dangerous because a caller or downstream agent may invoke undocumented/high-risk behaviors under the trust boundary of a skill that appears to be limited to tenant-scoped workflow orchestration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The bundle includes endpoints for watermark removal and social-media content enumeration/search (e.g., user note/video lists, search, detail scraping) that are not justified by the skill’s stated purpose. These capabilities materially increase abuse potential for unauthorized scraping, attribution stripping, and policy evasion, especially when bundled into a general workflow skill.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · manifest.yaml (reported line 26)May include surrounding context.

yaml
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const CONFIG_FILE_NAME = 'credentials.json';

export function credentialsDirectory(homeDirectory = os.homedir()) {
  return path.resolve(homeDirectory, '.likeadmin-market-skills');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · manifest.yaml (reported line 27)May include surrounding context.

yaml
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const CONFIG_FILE_NAME = 'credentials.json';

export function credentialsDirectory(homeDirectory = os.homedir()) {
  return path.resolve(homeDirectory, '.likeadmin-market-skills');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · manifest.yaml (reported line 35)May include surrounding context.

yaml
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const CONFIG_FILE_NAME = 'credentials.json';

export function credentialsDirectory(homeDirectory = os.homedir()) {
  return path.resolve(homeDirectory, '.likeadmin-market-skills');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · manifest.yaml (reported line 43)May include surrounding context.

yaml
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const CONFIG_FILE_NAME = 'credentials.json';

export function credentialsDirectory(homeDirectory = os.homedir()) {
  return path.resolve(homeDirectory, '.likeadmin-market-skills');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · manifest.yaml (reported line 45)May include surrounding context.

yaml
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const CONFIG_FILE_NAME = 'credentials.json';

export function credentialsDirectory(homeDirectory = os.homedir()) {
  return path.resolve(homeDirectory, '.likeadmin-market-skills');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/api-client.mjs (reported line 8)May include surrounding context.

js
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const CONFIG_FILE_NAME = 'credentials.json';

export function credentialsDirectory(homeDirectory = os.homedir()) {
  return path.resolve(homeDirectory, '.likeadmin-market-skills');

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill explicitly performs network operations against a tenant API but does not declare an allowlist or permission scope limiting which tools/endpoints may be used. In agent environments, missing tool-scope declarations weaken containment and make prompt-driven misuse or accidental expansion of network access more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Line L086 directs the agent to 'communicate in the user's language,' which imposes a language policy in the skill instructions without documenting an opt-in mechanism or a region-specific necessity. Under the stated policy criteria, language/locale constraints should either offer explicit choice or be clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON catalog consistently presents human-facing capability titles and many descriptions in Chinese, including mixed Chinese-only labels such as “开放 API 指南”, “语音TTS”, and numerous Chinese parameter descriptions. Because the file contains no documented locale-selection mechanism or justification for a China-specific scope, it appears to hard-code a language/locale for users rather than offering choice.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The catalog exposes broad social-media lookup and media extraction capabilities under a misleading watermark-removal namespace, enabling scraping of user content, profiles, and media beyond the skill’s core workflow unless tightly gated. In this skill context, that is risky because the skill is intended for tenant-configured 算力超市 operations and could be repurposed for bulk social-content collection without clear user intent or least-privilege scoping.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The endpoint is labeled as watermark removal, but its parameters and semantics indicate social-share link resolution and media retrieval, which can mislead downstream agents or users into invoking a content-extraction feature they did not intend. This mismatch increases the chance of unauthorized scraping behavior being hidden behind a benign-sounding label and weakens policy enforcement based on capability names.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

This JSON bundle embeds natural-language documentation almost entirely in Chinese across many content fields, including user-facing titles, instructions, and examples. For a general API reference bundle, mandating one language without opt-in or an explicit region-specific justification can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.