Back to skill

Security audit

worktracker

Security checks for vulnerabilities and agentic risk

Overview

WorkTracker is a local work-log tool, but it overstates its security controls and stores/export team activity data with weak permission guidance.

Review before installing if your workspace may contain confidential project, staffing, customer, or operational information. Use private permissions such as 700 for the WorkTracker directory and 600 for records/backups, avoid exporting data to shared locations, and do not rely on the advertised encryption, role permissions, audit logging, restore, repair, or cleanup features unless the implementation is updated.

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
scripts/worktracker.py:31
Finding
Work Records and Backups Are Created with Overly Permissive Default Permissions## Vulnerability Details **File Location**: `scripts/worktracker.py:31-32`, `scripts/worktracker.py:60-61`, `scripts/worktracker.py:84-85`, `scripts/worktracker.py:93-94`, `SKILL.md:231-233`, and `docs/WorkTracker培训手册.md:226-228` **Vulnerability Type**: Insecure local file permissions **Risk Level**: Medium ### Vulnerable Code Directory creation does not specify restrictive permissions: ```python def ensure_directories(self): """Ensure directories exist""" os.makedirs(CONFIG_DIR, exist_ok=True) os.makedirs(BACKUP_DIR, exist_ok=True) ``` Configuration, status, and log files are opened without enforcing restrictive file modes: ```python def save_config(self): """Save configuration""" with open(self.config_path, 'w', encoding='utf-8') as f: json.dump(self.config, f, ensure_ascii=False, indent=2) ``` ```python def save_status(self, status): """Save work status""" status["last_updated"] = datetime.now().isoformat() with open(WORK_STATUS_PATH, 'w', encoding='utf-8') as f: json.dump(status, f, ensure_ascii=False, indent=2) ``` ```python def log_work(self, assistant: str, action: str, details: str): """Record a work log""" timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") log_entry = f"## {timestamp} - {assistant} - {action}\n\n{details}\n\n" with open(WORK_LOG_PATH, 'a', encoding='utf-8') as f: f.write(log_entry) ``` The documentation explicitly recommends world-readable permissions: ```bash chmod 755 ~/.openclaw/workspace/.worktracker/ chmod 644 ~/.openclaw/workspace/.worktracker/*.json chmod 644 ~/.openclaw/workspace/.worktracker/*.md ``` ### Technical Analysis WorkTracker stores assistant names, work descriptions, deadlines, progress updates, completion results, follow-up actions, roles, and optional email addresses in local JSON and Markdown files. These records can contain confidential operatio ...[truncated 2197 chars]
Remediation
## Remediation Suggestions 1. Create private data directories with mode `0700`: ```python os.makedirs(CONFIG_DIR, mode=0o700, exist_ok=True) os.makedirs(BACKUP_DIR, mode=0o700, exist_ok=True) os.chmod(CONFIG_DIR, 0o700) os.chmod(BACKUP_DIR, 0o700) ``` 2. Create configuration, status, log, backup, and default export files with mode `0600`. Use `os.open` with explicit flags and permissions for newly created files: ```python fd = os.open( path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600, ) with os.fdopen(fd, "w", encoding="utf-8") as f: json.dump(data, f, ensure_ascii=False, indent=2) ``` 3. Apply `os.chmod(path, 0o600)` to existing files during initialization or migration, because the creation mode does not repair an already existing permissive file. 4. Perform status and configuration updates atomically using a securely created temporary file in the protected directory, set it to `0600`, flush and synchronize it, and then replace the destination with `os.replace`. 5. Validate that sensitive destinations are regular files and reject symbolic-link targets where applicable to reduce link-based file manipulation risks. 6. Ensure backup files and user-default exports receive mode `0600`; do not assume copied metadata is secure. 7. Replace the documented permission commands with: ```bash chmod 700 ~/.openclaw/workspace/.worktracker/ chmod 700 ~/.openclaw/workspace/.worktracker/backups/ chmod 600 ~/.openclaw/workspace/.worktracker/*.json chmod 600 ~/.openclaw/workspace/.worktracker/*.md chmod 600 ~/.openclaw/workspace/.worktracker/backups/* ``` 8. Either implement the documented read, write, and administrative authorization model or remove those claims so users do not incorrectly rely on nonexistent access controls.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (21)

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The primary descriptive content is written in Chinese and does not indicate that other languages are supported or that Chinese is required for a region-specific purpose. This can violate language/locale policy when a skill implicitly mandates a specific language without user opt-in.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents commands and data paths that imply local file read/write behavior, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization transparency gap: users and enforcement layers cannot easily determine what filesystem access the skill expects, increasing the chance of overbroad execution or unsafe deployment assumptions.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The skill's natural-language description forces a specific language/locale presentation, and the rest of the document continues in Chinese without offering user opt-in or an alternative language. Under the stated policy, language constraints should either be optional for the user or explicitly justified as region-specific.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This markdown file describes a cleanup operation (`worktracker clean --days 30`) that removes historical log data, but the surrounding documentation does not explicitly warn users that the action is destructive and may permanently delete records. For markdown files, destructive behaviors affecting user data should be accompanied by a clear warning about data loss or recovery limitations.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The description forces a Chinese-language presentation of the skill and does not indicate that users can select another language or that the skill is intended only for a Chinese-speaking region. Under the policy, locale-specific language constraints should be opt-in or clearly justified.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The manual explicitly teaches exporting work logs and team data to JSON/CSV but provides no guidance on access control, redaction, storage location, or sharing restrictions. Because these exports likely contain assistants' identities, work descriptions, timelines, and operational history, they can create an easy exfiltration path for sensitive organizational activity data.

File System Enumeration

Medium
Category
Data Exfiltration
Content
```bash
# 检查文件权限
ls -la ~/.openclaw/workspace/.worktracker/

# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
Confidence
60% confidence
Finding
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

File System Enumeration

Medium
Category
Data Exfiltration
Content
```bash
# 检查文件权限
ls -la ~/.openclaw/workspace/.worktracker/

# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
Confidence
60% confidence
Finding
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

File System Enumeration

Medium
Category
Data Exfiltration
Content
```bash
# 检查文件权限
ls -la ~/.openclaw/workspace/.worktracker/

# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
Confidence
60% confidence
Finding
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
ls -la ~/.openclaw/workspace/.worktracker/

# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
chmod 644 ~/.openclaw/workspace/.worktracker/*.json
chmod 644 ~/.openclaw/workspace/.worktracker/*.md
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
ls -la ~/.openclaw/workspace/.worktracker/

# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
chmod 644 ~/.openclaw/workspace/.worktracker/*.json
chmod 644 ~/.openclaw/workspace/.worktracker/*.md
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
chmod 644 ~/.openclaw/workspace/.worktracker/*.json
chmod 644 ~/.openclaw/workspace/.worktracker/*.md
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
chmod 644 ~/.openclaw/workspace/.worktracker/*.json
chmod 644 ~/.openclaw/workspace/.worktracker/*.md
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
chmod 644 ~/.openclaw/workspace/.worktracker/*.json
chmod 644 ~/.openclaw/workspace/.worktracker/*.md
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
# 修复权限
chmod 755 ~/.openclaw/workspace/.worktracker/
chmod 644 ~/.openclaw/workspace/.worktracker/*.json
chmod 644 ~/.openclaw/workspace/.worktracker/*.md
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This shell script's comments and user-facing output are entirely in Chinese, which effectively forces a specific language for users interacting with the skill. The policy allows language constraints only when users are given a choice or when the locale limitation is clearly documented and justified, neither of which appears here.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file’s user-facing description and all CLI help/output strings are written in Chinese, and the docstring states the tool is designed for a specific team context without indicating any language opt-in or alternative locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly justified.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The export_data function writes to a user-supplied output path without any path restriction or safety checks. In an agent context, if untrusted input can influence this parameter, the tool could overwrite arbitrary files accessible to the current user, turning a simple logging feature into a file-write primitive.

Missing User Warnings

Low
Confidence
83% confidence
Finding
The documentation encourages use of status and log commands that expose all assistants' current work and historical activity without mentioning authorization boundaries or privacy implications. In a team-tracking context, broad visibility may be intended, but absent role-based access warnings it normalizes unnecessary access to others' operational data.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The comments, echoed messages, and example arguments are entirely in Chinese, which effectively forces a specific language/locale for users of this example script. There is no indication that the skill is region-specific or that users can choose another language, so this appears to violate the language/locale policy criterion.

Description-Behavior Mismatch

Low
Confidence
81% confidence
Finding
The manifest describes a lightweight system for recording and reporting work progress, which clearly justifies storing status and logs locally. However, the code also adds explicit data export capabilities to arbitrary JSON/CSV files and persistent backup management, expanding the behavior from simple logging into data-management tooling.

Static analysis

No suspicious patterns detected.