Back to skill

Security audit

记忆安全扫描

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed memory-security scanner, but it asks for broad access to sensitive agent files and includes unsafe privilege-elevation and scheduled-scan guidance.

Install only if you are comfortable letting the skill inspect sensitive agent memory and configuration files. Keep remote analysis disabled unless you can review exactly what will be sent, do not run it with sudo or administrator privileges, and treat scheduled scanning or quarantine as actions that should require explicit user approval.

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 (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:62
Finding

Overbroad Default Access to Sensitive Agent Memory and Configuration

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:62-72 and SKILL.md:241
Vulnerability Type: Excessive access to sensitive Agent state
Risk Level: Medium

Vulnerable Instruction Snippet

The following is a faithful English rendering of the audited instructions:

markdown
3. Comprehensive scan scope
   - MEMORY.md: long-term memory file
   - memory/*.md: daily logs
   - Workspace configuration files: AGENTS.md, SOUL.md, USER.md,
     TOOLS.md, HEARTBEAT.md, GUARDRAILS.md, IDENTITY.md, BOOTSTRAP.md
   - Supports scanning a specified file through the --file parameter

4. Automatic LLM provider detection
   - Prefer OpenAI for remote analysis
   - Fall back to Anthropic if available
   - Remote LLM analysis is disabled by default and requires --allow-remote
   - Remote mode transmits redacted content

Line 241 reiterates that all of these files are included in the default scan.

Technical Analysis

The Skill instructs the Agent to scan long-term memory, daily logs, user information, identity definitions, tool configuration, operational instructions, and security guardrails by default. These files can contain private conversations, behavioral rules, credentials, internal endpoints, security constraints, and other sensitive operational data.

This violates least-privilege principles because a general scan does not require every sensitive Agent configuration file to be collected automatically. A safer design would require the user to select files or approve a manifest before access.

Remote analysis is opt-in through --allow-remote, which reduces automatic exposure. Nevertheless, enabling it may transmit information derived from all selected files to an external LLM provider. The package contains only SKILL.md; no implementation is supplied to verify the claimed credential detection, redaction, file selection, or outbound-data controls.

Attack Path

  1. A user installs or loads the ...[truncated 1350 chars]
Remediation
View remediation

Remediation Suggestions

  1. Default to scanning only a file explicitly selected by the user.
  2. Present the complete file manifest and obtain confirmation before reading multiple files.
  3. Exclude USER.md, IDENTITY.md, TOOLS.md, GUARDRAILS.md, and similar sensitive files unless individually approved.
  4. Apply path canonicalization and restrict scanning to an approved workspace root.
  5. Before remote analysis, display the exact destination, provider, model, files included, and a preview of the redacted payload.
  6. Implement deterministic local redaction for secrets and personal data before any network request.
  7. Fail closed if redaction cannot be completed or validated.
  8. Provide a local-only mode that technically prevents network access rather than relying solely on documentation.
  9. Add executable tests demonstrating that excluded files and detected credentials are never transmitted.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:250
Finding

Unsafe Recommendation to Elevate Scanner Privileges

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:250
Vulnerability Type: Unnecessary privilege escalation guidance
Risk Level: Medium

Vulnerable Instruction Snippet

The following is a faithful English rendering of the audited instruction:

markdown
If a file permission problem occurs, ensure that the user running the
scanner has sufficient permission to read and write the target file.
If permission is insufficient, try using sudo or adding the --sudo
option to the command to elevate privileges.

Technical Analysis

A content scanner should operate with the minimum permissions needed to read files expressly selected by the user. Recommending sudo may cause the entire scanning process to run with administrative privileges, exposing protected files and increasing the consequences of implementation defects, path-handling errors, or maliciously substituted scanner commands.

The suggested --sudo option is not defined elsewhere and cannot be verified because the project contains no executable scanner. This can mislead users into assuming privilege elevation is a supported and safe operating mode.

Elevated write access is particularly concerning because the Skill also describes quarantine and restoration operations that modify files. If those operations were implemented unsafely and run as root, they could alter protected files outside the intended workspace.

Attack Path

  1. The scanner encounters a file that the current user cannot read or modify.
  2. The user follows the documented troubleshooting guidance and runs the scanner with sudo.
  3. The scanner gains administrative read and write access.
  4. A path-validation defect, symlink, incorrect target, compromised script, or unsafe quarantine operation directs processing toward a protected file.
  5. The elevated process reads, overwrites, or creates files with administrative authority.

No executable implementation is included, so the ...[truncated 667 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove all general recommendations to run the scanner with sudo or administrator privileges.
  2. Remove the undocumented --sudo option from the instructions.
  3. Fail closed when a file is inaccessible and report the exact path and required access mode.
  4. Ask the user to copy an approved file into a restricted scan directory rather than elevating the scanner.
  5. If permission changes are essential, recommend a narrowly scoped access-control change for the specific file instead of elevating the entire process.
  6. Separate read-only scanning from quarantine and restoration operations.
  7. Require explicit confirmation immediately before any file modification.
  8. Canonicalize paths, reject symlinks where appropriate, restrict writes to the workspace, and prevent traversal into protected directories.
  9. Document that the scanner must never run as root and add a runtime check that refuses elevated execution.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill uses broad invocation language such as using it for general security checks, compliance audits, quality inspection, and encryption protection, without tight boundaries on when it should and should not run. In an agent setting, ambiguous triggers can cause over-invocation on unrelated or sensitive content, increasing unnecessary file access, remote-analysis use, and unintended modification workflows such as quarantine.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill repeatedly states that quarantine is not performed automatically and requires explicit user confirmation. However, later documentation claims threats are '自动隔离' as part of the solution, which directly contradicts the stated manual-confirmation behavior and changes the implied safety model.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guidance explicitly suggests using sudo or an admin-equivalent option to bypass permission barriers during scanning. In an agent skill that already advertises exec and write capabilities, normalizing privilege escalation is dangerous because it encourages the agent or operator to grant elevated access to inspect or modify files, expanding the blast radius if the tool is misused, compromised, or pointed at unintended targets.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The visible display name, summary, and primary description are written in Chinese, while the file does not state that language is optional or user-selectable. For a general-purpose skill, this can amount to a locale/language policy issue because it implies a fixed language presentation without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The '能力边界' section says the tool only scans MEMORY.md, memory/*.md, and workspace configuration files, explicitly excluding other file types. Elsewhere, the documentation states users can scan a specified file with --file, which implies a broader scope than the boundary statement.

Content

No source excerpt is available for this finding.