Back to skill

Security audit

intelligent-inspection

Security checks for vulnerabilities and agentic risk

Overview

The skill is not malicious, but it asks users to connect workplace cameras and may store camera tokens in plaintext while giving incomplete privacy and data-flow guidance.

Install only after deciding that workplace camera monitoring is appropriate for your environment. Treat camera tokens as sensitive secrets, avoid storing real tokens in the generated config.json unless the host and directory permissions are tightly controlled, and review whether camera images or analysis results may be sent to AI providers or Feishu before use.

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

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:43
Finding
Camera Access Tokens May Be Stored in a Plaintext Configuration File## Vulnerability Details **File Location**: `index.js:43-52` **Supporting Documentation**: `SKILL.md:77-81` **Vulnerability Type**: Plaintext storage of sensitive camera credentials **Risk Level**: Medium The documented setup workflow collects a camera API access token and other device parameters. The implementation reads and writes the resulting configuration as unprotected JSON in the skill installation directory. ```js async loadOrCreateConfig() { const configPath = path.join(this.skillDir, 'config.json'); if (fs.existsSync(configPath)) { console.log('✅ Loading existing configuration...'); this.config = JSON.parse(fs.readFileSync(configPath, 'utf8')); } else { console.log('📝 No configuration found. Let\'s set it up!'); await this.promptForConfig(); // Save config for future use fs.writeFileSync(configPath, JSON.stringify(this.config, null, 2)); ``` The corresponding configuration structure explicitly contains the sensitive field: ```js camera: { url: '', // Will be filled by OpenClaw context accessToken: '', // Will be filled by OpenClaw context deviceSerial: '', // Will be filled by user input channelNo: '1', // Default projectId: 'intelligent-inspection' // Default }, ``` ### Technical Analysis `fs.writeFileSync()` is called without an explicit restrictive file mode, encryption, secret-manager integration, or subsequent ownership and permission validation. Consequently, any camera access token populated into `this.config` may be persisted as plaintext under the process's default umask and ambient filesystem permissions. The file is stored at `path.join(this.skillDir, 'config.json')`, next to the executable skill code. This also conflicts with the documented isolated workspace path in `SKILL.md:81`, increasing the possibility that credentials could be included in a copied, archived, back ...[truncated 1566 chars]
Remediation
## Remediation Suggestions 1. Store camera access tokens in the OpenClaw secret-management facility or an operating-system credential store rather than in general JSON configuration. 2. Keep only a secret reference or identifier in `config.json`. 3. If file-based secret storage is unavoidable, create the file atomically with mode `0600`, for example: ```js fs.writeFileSync(configPath, JSON.stringify(this.config, null, 2), { encoding: 'utf8', mode: 0o600, flag: 'wx' }); ``` 4. Verify file ownership and reject files readable or writable by unauthorized users before loading credentials. 5. Store runtime configuration in the single documented workspace location outside the distributable skill directory. 6. Separate sensitive credentials from non-sensitive settings to reduce exposure through backups, diagnostics, and configuration sharing. 7. Add `config.json` to package and version-control exclusion rules. 8. Support token rotation and revoke any token known to have been stored in or distributed with an exposed configuration file.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description promises a functional intelligent inspection system with guided setup, configurable tasks, AI image analysis, and Feishu alerting. The supplied code is largely a scaffold: it creates or loads config.json, fills default placeholder values, and logs that capture/analysis/alerting 'will be handled by OpenClaw.' No code actually interfaces with a camera, processes images, calls an AI model, or sends any alerts to Feishu or other channels. This is therefore a material description-to-behavior mismatch: the implemented behavior is only setup/state persistence and console output, not the declared inspection workflow.

Credential Access

High
Category
Privilege Escalation
Content
- Custom HTTP-based capture endpoints

### Authentication Requirements
- Camera API access tokens or credentials
- Feishu bot permissions (if using Feishu alerts)

### OpenClaw Requirements
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
### 1. Initial Setup (First Run)
When the skill runs for the first time:
1. Prompt user for camera system type
2. Collect API endpoint, access token, device serial, channel number
3. Ask for default inspection prompt template
4. Confirm alert channel preferences
5. Save configuration to `~/.openclaw/workspace/intelligent-inspection-config.json`
Confidence
86% confidence
Finding
The setup flow instructs users to collect an access token and then save configuration to a persistent file under the workspace, implying credential storage in a local JSON file. In a surveillance skill handling camera access, plaintext persistence of tokens materially increases the risk of credential disclosure, unauthorized camera access, and lateral abuse if the workstation or workspace directory is exposed.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The README explicitly promotes workplace camera monitoring for employee presence and security patrols but provides no privacy, consent, retention, or lawful-use warning. In a workplace surveillance context, missing disclosure and governance guidance can directly lead to improper collection of employee data and non-compliant deployments.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The documentation states the skill performs image capture, AI analysis, and Feishu alerting, but does not warn that captured workplace images and derived observations may be transmitted to external services. This creates a real risk of unreviewed data sharing, exposing sensitive visual information about employees, visitors, screens, or facilities.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill describes surveillance-image collection, AI analysis, and external alert delivery without a prominent warning that images and related metadata may be transmitted to third-party AI and messaging services. In this context, the omission is security-relevant because users may unknowingly process sensitive workplace imagery through external systems, creating privacy, compliance, and unauthorized disclosure risks.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The privacy statement says there is no data retention beyond immediate execution, yet the documented workflow persists camera credentials and inspection settings to a local config file. This inconsistency can mislead users about what sensitive data is stored, reducing informed consent and increasing the chance of credential exposure on multi-user or poorly secured hosts.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The documentation explicitly permits using `web_fetch`/`exec` for camera capture, which broadens the operational surface from narrowly scoped image retrieval to arbitrary command execution patterns. In a skill context, normalizing shell-based capture can lead to unsafe implementations later, including command injection, abuse of local system access, or use of overprivileged tooling unrelated to the stated inspection purpose.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The natural-language prompt is written entirely in Chinese and explicitly directs the model to reply with the Chinese word "正常" when no issue is found. This imposes a specific language/locale behavior without offering user choice or documenting that the skill is intended only for a Chinese-language environment.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The prompt explicitly instructs the model to reply using the Chinese terms '离岗' and '在岗'. Because this is a natural-language policy affecting output language and there is no indication of user opt-in or a justified region-specific requirement in the file, it constitutes a locale/language policy violation.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill persists its entire configuration object to config.json, and the configuration schema explicitly includes camera.accessToken. In a workplace monitoring skill, storing a camera access token in plaintext on disk can expose surveillance credentials to other local users, backups, logs, or accidental source control commits, enabling unauthorized camera access or lateral misuse of monitoring infrastructure.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The embedded prompt instructs the model to reply only with Chinese terms ("离岗" or "在岗"). This imposes a language choice on users without offering selection or documenting a justified region-specific requirement.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The title, usage instructions, and trigger phrases are all presented in Chinese, and no alternative language or opt-in choice is offered. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation unless the locale restriction is explicitly justified.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The sample configuration requires the AI to reply using Chinese status labels ('离岗'/'在岗'), and the invocation examples are also only in Chinese. This imposes a specific language behavior without documenting user choice or opt-in, which is a natural-language locale policy concern.

Static analysis

No suspicious patterns detected.