Back to skill

Security audit

每日有趣内容

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed daily Chinese entertainment-content generator that searches the web, caches results locally, and serves a random cached item, with manageable prompt-injection and scheduling risks.

Install only if you want Chinese-language daily entertainment content and are comfortable enabling a daily scheduled web search. Treat returned jokes, memes, and chat tips as untrusted quoted content, and do not let instructions embedded in fetched text control the agent.

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
scripts/generate.mjs:63
Finding

Untrusted Web Search Content Is Cached and Directly Exposed to the Agent

Content
View full analysis
0) { // 提取搜索结果文本 const text = searchResult.content[0].text; console.log(`[Search] 找到结果`); return text; } ``` Search-result lines are selected using only length constraints: ```js const jokes = jokesResult .split('\n') .filter(line => line.length > 20 && line.length < 200) .slice(0, 2); jokes.forEach(joke => { items.push({ type: 'joke', content: joke.trim() }); }); ``` The same pattern is applied to meme content: ```js const lines = memesResult .split('\n') .filter(line => line.length > 10 && line.length < 150) .slice(0, 2); lines.forEach(line => { items.push({ type: 'meme', title: '网络热梗', content: line.trim() }); }); ``` It is also applied to chat-tip content: ```js const tips = tipsResult .split('\n') .filter(line => line.length > 30 && line.length < 200) .slice(0, 2); tips.forEach(tip => { items.push({ type: 'chat_tip', content: tip.trim() }); }); ``` The resulting external content is written to the persistent cache without validation or sanitization: ```js fs.writeFileSync(cacheFile, JSON.stringify(cache, null, 2)); ``` The cache is subsequently parsed and a randomly selected item is returned without validating its schema or content: ```js const cache = JSON.parse(fs.readFileSync(cacheFile, 'utf-8')); ``` ```js const randomItem = cache.items[Math.floor(Math.random() * cache.items.length)]; return { success: true, item: random ...[truncated 3370 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (8)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/generate.mjs

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description, search strategy, and examples are all explicitly Chinese-language, and the cron configuration hard-codes Asia/Shanghai. There is no indication that users can choose another language/locale or that the restriction is a documented region-specific requirement, which fits the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JSON content presents all user-facing text in Chinese across jokes, memes, and chat tips, but the file does not indicate that Chinese is optional or that the skill is intentionally limited to a Chinese-speaking audience. Under the language/locale policy, forcing a specific language without opt-in or documented justification 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
93% confidence
Finding

The script description, status messages, search queries, and fallback content are all written for a Chinese-language context with no indication that users can choose another language or locale. This creates a language policy issue because the skill implicitly assumes and enforces one locale rather than offering a choice or documenting a justified regional restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes a daily content generator that searches the web, caches jokes/memes/chat tips, and serves them later. While network search is expected, invoking a globally installed external program via child_process adds a general process-execution capability not implied by that purpose and expands what the script can do beyond ordinary HTTP/search access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code fetches content from web search results and persists it to a local JSON cache file. While there are console logs for search and cache location, there is no explicit disclosure that externally sourced content will be stored on disk, which is a user-impacting file write operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs automatic web searching on a schedule and writing results to a local cache file, but it does not present a clear user-facing warning, consent boundary, or data-handling notice. This is dangerous because scheduled network access and filesystem writes expand the skill's operational footprint and can surprise users or administrators, especially in unattended cron execution contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script emits user-facing status and error messages in Chinese (for example at L21, L33, and L41) while other parts of the file, including the title comment, are in English. This imposes a locale/language choice on users without offering an alternative or documenting that the skill is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/generate.mjs:49