Back to skill

Security audit

灵芯派记忆守护者 为OpenCode AI助手提供记忆持久化,专为灵芯派低资源环境设计,支持Gitee云端同步

Security checks for vulnerabilities and agentic risk

Overview

This memory-sync skill is purpose-aligned, but it ships plaintext device credentials and can commit and push broad memory contents to a Git remote without enough scoping or warnings.

Review this skill carefully before installing. Remove and rotate the embedded zmrobo password if it is real, replace device details with placeholders, keep the remote repository private, and do not run sync.sh on memory contents that may include secrets, tokens, private project data, or personal information unless the sync scope is restricted and reviewed first.

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
MEMORY.md:7
Finding

Plaintext Device Credentials Are Installed, Committed, and Prepared for Remote Upload

Content
View full analysis
| Hostname | SmartPi | | IP address | 10.1.1.1 (wired) / 192.168.31.247 (WiFi) | | User/password | zmrobo / zmrobo | | System | Debian 10 (buster) | ``` The same sensitive information is duplicated in the index: ```markdown ### System Configuration - IP: 10.1.1.1 (wired) / 192.168.31.247 (WiFi) - User: zmrobo / Password: zmrobo - System: Debian 10 + ARM Cortex-A55 ``` The installer copies and commits these files: ```bash # install.sh:18-20 cp "$SKILL_DIR/"*.md "$MEMORY_DIR/" 2>/dev/null || true cp "$SKILL_DIR/"*.json "$MEMORY_DIR/" 2>/dev/null || true cp "$SKILL_DIR/"*.sh "$MEMORY_DIR/" 2>/dev/null || true ``` ```bash # install.sh:35-36 git add . git commit -m "init: OpenCode记忆库初始化" ``` The synchronization script subsequently commits and pushes the repository: ```bash # sync.sh:20-33 # 添加所有更改 git add . # 检查是否有更改 if git diff --cached --quiet; then echo "✅ 没有需要同步的内容" exit 0 fi # 提交 git commit -m "sync: $(date '+%Y-%m-%d %H:%M:%S')" # 推送 git push origin master ``` ### Technical Analysis The distributed memory template contains a plaintext username and password together with the device hostname, operating system, architecture, and internal IP addresses. These are not isolated documentation values: the installation process copies the files into `~/.opencode-memory` and executes `git add .` followed by a commit. The documented workflow instructs the user to configure a Gitee remote and push this repository. The synchronization script then stages, commits, and pushes the credential-bearing files. If the remote repository is public, shared too broadly, or compromised, the ...[truncated 1984 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
sync.sh:20
Finding

Unrestricted Memory Directory Synchronization Can Expose Arbitrary Sensitive Files

Content
View full analysis
"$MEMORY_DIR/.gitignore" << 'EOF' .DS_Store *.log EOF git add . git commit -m "init: OpenCode记忆库初始化" ``` ### Technical Analysis `git add .` recursively stages all unignored files within `~/.opencode-memory`. The directory is explicitly intended to contain persistent AI context and daily memory, which may naturally include credentials, access tokens, private configuration, personal information, source fragments, or other confidential conversation data. The generated `.gitignore` does not exclude common sensitive file types such as `.env` files, SSH keys, API-token files, credential exports, backups, editor swap files, or private configuration. The script also does not display the staged file list, scan for secrets, enforce an allowlist, or request confirmation before pushing. The Git remote is configured by the user, rather than being hardcoded to an attacker-controlled endpoint. Nevertheless, the implementation creates an unsafe disclosure boundary because any sensitive file placed in the memory directory can be transmitted to that remote and retained in repository history. ### Attack Path 1. A user or AI Agent writes sensitive context into a Markdown memory file, or places a credential-bearing file under `~/.opencode-memory`. 2. The fi ...[truncated 1689 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (21)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This markdown document contains sensitive system access information, including internal addresses and credentials, without any access controls, redaction, or warning. In a skill package, documentation is likely to be shared, indexed, or inspected by automation, which makes secret exposure more dangerous rather than less.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file discloses concrete internal IP addresses, a username, and a plaintext password in a broadly readable index document. Exposing live access credentials and network topology materially increases the risk of unauthorized access, lateral movement, and reuse of the credentials elsewhere, and the file context does not establish any legitimate need to publish secrets in an index.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file stores direct host access details including hostname, internal IP addresses, operating system details, and a plaintext username/password pair in long-term memory. Even if intended for convenience, this creates an immediate disclosure risk because anyone who can read the file gains useful information for unauthorized access or lateral movement.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The markdown explicitly exposes host credentials in plaintext without any protection or minimization. This is dangerous because the file itself becomes a credential dump, and the surrounding network/system details increase the chance that the credentials can be used successfully by an attacker.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Long-term memory is an especially risky place to store secrets and network topology because such files are often broadly reused, indexed, or surfaced to agents and operators. In this case, the combination of credentials, IPs, hostname, OS version, and architecture meaningfully increases exposure and makes downstream compromise easier if the file leaks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire index and all user-facing instructions are written in Chinese, with no indication that other languages are supported or that the language is configurable. This can violate a language/locale policy when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly advertises automatic local persistence of conversation context and synchronization to Gitee, but it does not warn users that sensitive prompts, secrets, personal data, or proprietary information may be stored and uploaded. In an AI memory skill, this omission is security-relevant because users may unknowingly persist confidential conversation data to disk and a remote repository, increasing exposure risk beyond the original session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly promotes Gitee cloud synchronization for persisted memory, but the one-line description does not warn that conversation-derived memory may be stored remotely. This creates a meaningful risk of users unknowingly syncing sensitive prompts, credentials, project details, or personal data to a third-party repository, especially in an assistant-memory context where stored content can be broad and sensitive.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installation and usage steps instruct users to read, persist, and sync memory files without disclosing that conversation history and logs will remain on disk and may be pushed to a remote repository. In a low-resource device environment, users may treat this as harmless state management, but it can silently create long-lived local and cloud copies of sensitive operational context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The installer copies all matching .sh files from the skill directory into a hidden directory under the user's home and marks sync.sh executable without prompting or obtaining explicit consent. While this appears intended to install the skill, silently placing executable scripts in a persistent user-controlled location increases the risk of unexpected code execution later, especially if the package contents were tampered with or contain additional shell scripts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script initializes a Git repository and creates a commit inside a hidden directory in the user's home directory automatically. This modifies the user's environment and records files in version control without confirmation, which can surprise users, interfere with existing workflows, and persist potentially sensitive content if the memory directory later gets connected to a remote repository.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script unconditionally pushes the entire contents of $HOME/.opencode-memory to the configured remote repository after git add ., with no confirmation, scoping, or warning that potentially sensitive local memory data will be transmitted off-host. In a memory-sync skill, that context makes the issue more dangerous because such directories commonly contain conversation history, notes, tokens, or other private artifacts that users may not realize are being published to a remote service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file's user-facing content is entirely in Chinese, including headings and status items, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the stated policy, language constraints should be opt-in or explicitly justified when region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description instructs users to run installation and synchronization scripts that write to a persistent directory under the home folder, but it does not explain what files are created, modified, or overwritten, nor what data is retained across sessions. In a memory-persistence skill, that omission matters because users may unknowingly execute scripts that alter local state and store potentially sensitive context indefinitely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The content consistently uses Chinese for headings, instructions, and operational notes, which can amount to a language policy constraint when no user opt-in or alternative is offered. SQP-3 covers natural-language policy violations across all file types, including forcing a specific language without choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill documentation and usage instructions are presented entirely in Chinese, which effectively forces a specific language without indicating user choice or opt-in. Under the language/locale policy, this should either offer language alternatives or clearly document a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Natural-language policy checks apply to all file types. The primary name field is Chinese while English is relegated to name_en, and the manifest does not state that language selection is based on user preference or locale, which can conflict with policies requiring language choice rather than a forced locale.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This is a manifest file, so vague-trigger checks apply. The descriptive fields explain what the skill does but provide no explicit invocation phrases, scope limits, or exclusion conditions, which can make activation boundaries unclear in systems that rely on manifest text for routing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script's comments and all user-visible echo output are in Chinese, which imposes a specific language on users. There is no opt-in, language selection, or documented reason for restricting the installer UX to that locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The description text is written entirely in Chinese ("OpenCode灵芯派记忆索引"), which may indicate the skill is intended to operate in a specific language without any visible user choice or opt-in. Under the stated policy, locale or language constraints should be explicitly optional or justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's comments and console messages are written only in Chinese, which imposes a specific language on users without opt-in. Under the language/locale policy, this is a natural-language policy concern unless the tool is explicitly documented as Chinese-only or region-specific.

Content

No source excerpt is available for this finding.