Back to skill

Security audit

logseq article archive

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Logseq knowledge-base maintainer, but it grants broad persistent editing authority over user notes, including a documented conflict about whether raw source materials may be modified.

Review carefully before installing. Use this only on a Logseq graph you can back up or version-control, and require the agent to operate in read-only or dry-run mode unless you explicitly approve writes. Keep raw source materials outside agent-writable paths, and avoid letting casual questions be automatically archived if they may contain private information.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
RULES.md:6
Finding
Raw Material Modification Violates the Declared Read-Only Boundary## Vulnerability Details **File Location**: `RULES.md`, lines 6 and 65-78; conflicting security boundary in `SKILL.md`, lines 22-24 **Vulnerability Type**: Unauthorized modification of user-controlled source materials **Risk Level**: Medium **Complete Vulnerable Snippet**: ```markdown ### 1.1 Three-Layer Architecture - **Raw Materials Layer**: Stored in the `logseq/pages/` directory. May be modified as necessary (e.g., adding titles, summaries, and cross-references) to avoid becoming orphan documents - **Index Files Layer**: Stored in the `logseq/pages/index/` directory, managed by LLM ``` ```markdown ### 4.2 Orphan Document Processing Workflow 1. **Traversal Scanning**: Traverse all documents in the pages directory 2. **Structure Check**: Check if each document contains title, summary, and cross-references 3. **Reference Analysis**: Analyze the reference status of each document, identify orphan documents 4. **External Link Creation**: Create external links for all documents to ensure linking with other related documents 5. **Cross-references**: Establish bidirectional links between related pages 6. **Index Update**: Update relevant index pages to ensure all documents are indexed ### 4.3 Document Standardization Workflow 1. **Title Addition**: Add main title (# level heading) to all documents 2. **Summary Generation**: Add brief summaries to all documents, summarizing the main content 3. **Cross-reference Addition**: Add cross-references to all documents, linking to related pages 4. **Format Standardization**: Ensure consistent document format, using Markdown format 5. **Index Inclusion**: Ensure all documents are included in relevant index pages ``` This conflicts with the declared boundary in `SKILL.md`: ```markdown ### 1. Raw Materials Layer - **Definition**: User-curated collection of original files, including articles, papers, images, data files, etc. - **Characteristics**: Immutable, read by ...[truncated 2528 chars]
Remediation
## Remediation Suggestions 1. Make the raw-material layer unconditionally read-only and remove the instruction permitting modifications. 2. Store raw materials in a dedicated directory outside every agent-writable directory, for example: - Read-only: `logseq/raw-materials/` - Writable: `logseq/pages/index/` 3. Restrict all generated content and maintenance writes to an explicit path allowlist such as `logseq/pages/index/`. 4. Update `RULES.md` so it is consistent with the immutability guarantee in `SKILL.md`. 5. Replace “all documents” with a precisely defined set of agent-managed files. 6. Require explicit, per-operation user confirmation before modifying any existing document outside the generated-index directory. 7. Provide a dry-run mode that lists proposed files and changes before writing them. 8. Create a backup or version-control checkpoint before approved bulk operations. 9. Reject paths that resolve outside approved writable directories, including traversal through symbolic links or `..` components. 10. Add a provenance marker to generated pages so maintenance operations can reliably distinguish agent-owned content from original materials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The rules explicitly authorize modifying raw knowledge-base files and creating links/summaries at scale, but they do not require user confirmation, preview, or clear disclosure that existing documents may be altered. In a persistence-oriented Logseq skill, this can cause unintended integrity changes to a user's notes, including silent edits to source material and broad restructuring of the knowledge base.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The query workflow states that valuable answers should be archived as new pages, but it does not disclose that user prompts, derived outputs, or potentially sensitive query content may be written to disk. In a note-taking/archive skill, this creates a real privacy and data-retention risk because users may assume Q&A is ephemeral while the system persists it into the knowledge base.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill explicitly allows invocation by any direct question without requiring a named operation, path, or scope. That broad trigger surface can cause the agent to activate unexpectedly in unrelated conversations and perform file reads or index updates without sufficiently explicit user intent, increasing the risk of unintended actions in a workspace with persistent state.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The query workflow says valuable answers may be archived as new pages and relevant indexes updated, but the skill description does not clearly warn users that ordinary queries can lead to persistent writes. This can surprise users, create unwanted records, and pollute or expose sensitive information in a long-lived knowledge base if a casual question is automatically saved.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The health check workflow proposes filling data gaps via web search without any privacy, data-handling, or authorization warning. In a knowledge-management context, gap-filling searches may reveal sensitive topics, filenames, entities, or internal research interests to external services, and the skill gives no boundary on what information may be used in those searches.

Static analysis

No suspicious patterns detected.