Back to skill

Security audit

Chinese Joke Api

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small Chinese joke fetcher that clearly matches its stated purpose and does not show hidden persistence, credential access, or remote code execution.

Install only if you are comfortable with the skill making outbound HTTPS requests to third-party joke services. Treat returned jokes as untrusted remote content, and avoid using it in environments where any external network request is restricted.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (12)

External Script Fetching

High
Category
Supply Chain
Content
**用法**:
```bash
curl "https://v1.hitokoto.cn?c=j"
```

参数:
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
**用法**:
```bash
curl "https://v1.hitokoto.cn?c=j"
```

参数:
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s "https://v1.hitokoto.cn?c=j" | python3 -m json.tool

# 获取简短笑话
curl -s "https://api.jokeapi.cn/joke/Any?safe-mode" | python3 -m json.tool
```

### 使用 Python
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
```bash
#!/bin/bash
# 获取一言搞笑
curl -s "https://v1.hitokoto.cn?c=j" | python3 -c "
import sys, json
d = json.load(sys.stdin)
print(f'「{d['hitokoto']}」')
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The title and overview explicitly define the skill as a Chinese joke API skill and all instructions/content are presented only in Chinese, with no opt-in or alternative language/locale path. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the constraint is clearly justified as region-specific.

External Transmission

Medium
Category
Data Exfiltration
Content
**用法**:
```bash
curl "https://api.jokeapi.cn/joke/Any?safe-mode"
```

## 快速开始
Confidence
86% confidence
Finding
The skill sends requests to a third-party API, which creates an external data transmission path and a dependency on an untrusted remote service. Even though the transmitted data here is only a joke request, using external endpoints can expose metadata such as IP address, request timing, and user-agent, and the remote content is not under the skill author's control.

External Transmission

Medium
Category
Data Exfiltration
Content
curl -s "https://v1.hitokoto.cn?c=j" | python3 -m json.tool

# 获取简短笑话
curl -s "https://api.jokeapi.cn/joke/Any?safe-mode" | python3 -m json.tool
```

### 使用 Python
Confidence
86% confidence
Finding
This example performs a live request to an external joke API, creating the same third-party transmission risk and trust boundary issue. While the payload is low sensitivity, the skill normalizes contacting untrusted infrastructure and consuming arbitrary remote content.

External Transmission

Medium
Category
Data Exfiltration
Content
print(f"{data['hitokoto']} - {data['from']}")

# 简短笑话
resp = requests.get("https://api.jokeapi.cn/joke/Any?safe-mode")
data = resp.json()
if data['type'] == 'single':
    print(data['joke'])
Confidence
87% confidence
Finding
The Python example fetches content from a third-party endpoint and parses its response, which is a real external transmission and remote-content ingestion path. In context the risk is moderate rather than high because no secrets are sent and the content is only printed, but it still introduces privacy, availability, and supply-chain concerns.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The script's natural-language interface, help text, and output messaging are entirely in Chinese, and its branding explicitly targets Chinese jokes, with no option or disclosure for alternate language/locale behavior. This can violate language/locale policy when a skill forces a specific language without user opt-in or documented justification.

External Transmission

Medium
Category
Data Exfiltration
Content
# 获取简短笑话
get_simple_joke() {
    local result
    result=$(curl -s --max-time 5 "https://api.jokeapi.cn/joke/Any?safe-mode" 2>/dev/null) || {
        echo "简短笑话 API 获取失败"
        return 1
    }
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The script makes an HTTP request to an external service using curl, which transmits system/request metadata such as IP address and user agent, but there is no explicit user warning about contacting third-party APIs. Although the script's purpose implies fetching remote jokes, the file itself does not disclose this network behavior in a user-facing way beyond function comments.

Missing User Warnings

Low
Confidence
85% confidence
Finding
This curl invocation sends a request to api.jokeapi.cn, but the script does not provide a clear warning or disclosure that it will reach out to an external service. For a safety/quality audit, external network access should be visibly disclosed to users, especially when contacting third-party endpoints.

Static analysis

No suspicious patterns detected.