Back to skill

Security audit

AI快手信息源

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear Kuaishou report-generation purpose, but its subscription and preview features create credential, persistence, and local proxy risks that should be reviewed before installation.

Install only if you are comfortable with a skill that contacts RedFox, stores HTML reports locally, starts a localhost preview server, and can install a daily scheduled task. Avoid --subscribe until the shell command construction and plaintext API-key storage are fixed, rotate any exposed shared or local API keys, and treat generated reports as potentially unsafe HTML if upstream content is untrusted.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (6)

T06 · System Persistence

Warning
Location
assets/daily_report.py:1077
Finding

Opt-in Installation of a Persistent Scheduled Task

Content
View full analysis
/dev/null; echo "{cron_line}") | crontab -', shell=True, check=True, capture_output=True ) info("订阅成功! 每天 09:00 自动生成快手爆款日报 (crontab)") ``` The macOS implementation similarly writes a LaunchAgent property list and loads it with `launchctl`. ### Technical Analysis The `--subscribe` operation modifies the user's crontab so that the script executes every day at 09:00. This behavior survives completion of the current Skill run and future login sessions. The persistence is documented in `SKILL.md` and requires the user to select `--subscribe`, so it is not covert. Nevertheless, scheduled execution is not required for one-time report generation and exceeds the minimum privileges needed for the Skill's core report-generation function. Once installed, subsequent report generation and associated network access occur without renewed per-run approval. The scheduled task executes the script by its existing filesystem path. If that file or a parent directory is writable by another account or compromised process, replacing the script would turn the scheduled task into a recurring arbitrary-code execution mechanism. ### Attack Path 1. The user runs `daily_report.py --subscribe`. 2. The Skill modifies the user's crontab or installs a macOS LaunchAgent. 3. The scheduled task persists after the current execution ends. 4. An attacker who can replace or modify the referenced script changes its contents. 5. At the next scheduled time, the modified code executes with the subscribing user's privileges. ### Impact Assessment The scheduled task runs with the privileges of the ...[truncated 373 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/daily_report.py:1078
Finding

Shell Command Injection Through the Skill Installation Path

Content
View full analysis
/dev/null; echo "{cron_line}") | crontab -', shell=True, check=True, capture_output=True ) ``` A related vulnerable construction is present during unsubscription at lines 1110-1114: ```python script_path = os.path.abspath(__file__) try: subprocess.run( f'crontab -l 2>/dev/null | grep -v "{script_path}" | crontab -', shell=True, check=True, capture_output=True ) ``` ### Technical Analysis The absolute path of the Python script is interpolated directly into shell command strings that are executed with `shell=True`. Filesystem paths can contain spaces, quotes, command substitutions, semicolons, and other shell metacharacters. The path is placed inside double quotes for the `echo` and `grep` portions, but double quotes do not neutralize all shell syntax. In particular, command substitution using `$()` or backticks remains active inside double-quoted strings. A crafted extraction or installation directory can therefore alter the command interpreted by the shell. No administrator elevation is required because the command executes with the privileges of the user invoking `--subscribe` or `--unsubscribe`. ### Attack Path 1. An attacker causes the Skill package to be extracted or installed under a directory whose name contains shell syntax, such as a command-substitution expression. 2. The victim runs the documented `--subscribe` or `--unsubscribe` option. 3. `os.path.abspath(__file__)` returns the attacker-influenced path. 4. The path is inserted into a shell command without safe argument handling. 5. `/bin/sh` evaluates the injected syntax because `shell=True` is enabled. 6. The a ...[truncated 448 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
assets/daily_report.py:1026
Finding

API Key Persisted in Plaintext LaunchAgent Configuration

Content
View full analysis
EnvironmentVariables {ENV_KEY} {api_key} """ ``` The generated content is subsequently persisted at line 1066: ```python plist_path.write_text(plist_content, encoding="utf-8") ``` ### Technical Analysis When the macOS subscription is installed and `REDFOX_API_KEY` exists in the environment, its value is copied into the LaunchAgent property-list file as plaintext. This converts a process-scoped secret into a durable credential stored on disk. The code does not explicitly establish restrictive permissions before or after writing the file. The API key is also inserted into XML without escaping, which can corrupt the property list if the value contains XML-significant characters. The persistent credential is unnecessary if a protected operating-system credential store or narrowly scoped runtime credential helper is used. ### Attack Path 1. The user exports `REDFOX_API_KEY`. 2. The user runs `daily_report.py --subscribe` on macOS. 3. The Skill embeds the API key in a property-list file under `~/Library/LaunchAgents`. 4. A local process, backup, support bundle, or accidental file disclosure obtains the plist. 5. The exposed API key is reused against the RedFox API. ### Impact Assessment The exposed credential grants whatever API permissions and quota are associated with the user's RedFox key. It does not directly grant operating-system privileges, but it may permit unauthorized API requests, consumption of account quota, and access to data available through that account. The exposure persists until the property-list file is securely removed or the API key ...[truncated 17 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/investigator-config.json:10
Finding

Hardcoded API Credential in Distributed Configuration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/daily_report.py:1137
Finding

Unrestricted Loopback URL Proxy Enables Server-Side Request Forgery

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (55)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
---
name: ks-ai-feed
description: 快手AI内容日报生成工具。每日自动扫描快手平台AI创作内容,按播放量筛选爆款视频并智能聚类,生成深色主题HTML日报(含封面图、互动数据、视频直链),同步输出AI情报洞察(热度TOP话题、起量信号、核心达人、推荐调查方向)。当用户需要AI快手日报、快手爆款、AI快手热点、快手AI内容、快手AI视频、快手情报时使用。触发词:AI快手日报、快手爆款、快手AI热点、快手情报、快手AI视频。
---

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The report generation path embeds sensitive credentials into plain-text output files. Because HTML reports are saved to a user-accessible Downloads directory and later opened in a browser, the secret is exposed at rest and during viewing.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The generated report injects the API key directly into HTML, exposing the credential to anyone who can read the file or view source in the browser. Since the same report is served over a local HTTP server, this also increases the chance of unintended disclosure through the browser or local web content.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The subscription installer writes the API key into the LaunchAgent plist as an environment variable. That stores the secret in plaintext on disk and makes it available to other local users or tools that can read LaunchAgent definitions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The shell command used to remove the cron entry is vulnerable to parameter abuse because script_path is interpolated into a shell and grep expression without robust escaping. An attacker who controls the installation path can inject shell syntax and execute arbitrary commands when unsubscribe runs.

Content

Scanner excerpt · assets/daily_report.py (reported line 1111)May include surrounding context.

python
else:
        script_path = os.path.abspath(__file__)
        try:
            subprocess.run(
                f'crontab -l 2>/dev/null | grep -v "{script_path}" | crontab -',
                shell=True, check=True, capture_output=True
            )

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/report_template.html (reported line 8)May include surrounding context.

html
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI快手信息源 - {{DATE}}</title>

<!-- Fonts: Archivo Black (display) + Space Grotesk (body) -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest defines a remote record submission endpoint and authentication details but does not warn users that investigation records or query-derived data may be transmitted externally. In an intelligence/investigation context, this is especially sensitive because queries may contain names, organizations, targets, or incident details that users would not expect to leave the local workflow.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The configuration not only hardcodes an API key but explicitly encourages reuse of that default key for authenticated record submission. This normalizes shared-secret distribution, making abuse, impersonation, quota theft, and uncontrolled third-party data submission far more likely; in this skill's context, that can expose sensitive investigation activity and associated metadata.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Line L51 says users can 'Simply describe your needs in natural language — no commands to memorize,' but it does not define clear trigger boundaries, exclusions, or negative examples. This can cause ambiguous activation because many ordinary requests about trends or reports could match unintentionally.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example phrases in L57-L60 are natural conversational requests such as 'Show me what's trending...' and 'Set up daily ... for me' without any invocation constraints or negative examples. Because the README presents them as sufficient activation language, the trigger scope remains ambiguous and may collide with everyday conversation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README tells users they can invoke the skill with unrestricted natural-language requests, without requiring an explicit skill name, command prefix, or clear activation boundary. In agent environments that route requests based on semantic matching, this increases the chance of unintended invocation and prompt-surface expansion, which can cause the skill to activate on unrelated user requests and access external data or subscriptions unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example trigger phrases are generic conversational requests that look like ordinary chat, not tightly scoped skill invocations. This makes accidental triggering more likely in multi-skill or agentic systems, especially because some examples perform actions like enabling a daily subscription, which could be invoked without a strong activation boundary or confirmation flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs users to place an API token in environment variables, CLI arguments, or a plaintext config file, but it does not warn about exposure risks such as shell history, process listing leakage, or insecure file permissions. This can lead to credential disclosure and unauthorized use of the external service, especially in shared or multi-user environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill directs users to generate local HTML reports and run a preview service that also exposes search and image proxy endpoints, but it does not clearly disclose the privacy and security implications of creating local artifacts and opening a local HTTP server. Users may unknowingly serve sensitive report data to other local users/processes or broaden attack surface via proxy-style endpoints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file mandates a fixed output structure entirely in Chinese and states the format is compulsory, without indicating that users may choose another language. This is a natural-language policy issue because it imposes a specific language rather than offering locale choice or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script’s natural-language interface, usage messaging, report content, and generated HTML are all fixed in Chinese, and the fallback template hardcodes lang="zh-CN". There is no opt-in or user-selectable language/locale behavior, which can violate language/locale policy when skills are expected to avoid forcing a locale without user choice.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 60)May include surrounding context.

python
DATA_UPDATE_HOUR = 15   # 数据更新时间(小时)
DATA_UPDATE_MINUTE = 0 # 数据更新时间(分钟)

PLIST_LABEL = "com.qoder.ks-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

# ─── 终端颜色 ──────────────────────────────────────────────────────────────────────

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 61)May include surrounding context.

python
DATA_UPDATE_HOUR = 15   # 数据更新时间(小时)
DATA_UPDATE_MINUTE = 0 # 数据更新时间(分钟)

PLIST_LABEL = "com.qoder.ks-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

# ─── 终端颜色 ──────────────────────────────────────────────────────────────────────

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1021)May include surrounding context.

python
DATA_UPDATE_HOUR = 15   # 数据更新时间(小时)
DATA_UPDATE_MINUTE = 0 # 数据更新时间(分钟)

PLIST_LABEL = "com.qoder.ks-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

# ─── 终端颜色 ──────────────────────────────────────────────────────────────────────

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1097)May include surrounding context.

python
DATA_UPDATE_HOUR = 15   # 数据更新时间(小时)
DATA_UPDATE_MINUTE = 0 # 数据更新时间(分钟)

PLIST_LABEL = "com.qoder.ks-ai-feed"
PLIST_DIR = Path.home() / "Library" / "LaunchAgents"

# ─── 终端颜色 ──────────────────────────────────────────────────────────────────────

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Installing scheduled tasks via LaunchAgents or crontab creates persistence on the host, which is broader than the core purpose of generating a one-off report. In a skill context, persistence increases blast radius because the code will continue to run and access credentials without repeated user review.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The subscription installer function explicitly creates a LaunchAgent, establishing host persistence. In the context of a reporting utility, that exceeds minimal functionality and can silently extend future code execution and credential use.

Content

Scanner excerpt · assets/daily_report.py (reported line 1020)May include surrounding context.

python
def install_subscription():
    """安装定时任务,每天自动生成日报"""
    if sys.platform == "darwin":
        PLIST_DIR.mkdir(parents=True, exist_ok=True)
        plist_path = PLIST_DIR / f"{PLIST_LABEL}.plist"

        script_path = os.path.abspath(__file__)

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1021)May include surrounding context.

python
"""安装定时任务,每天自动生成日报"""
    if sys.platform == "darwin":
        PLIST_DIR.mkdir(parents=True, exist_ok=True)
        plist_path = PLIST_DIR / f"{PLIST_LABEL}.plist"

        script_path = os.path.abspath(__file__)
        log_path = str(Path.home() / "Library" / "Logs" / "qoder-ks-ai-hot-articles.log")

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1097)May include surrounding context.

python
"""安装定时任务,每天自动生成日报"""
    if sys.platform == "darwin":
        PLIST_DIR.mkdir(parents=True, exist_ok=True)
        plist_path = PLIST_DIR / f"{PLIST_LABEL}.plist"

        script_path = os.path.abspath(__file__)
        log_path = str(Path.home() / "Library" / "Logs" / "qoder-ks-ai-hot-articles.log")

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · assets/daily_report.py (reported line 1098)May include surrounding context.

python
"""安装定时任务,每天自动生成日报"""
    if sys.platform == "darwin":
        PLIST_DIR.mkdir(parents=True, exist_ok=True)
        plist_path = PLIST_DIR / f"{PLIST_LABEL}.plist"

        script_path = os.path.abspath(__file__)
        log_path = str(Path.home() / "Library" / "Logs" / "qoder-ks-ai-hot-articles.log")

Static analysis

No suspicious patterns detected.