Back to skill

Security audit

调用自定义摘要 API

Security checks for vulnerabilities and agentic risk

Overview

This skill sends only the text a user asks to summarize to a disclosed external API, which matches its stated purpose but requires care with sensitive content.

Install only if you are comfortable sending the full text you ask it to summarize to the configured external API. Do not use it for passwords, API keys, private business documents, regulated data, or other sensitive material unless you trust that service and its retention practices.

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)

other

Warning
Location
SKILL.md:28
Finding

Unprotected Transmission of User Content to a Third-Party API

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28-55
Vulnerability Type: Unprotected Third-Party Data Disclosure
Risk Level: Medium

bash
API_URL="https://test-gig-c-api.1haozc.com/api/wx/kjj/v1/customer/skill/call"

USER_TEXT="$1"

curl -s -X POST "$API_URL" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d "{\"content\":\"$USER_TEXT\"}"

Technical Analysis

The skill sends the complete user-provided text to a nonstandard external API. Although the external request is documented and uses HTTPS, the skill does not require explicit user consent immediately before transmission, warn users against submitting sensitive information, redact sensitive values, or document the remote service's data retention and privacy guarantees.

Summarization inputs may contain personal information, credentials, confidential business documents, source code, or other proprietary material. All such content is placed in the content field and disclosed to the remote service without data minimization.

Attack Path

  1. A user asks the skill to summarize text containing confidential or personal information.
  2. The complete input is assigned to USER_TEXT.
  3. The skill constructs an HTTP request containing the complete input.
  4. curl transmits the request to test-gig-c-api.1haozc.com.
  5. The remote service receives the content and may process, log, or retain it according to policies not specified by the skill.

Impact Assessment

No local system privileges are obtained through this behavior. However, the operator of the remote endpoint can receive the complete submitted content. The disclosure scope is limited to data users provide for processing, but that data may include credentials, personal data, proprietary source code, internal documents, or regulated information. Subsequent use and retention cannot be assessed from the reviewed file.

Remediation
View remediation

Remediation Suggestions

  • Obtain explicit, informed user consent before transmitting content to the external service.
  • Clearly identify the destination domain and explain that the complete input will leave the local environment.
  • Warn users not to submit passwords, API keys, authentication tokens, personal information, regulated data, or confidential documents.
  • Detect and redact common sensitive values before transmission.
  • Minimize the transmitted data and send only the content required for the requested operation.
  • Document the remote provider's ownership, retention period, logging practices, deletion process, and privacy policy.
  • Prefer a trusted, contractually controlled, or locally hosted summarization endpoint for sensitive workloads.
  • Provide a local-processing alternative when the user declines external transmission.

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:52
Finding

Unsafe JSON Construction from Untrusted User Input

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 52-55
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: Low

bash
curl -s -X POST "$API_URL" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d "{\"content\":\"$USER_TEXT\"}"

Technical Analysis

Untrusted user text is interpolated directly into a JSON string without JSON-aware escaping. Input containing double quotes, backslashes, newlines, or other control characters can produce malformed JSON. Carefully crafted input may also terminate the intended content string and add or modify fields in the JSON object interpreted by the remote API.

This construction does not demonstrate shell command injection because $USER_TEXT is expanded inside a quoted shell argument. The confirmed weakness is improper JSON serialization and possible manipulation of the remote request structure.

Attack Path

  1. A user supplies text containing JSON metacharacters, such as ", \, or a crafted field separator.
  2. The shell substitutes the input directly into the request body.
  3. The resulting body becomes malformed JSON or contains attacker-controlled JSON fields.
  4. The remote API rejects the request or interprets a request structure different from the one intended by the skill.
  5. If the remote API recognizes additional behavior-controlling fields, the attacker may influence processing beyond the intended content value.

Impact Assessment

No local privilege escalation or shell command execution is established. The primary impact is loss of request integrity and availability: legitimate summaries may fail, submitted text may be altered, and the remote service may parse unintended fields. The maximum remote impact depends on the undocumented API schema and cannot be established from the reviewed project.

Remediation
View remediation

Remediation Suggestions

Construct the request body with a JSON-aware encoder rather than manual string interpolation. For example:

bash
jq -n --arg content "$USER_TEXT" '{content: $content}' |
  curl --fail-with-body --silent --show-error \
    -X POST "$API_URL" \
    -H "Content-Type: application/json; charset=UTF-8" \
    --data-binary @-

Additionally:

  • Validate that the encoder completed successfully before sending the request.
  • Set reasonable input-size limits to prevent oversized requests.
  • Use --fail-with-body, --show-error, and appropriate connection and request timeouts.
  • Treat the remote response as untrusted data and validate it against the expected response schema before presenting or processing it.
  • Add tests covering quotes, backslashes, Unicode, multiline input, control characters, and attempted JSON field injection.
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 (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly sends user-provided text to a third-party HTTPS API for processing, but the skill does not clearly warn users that their input will leave the local environment or describe the privacy implications. This can expose sensitive or confidential user content to an external service without informed consent, which is especially risky for summarization workflows where users may paste private data.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The Bash script transmits raw user input to an external endpoint using curl, creating a clear external data exfiltration path by design. In context, this is more dangerous because the skill is meant to process arbitrary user-supplied text, which may include sensitive business, personal, or credential material, and there is no minimization, sanitization, or consent gate before sending it off-platform.

Content

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

md
echo ""

# 核心:POST JSON 请求
curl -s -X POST "$API_URL" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d "{\"content\":\"$USER_TEXT\"}"

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language description and operational instructions are presented in Chinese without indicating that users may choose another language. This can violate language/locale policy when a skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.