T09 · Insecure Skill Coding Practices
- Location
MANUAL_PUSH.md:38- Finding
GitHub Access Token Exposed in Command-Line URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s main purpose is clear, but it should be reviewed carefully because it runs continuously, sends local file notifications to an external Feishu chat, and documents unsafe process and install practices.
Install only if you intentionally want a continuous local folder monitor that sends notifications to a Feishu group. Use a narrowly scoped watch directory, protect config.json because it contains Feishu secrets, restrict who can write the pending notification file, avoid the documented token-in-URL and `npx @latest` commands, and do not use the blanket python.exe kill command to uninstall.
MANUAL_PUSH.md:38GitHub Access Token Exposed in Command-Line URL
README.md:93Unpinned Package Execution Through npx
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
复制公钥:
Get-Content ~/.ssh/id_ed25519.pub | Set-Clipboard
The uninstall instructions use taskkill /F /IM python.exe, which forcibly terminates all Python processes on the host, not just this skill's components. This can disrupt unrelated applications, background jobs, development environments, or production automation, causing denial of service or data loss.
The file contains contradictory claims about whether the skill actually sends Feishu messages or only writes to a local queue file. This mismatch is dangerous because reviewers and users cannot reliably determine whether the skill performs network exfiltration, which weakens oversight and can hide later-introduced behavior changes.
The file contains contradictory claims about whether the skill actually sends Feishu messages or only writes to a local queue file. This mismatch is dangerous because reviewers and users cannot reliably determine whether the skill performs network exfiltration, which weakens oversight and can hide later-introduced behavior changes.
File contents flow to a network sink. This may indicate data exfiltration of sensitive files.
token_req = urllib.request.Request(token_url, data=token_data)
token_req.add_header('Content-Type', 'application/json')
with urllib.request.urlopen(token_req, timeout=10) as resp:
token_result = json.loads(resp.read().decode('utf-8'))
if token_result.get('code') != 0:
The script automatically forwards the full contents of a local notification file to an external Feishu chat with no content validation, redaction, approval step, or recipient allowlist enforcement beyond configured chat_id. In this skill context, a file-monitoring automation can unintentionally exfiltrate sensitive local data to a group chat if another process or user can write to the watched file.
msg_req.add_header('Content-Type', 'application/json')
msg_req.add_header('Authorization', f'Bearer {access_token}')
with urllib.request.urlopen(msg_req, timeout=10) as resp:
msg_result = json.loads(resp.read().decode('utf-8'))
if msg_result.get('code') == 0:
The instructions tell the user to place a GitHub personal access token directly in the remote URL for git push. Tokens embedded in command lines can be exposed via shell history, process listings, logs, clipboard history, screenshots, or copied terminal transcripts, which can lead to repository compromise.
The README advertises automatic sending of newly detected files to a Feishu group without prominently warning about the privacy and data-exfiltration implications. In this context, the skill's core function is data movement, so lack of explicit disclosure materially increases the chance users will expose sensitive files unintentionally.
The documented HEARTBEAT watchdog behavior adds process-inspection and restart capability beyond simple file monitoring and Feishu notification. Broadening a skill's operational scope increases trust and abuse risk because it introduces persistence-like behavior and system management actions not clearly necessary for the core function.
The README instructs users to run npx clawhub@latest install, which fetches and executes the latest remote package version without pinning. This creates a supply-chain risk: a compromised or maliciously updated package version could execute arbitrary code on the user's machine during installation.
The skill advertises automation that reads and writes files, launches PowerShell, and communicates over the network, but it declares no explicit tool scope or permissions. This creates an authorization and review gap: operators cannot easily assess or constrain what the skill is allowed to do before enabling an always-on monitor.
The skill lacks a prominent warning that it continuously monitors local files and may send resulting information to an external Feishu chat. In this context, silent monitoring plus outbound notification is security-sensitive because users may expose confidential file names or contents, especially when credentials and chat identifiers are preconfigured.
The trigger section says the monitor auto-triggers and HEARTBEAT runs as a daemon, but it does not define precise activation conditions, watched paths, or stop conditions. Ambiguous automatic execution in a persistent background process increases the chance of unreviewed surveillance, unintended repeated actions, and difficulty containing failures.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
log_line = f"[{timestamp}] {message}\n"
print(log_line, end='', flush=True)
try:
with open(LOG_FILE, 'a', encoding='utf-8') as f:
f.write(log_line)
except:
pass
The code is explicitly designed to transmit notification content and uses stored application credentials, but it provides no user-facing warning, consent mechanism, or in-code disclosure about external data transmission. In a file-monitor skill, this increases the chance that operators unknowingly send sensitive file contents to a third-party messaging platform.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
# 清空通知文件(强制刷新到磁盘)
try:
with open(NOTIFY_FILE, 'w', encoding='utf-8') as f:
f.write("# 待发送通知\n\n_当前没有待发送的通知_\n")
f.flush()
os.fsync(f.fileno()) # 强制刷新到磁盘
The module docstring and all visible status/messages are written only in Chinese, which imposes a specific language on users. The file does not provide any opt-in, fallback, or justification that this skill is intended exclusively for a Chinese-speaking or region-specific environment.
Natural-language policy requires avoiding forced language or locale constraints unless the skill offers user choice or clearly documents a justified regional limitation. This file presents all user-facing instructions only in Chinese and does not indicate that the language choice is optional or region-specific.
This markdown file uses a single fixed language throughout and does not mention that the skill or its operational documentation is Chinese-only. Under the natural-language policy rule, forcing a specific language without user opt-in can be a locale/language policy concern.
The skill description and operational guidance are presented entirely in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the language/locale policy, forcing a specific language without opt-in can be a policy concern.
The configuration guidance has users store Feishu credentials locally and the README also emphasizes detailed logging, but it does not warn that secrets or file/activity metadata may be exposed through local files and logs. This omission can lead to insecure handling of credentials and sensitive operational data.
Line L122 instructs use of Get-WmiObject Win32_Process to inspect running processes by command line. For a skill whose stated purpose is file monitoring and Feishu notification, querying system-wide process metadata is a broader host-inspection capability and is not obviously necessary from the manifest description alone.
The example value for "watch_dir" uses Chinese text ("你的监控目录") as the only illustrated directory name. In a config example, this can imply a language-specific expectation without any opt-in or explanation, which fits the policy category for forced language/locale behavior.
Natural-language strings in the module description force a specific language/locale for users and operators, and there is no opt-in or alternative language path. Under the policy, hard-coding a specific language without user choice is a locale-policy issue unless clearly justified as region-specific.
No suspicious patterns detected.