Back to skill

Security audit

Daily Memory Summary

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says at a high level, but it archives sensitive clipboard and notification content on a schedule and also parses contact-like information that is not clearly disclosed.

Review before installing or scheduling. This skill can preserve passwords, tokens, private messages, or business notifications if those appear in clipboard or notification logs. Use it only in a private workspace with clear consent, add redaction and file-permission controls, remove the stdout preview, and either document or remove the contact-extraction logic.

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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/summarize.sh:20
Finding

Unfiltered Clipboard and Notification Data Is Persisted and Exposed in Process Output

Content
View full analysis
/dev/null | head -1) if [ -n "$CLIPBOARD_FILE" ]; then CLIPBOARD_CONTENT=$(cat "$CLIPBOARD_FILE") else CLIPBOARD_CONTENT="今日无剪贴板记录" fi else CLIPBOARD_CONTENT="无剪贴板数据" fi ``` ```bash if [ -d "$NOTIF_DIR" ]; then NOTIF_FILE=$(ls -t "$NOTIF_DIR"/*.md 2>/dev/null | head -1) if [ -n "$NOTIF_FILE" ]; then NOTIF_CONTENT=$(cat "$NOTIF_FILE") else NOTIF_CONTENT="今日无通知记录" fi else NOTIF_CONTENT="无通知数据" fi ``` ```bash cat > "$OUTPUT_FILE" << EOF === 今日剪贴板(用户输入)=== $CLIPBOARD_CONTENT === 今日通知(收到的消息)=== $NOTIF_CONTENT === 今日联系人更新 === $CONTACTS_UPDATE_LOG EOF echo "" echo "✅ 完成!" echo " - Memory: $OUTPUT_FILE" echo " - Contacts: $CONTACTS_DIR" echo "" echo "--- 预览 (前30行) ---" head -30 "$OUTPUT_FILE" ``` ### Technical Analysis The script reads raw clipboard and notification records without applying data classification, secret detection, redaction, or content minimization. Clipboard and notification data commonly contain passwords, authentication tokens, password-reset links, private correspondence, email addresses, internal project details, and other sensitive information. The resulting data is written in plaintext to `memory/YYYY-MM-DD.md`. The script does not establish a restrictive `umask` or explicitly set the output file to owner-only permissions. Consequently, the effective permissions depend on the invoking environment and may allow unintended local access. The final `head -30 "$OUTPUT_FILE"` command also writes the first 30 lines of this sensitive output to standard output. When invoked through a scheduled task, stdout may be retained in task logs, monitoring systems, termina ...[truncated 1457 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/summarize.sh:47
Finding

Predictable Temporary File Allows Symbolic-Link File Modification

Content
View full analysis
/dev/null | \ grep -oE "[A-Za-z]+@[a-z]+\.lenovo\.com|[A-Z][a-z]+ [A-Z][a-z]+|.{2,10} (联想|DT|Brad)|.{2,5}团队" | \ sort -u >> /tmp/contacts_$$.txt fi done # 合并到现有联系人库 if [ -f /tmp/contacts_$$.txt ]; then CONTACTS_UPDATE_LOG="今日新增联系人和身份已记录" # 清理 rm -f /tmp/contacts_$$.txt else CONTACTS_UPDATE_LOG="今日无新增联系人" fi ``` ### Technical Analysis The script constructs a temporary filename using the process ID: ```bash /tmp/contacts_$$.txt ``` Process IDs are predictable and come from a finite, reusable range. The file is not securely created before use. Instead, shell append redirection opens the pathname directly and follows symbolic links. A local attacker who can predict or observe the script's process ID can create `/tmp/contacts_.txt` as a symbolic link to another file before the redirection occurs. The script then opens the link target with the permissions of the account running the scheduled task and appends extracted contact data to it. The `/tmp` sticky bit, where enabled, does not prevent an attacker from creating a previously absent filename. The subsequent `rm -f` removes the temporary pathname rather than undoing modifications made to the symbolic-link target. ### Attack Path 1. A local attacker determines that the script runs on a known schedule and predicts or observes its likely process ID. 2. Before the script performs its first append, the attacker creates a symbolic link such as: ```bash ln -s /path/to/target /tmp/contacts_.txt ``` 3. The script executes: ```bash sort -u >> /tmp/contacts ...[truncated 1088 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented purpose says the skill only reads clipboard and notification data and writes a daily memory file, but the finding indicates additional behavior involving extracting contact information from notifications and updating a separate contacts knowledge store. That is a meaningful scope expansion into a different data domain and storage location, which can lead to silent collection, persistence, and secondary use of sensitive personal data without clear disclosure or consent.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/summarize.sh (reported line 59)May include surrounding context.

sh
if [ -f /tmp/contacts_$$.txt ]; then
    CONTACTS_UPDATE_LOG="今日新增联系人和身份已记录"
    # 清理
    rm -f /tmp/contacts_$$.txt
else
    CONTACTS_UPDATE_LOG="今日无新增联系人"
fi

Ssd 3

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script copies raw clipboard and notification contents into a persistent plaintext memory file, which is a direct data-leak risk. Because these sources often contain credentials, confidential business messages, personal data, or one-time codes, storing them verbatim increases blast radius from local compromise, accidental sharing, backup leakage, or later ingestion by other tools.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Clipboard contents and notifications routinely contain highly sensitive material such as passwords, one-time codes, private messages, and personal identifiers. Omitting a clear warning about this processing increases the risk that users enable or schedule the skill without understanding that it aggregates and persists sensitive data into memory files.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level comment states the script reads computer_io data, writes daily memory, and updates the contact library. However, the contact-processing block only appends matches to /tmp/contacts_$$.txt, sets a status message, and deletes the temp file; CONTACTS_DIR is never written.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The declared purpose is daily memory summarization, but the script additionally mines notification content for identities and organizational affiliations. Expanding collection from message content into contact profiling increases surveillance scope and privacy risk, especially because the extracted identities are unrelated to the minimum functionality needed for a daily summary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script scans notification data to derive contact names, emails, and affiliations without clear disclosure or consent. This creates an undocumented profiling behavior that broadens the privacy impact beyond simple note-taking and can reveal relationship graphs or corporate identities from routine messages.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persists raw clipboard and notification contents into a daily markdown file without any warning, minimization, or filtering. Clipboard and notifications commonly contain passwords, tokens, personal messages, and business data, so silent archival materially increases exposure if the workspace is accessed, synced, or backed up.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script description and user-facing output are written in Chinese, indicating a fixed language choice for interaction. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.