Back to skill

Security audit

Daily Diary

Security checks for vulnerabilities and agentic risk

Overview

This diary skill has a coherent purpose, but it can automatically review private conversation history and its sample schedule may send diary drafts to a group chat.

Install only if you are comfortable with the agent reviewing your daily conversation history. Before enabling the cron job, change delivery to a verified private owner-only destination, avoid group or broadcast channels, and consider disabling autosave of unreviewed drafts or requiring confirmation before each archive or send.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:15
Finding
Overbroad Access to Conversation History and Unspecified Personality Files## Vulnerability Details **File Location**: `SKILL.md`, lines 15-25 and 143-147 **Vulnerability Type**: Excessive access to private user data **Risk Level**: Medium ### Vulnerable Code ```markdown ## Step 1: Review Conversations Scan all conversations from today. Extract: - **Topics discussed** — projects, domains, problems worked on - **Concrete achievements** — tasks completed, features shipped, issues resolved - **Key decisions** — choices made and their rationale - **Challenges** — blockers, bugs, frustrations encountered - **Insights** — ideas, lessons learned, perspectives shifted ``` ```markdown ## Security - Filter all sensitive data (credentials, personal identity info, etc.) before writing. When uncertain, omit. - Diary files are local-only. Never transmit beyond the configured delivery channel. - May read user personality files to match writing style, but never copy raw content into entries. ``` ### Technical Analysis The Skill directs the Agent to scan every conversation from the current day rather than requiring the user to select relevant conversations. It also permits access to unspecified “personality files” without defining an approved path, schema, data owner, or minimum set of fields. These instructions exceed a narrowly scoped diary-generation workflow. The sensitive-data filter only governs what is included in the resulting diary; it does not prevent sensitive source material from first being loaded into the Agent's working context. Consequently, credentials, identity information, confidential discussions, infrastructure details, or behavioral profiles may be processed before redaction occurs. The broad scope also makes the feature vulnerable to indirect prompt injection. Untrusted instructions embedded in a reviewed conversation or personality file could be exposed to the Agent during diary generation. Although the reviewed files do not explicitly instruct the Agent to execute such emb ...[truncated 1553 chars]
Remediation
## Remediation Suggestions 1. Require explicit, informed user consent before reviewing conversation history. 2. Let the user select the conversations or sessions to include instead of scanning all conversations by default. 3. Apply date, ownership, and access-control checks before loading any conversation. 4. Remove personality-file access unless it is essential. If retained, restrict it to one documented, user-approved path within a dedicated directory. 5. Define an allowlist of style attributes that may be read, rather than loading raw personality-file contents. 6. Treat all reviewed conversation and file content as untrusted data. Explicitly instruct the Agent not to follow commands found inside source material. 7. Perform deterministic secret and personal-data filtering before source content is inserted into the diary-generation context where supported. 8. Present a list of selected sources to the user and allow exclusions before generation. 9. Record access in a privacy-preserving audit log without storing the reviewed source content.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:116
Finding
Automated Diary Delivery Example Targets a Group Chat Despite Owner-Only Policy## Vulnerability Details **File Location**: `SKILL.md`, lines 116-132 and 143-149 **Vulnerability Type**: Unsafe delivery configuration causing potential private-data disclosure **Risk Level**: High ### Vulnerable Code ```markdown ```json { "name": "daily-diary", "schedule": { "expr": "0 20 * * *", "kind": "cron", "tz": "Asia/Shanghai" }, "sessionTarget": "isolated", "payload": { "kind": "agentTurn", "message": "It's evening diary time. Review today's conversations and generate a diary draft following the daily-diary skill workflow.", "timeoutSeconds": 180 }, "delivery": { "channel": "feishu", "mode": "announce", "to": "chat:<group-id>" } } ``` Adjust `tz`, `channel`, and `to` for your setup. ``` This configuration conflicts with the following stated security requirement: ```markdown ## Security - Filter all sensitive data (credentials, personal identity info, etc.) before writing. When uncertain, omit. - Diary files are local-only. Never transmit beyond the configured delivery channel. - May read user personality files to match writing style, but never copy raw content into entries. - Never access system configuration or credential directories unrelated to diary generation. - Only deliver to the conversation owner. Drafts remain drafts until user confirms. ``` ### Technical Analysis The documented cron example configures automated delivery using `mode: "announce"` and a destination represented as `chat:&lt;group-id&gt;`. A group chat is not equivalent to the conversation owner, so this example contradicts the explicit owner-only security rule. The workflow reviews private conversations and generates a personal diary containing events, decisions, reflections, plans, moods, and tags. Automatically announcing that output to a group creates a direct confidentiality risk. The configuration provides no recipient-type validation, owner-identity verification, destination pr ...[truncated 1761 chars]
Remediation
## Remediation Suggestions 1. Replace the group-chat example with a verified private user destination. 2. Reject group, channel, room, or broadcast destinations for diary delivery by default. 3. Resolve the destination identifier before activation and verify that it belongs exclusively to the conversation owner. 4. Display the resolved recipient name and destination type to the user, then require explicit confirmation before creating the recurring job. 5. Keep scheduled drafts local by default. Send them only after the owner approves each entry. 6. If unattended delivery is required, require a separate opt-in that clearly explains the destination and privacy implications. 7. Add runtime authorization checks before every delivery rather than relying solely on setup-time configuration. 8. Fail closed when recipient ownership cannot be verified. 9. Provide a straightforward mechanism to inspect, pause, or delete the recurring job. 10. Add automated tests ensuring that owner-only policy rejects group-chat destinations and that documentation examples use private delivery.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (2)

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs the agent to automatically save an unreviewed diary draft after 24 hours, which creates a privacy risk because diary content is derived from conversation history and may still contain sensitive personal information despite the stated filter. The danger is increased by the persistence of private reflections to disk without an explicit user-facing consent step or warning at the point of save.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The example schedule sets `tz` to `Asia/Shanghai`, which imposes a locale-specific behavior in natural-language configuration guidance. The file does say to adjust `tz` later, but the default still forces a specific locale without explaining why that region is appropriate.

Static analysis

No suspicious patterns detected.