Back to skill

Security audit

记忆安全扫描

Security checks for vulnerabilities and agentic risk

Overview

This memory security scanner has a legitimate local-audit purpose, but it asks for broad read, exec, and write authority while scanning sensitive agent memory/configuration files and referencing missing scripts.

Review the file list before using this skill. Prefer scanning a specific file with --file, avoid loading broad agent memory/configuration files unless necessary, and do not grant write or exec authority unless you have a reviewed implementation and are confirming a specific quarantine or restore action.

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

other

Warning
Location
SKILL.md:72
Finding

Overly Broad Default Access to Sensitive Agent Memory and Configuration Files

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 72-74 and 160
Vulnerability Type: Sensitive Information Reconnaissance
Risk Level: Medium
Classification: other: Sensitive Information Reconnaissance

Relevant source segment (English translation):

markdown
4. Local-mode scanning
   - Zero network requests; all detection is performed locally
   - The basic LLM provided by the Agent platform is sufficient
   - Supports scanning MEMORY.md, memory/*.md, and workspace configuration files
   - Supports JSON output for integration with other tools

Default scan scope includes MEMORY.md, memory/*.md logs from the last
30 days, and workspace configuration files such as AGENTS.md, SOUL.md,
USER.md, and TOOLS.md. A single file can be selected with --file.

Technical Analysis

The Skill defines a broad default scan scope that includes persistent Agent memory, daily logs, user-context files, identity or behavior files, tool configuration, and Agent instruction files. These files can contain private conversation-derived information, credentials, operational data, trusted instructions, and details about available tools.

Scanning such files is related to the Skill's stated security purpose, but the default scope is broader than necessary for a least-privilege implementation. The Skill does not require separate authorization for sensitive instruction and identity files such as AGENTS.md, SOUL.md, USER.md, and TOOLS.md.

The manifest also requests read, exec, and write tools at lines 14-17:

yaml
tools:
  - read
  - exec
  - write

Only constrained read access is required for ordinary scanning. Write access is relevant only after an explicitly approved quarantine operation, while no executable implementation exists in the reviewed package to justify general exec access. Combining broad file discovery with these capabilities increases the consequences of malicious ...[truncated 2406 chars]

Remediation
View remediation

Remediation Suggestions

  1. Default to scanning one file explicitly selected by the user rather than enumerating all memory and workspace configuration files.
  2. Require separate, informed confirmation before reading AGENTS.md, SOUL.md, USER.md, TOOLS.md, persistent memory, or other identity and instruction files.
  3. Use an allowlist of approved paths and canonicalize each path before access to prevent unintended traversal outside the workspace.
  4. Separate scanning and quarantine into different permission phases:
    • Grant constrained read access during scanning.
    • Request write access only after the user confirms a specific file and finding.
    • Remove general exec access unless a concrete, reviewed implementation requires it.
  5. Treat every scanned document as untrusted data. Explicitly instruct the Agent never to follow commands found inside scanned content.
  6. Redact complete credentials and sensitive lines from human-readable and JSON reports. Report only the credential type, file location, and a minimally masked fragment.
  7. Limit the amount of source content loaded into context by scanning line-by-line and retaining only minimal matched metadata.
  8. Provide an explicit preview listing every file that will be read and require approval before beginning a multi-file scan.
  9. Add real, reviewable implementation files or remove placeholder execution instructions. The current package references nonexistent scripts and therefore cannot enforce the documented security controls.
  10. Remove or clearly reject callback_url in local-only mode so the interface does not conflict with the stated zero-network guarantee.
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The activation scope is described very broadly for any 'memory scan related' development scenario, without clear trigger conditions or boundaries. In agent ecosystems, vague activation language can cause unintended invocation on unrelated content, increasing exposure to unnecessary file reads, exec usage, or destructive follow-up actions if the agent over-applies the skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example phrase '帮我扫描记忆文件看看有没有安全问题' is colloquial and broad enough that an agent may treat many loosely related requests as authorization to invoke the skill. Because the skill advertises read/exec/write capabilities, accidental activation could expand file access and operational side effects beyond what the user precisely intended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The display name, summary, and most of the document are written in Chinese, and there is no statement that the skill can respond in the user's preferred language. Under the policy rule, a language constraint should either be optional for the user or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The core capability section says '系统不自动隔离,始终先询问用户确认', implying quarantine is strictly manual and non-automatic. Later usage text says '对于MEDIUM及以上威胁,系统询问是否隔离', which describes automated prompting behavior triggered by scan results; this is a documentation-level contradiction about how remediation is initiated.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.