T09 · Insecure Skill Coding Practices
- Location
dist/openviking-integration.js:53- Finding
Shell Command Injection and API Key Exposure in OpenViking Integration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real memory and permissions helper, but it needs Review because it auto-loads code with broad side effects, weak command handling, and persistent unredacted audit logs.
Install only after reviewing the OpenViking integration and audit logging. Treat this skill as able to alter memory state, auto-approve moderate writes in trusted sessions, log sensitive operation parameters, and process memory text through an external embedding service if configured.
dist/openviking-integration.js:53Shell Command Injection and API Key Exposure in OpenViking Integration
dist/audit-logger.js:139Dangerous Operation Parameters Are Persisted Without Secret Redaction
package-lock.json:17OpenViking Dependency Is Unpinned and Inconsistently Sourced
dist/audit-logger.js:52Package Import Creates Files and Installs Process-Global Lifecycle Handlers
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Operation: exec
Risk Level: DANGEROUS
Parameters: { "command": "rm -rf /tmp" }
⚠️ This operation may be dangerous
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Operation: exec
Risk Level: DANGEROUS
Parameters: { "command": "rm -rf /tmp" }
⚠️ This operation may be dangerous
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
Operation: exec
Risk Level: DANGEROUS
Parameters: { "command": "rm -rf /tmp" }
⚠️ This operation may be dangerous
Referenced artifact was not completely inspected
- [安装指南](./INSTALL-GUIDE.md)
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
/**
* Conversation Context Analyzer
* Analyzes conversation to extract context for memory suggestions
*
* Phase 4 Enhancement - Step 3: Smart Suggestions
*/
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
/**
* Conversation Context Analyzer
* Analyzes conversation to extract context for memory suggestions
*
* Phase 4 Enhancement - Step 3: Smart Suggestions
*/
This duplicate finding points to the same root issue: the validator gives a false sense of protection while allowing arbitrary command strings except for two blocked substrings. Attackers can easily evade this check with alternative destructive commands, encoding, chaining, interpreters, or indirect execution paths.
command: zod_1.z.string()
.max(10000)
.describe('Command to execute')
.refine(cmd => !cmd.includes('rm -rf /') && !cmd.includes('format'), 'Dangerous command detected'),
timeout: zod_1.z.number().min(1).max(300).optional().default(30).describe('Timeout in seconds')
}),
permissionLevel: types_1.PermissionLevel.DANGEROUS,
This duplicate finding points to the same root issue: the validator gives a false sense of protection while allowing arbitrary command strings except for two blocked substrings. Attackers can easily evade this check with alternative destructive commands, encoding, chaining, interpreters, or indirect execution paths.
command: zod_1.z.string()
.max(10000)
.describe('Command to execute')
.refine(cmd => !cmd.includes('rm -rf /') && !cmd.includes('format'), 'Dangerous command detected'),
timeout: zod_1.z.number().min(1).max(300).optional().default(30).describe('Timeout in seconds')
}),
permissionLevel: types_1.PermissionLevel.DANGEROUS,
This code file defines a delete_file tool that deletes files or directories, including recursive deletion, which is destructive and potentially irreversible. The implementation includes no confirmation prompt, warning message, or other user disclosure around the deletion action.
The exec safety model relies on a tiny substring denylist of dangerous commands, which is trivially bypassed with equivalent syntax, encoding, shell features, alternate binaries, spacing changes, or multi-step destructive commands. Because this wrapper exposes arbitrary command execution parameters including elevated mode, host selection, environment injection, PTY, and background execution, weak filtering creates a false sense of protection around a highly dangerous capability.
try {
// Additional safety checks for dangerous commands
const dangerousPatterns = [
'rm -rf /',
'format',
'del /s /q',
'mkfs',
The exec safety model relies on a tiny substring denylist of dangerous commands, which is trivially bypassed with equivalent syntax, encoding, shell features, alternate binaries, spacing changes, or multi-step destructive commands. Because this wrapper exposes arbitrary command execution parameters including elevated mode, host selection, environment injection, PTY, and background execution, weak filtering creates a false sense of protection around a highly dangerous capability.
try {
// Additional safety checks for dangerous commands
const dangerousPatterns = [
'rm -rf /',
'format',
'del /s /q',
'mkfs',
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
*/
private truncateText;
/**
* Generate display prompt for suggestions
*/
generatePrompt(suggestions: MemorySuggestion[]): string;
/**
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
*/
private truncateText;
/**
* Generate display prompt for suggestions
*/
generatePrompt(suggestions: MemorySuggestion[]): string;
/**
The clear method erases the entire in-memory store in a single call, which is a destructive operation with obvious impact on user data. There is no confirmation prompt, warning, or visible disclosure in code comments intended for users/operators.
The auto-organize example explicitly shows dryRun: false, which performs real memory modifications such as merging duplicates and marking items outdated, but the surrounding guidance does not present a prominent warning before the destructive example. In an install/usage guide, readers often copy-paste examples directly, so this can cause unintended data alteration or loss in production memory stores.
The documentation presents data-modifying memory features such as update, auto-organize, merge, auto-tagging, and marking content outdated without any warning about persistence, overwrite risk, rollback expectations, or the consequences of running with dryRun disabled. In a skill centered on memory and permission management, normalizing destructive operations without safeguards can lead users or downstream agents to alter stored data unintentionally.
This markdown file includes the --force option as a publication step but does not warn users that it can overwrite an existing version, which can affect system integrity and release state. Under the markdown-specific warning criteria, potentially destructive actions should be accompanied by a clear caution.
The README emphasizes that installation automatically registers tools and makes them immediately usable, without adequately warning that this changes the local OpenClaw agent environment. Auto-registration expands the agent's available action surface and trust boundary, which is especially risky because the skill adds memory and permission-related capabilities that may influence future agent decisions.
The README promotes automatic memory organization and versioned updates that can alter stored user data, but it does not clearly warn users that these actions may modify, merge, retag, or mark memories as outdated. In an agent skill context, silent mutation of stored state can affect downstream agent behavior, integrity of user data, and auditability.
Auto-approving MODERATE write operations in trusted sessions weakens user-consent boundaries and can enable unintended state changes without explicit confirmation. If session trust is misassigned, spoofed, or inherited too broadly, an agent could perform writes autonomously in contexts the user did not intend.
### 🔐 4-Level Permission System
- 🟢 **SAFE** - Read operations, no confirmation needed
- 🟡 **MODERATE** - Write operations, auto-approve in trusted sessions
- 🟠 **DANGEROUS** - Delete/Execute, always requires confirmation
- 🔴 **DESTRUCTIVE** - Irreversible operations, explicit CONFIRM required
The documentation promotes automatic loading and '/auto-organize' behavior as install-and-use features without any warning about how stored user data may be modified, reorganized, or versioned. In a skill that manages persistent memory, silent or poorly disclosed automatic actions can cause unintended data changes, privacy surprises, or loss of user trust, especially when users install it expecting passive functionality.
This markdown file demonstrates commands that store, update, and reorganize memories, which can affect user data persistence and integrity. The description presents these actions as directly usable but does not disclose retention, modification, or possible unintended changes to stored data.
The skill advertises automatic organization, version creation, and rollback features that can change or revert stored user content, but the documentation does not clearly warn users that their data may be modified automatically or restored to prior states. In a memory-management skill, this omission can lead to unintended data loss, confusing state changes, or rollback misuse because users may enable or invoke these features without understanding their effect on stored information.
The documentation presents context analysis, keyword extraction, entity recognition, intelligent recall, and knowledge-graph extraction without warning that potentially sensitive conversation content may be processed, transformed, and persisted. Because this skill is specifically designed to ingest and structure user memories and dialogue, the lack of privacy disclosure increases the risk of users exposing confidential, personal, or regulated data without informed consent.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
private sendAlert;
private parseLogFile;
/**
* Add entry to buffer (for testing)
*/
addEntryToBuffer(entry: AuditLogEntry): void;
/**