T09 · Insecure Skill Coding Practices
- Location
SKILL.md:149- Finding
Unrestricted Collection and Indefinite Retention of Sensitive Interaction Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is purpose-aligned but needs review because it automatically stores sensitive accounting interaction data and uses it to propose persistent skill changes.
Install only in a controlled OpenClaw deployment after treating /data/memory as sensitive accounting data. Add redaction or pseudonymization for AFMs, usernames, raw queries, command lines, and correction text; set finite retention for derived records; restrict filesystem access; clarify GitHub token handling; and require security review for proposals that affect permissions, confirmations, data disclosure, or tool use.
SKILL.md:149Unrestricted Collection and Indefinite Retention of Sensitive Interaction Data
SKILL.md:188Untrusted Interaction Records Can Influence Persistent Skill Instructions
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
export OPENCLAW_DATA_DIR="/data"
which jq || sudo apt install jq
# Optional: for GitHub PR workflow
export GITHUB_TOKEN="ghp_your_token"
Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
"Records what_happened and what_should_have_happened fields",
"Includes the human correction details",
"Tags the failure for pattern detection: vat_rate_misclassification",
"Does not exceed token budget for memory operations"
],
"files": []
},
The skill persistently logs identifiable user and client data, including usernames, AFMs, queries, corrections, and operational history, yet the description lacks any privacy warning, retention caveat, or data-minimization guidance. In this context, the omission increases the risk of overcollection, unauthorized retention, and accidental exposure of sensitive financial and personal data.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
export OPENCLAW_DATA_DIR="/data"
which jq || sudo apt install jq
# Optional: for GitHub PR workflow
export GITHUB_TOKEN="ghp_your_token"
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Core Philosophy
- **Semi-Automatic by Design**: The agent owns its memory files — episodes and failures are written without approval. Skill files govern behaviour and require human review before any change takes effect. This boundary is non-negotiable
- **Pattern Detection, Not Gut Feel**: Improvements are proposed only when a pattern appears with sufficient frequency and confidence. A single failure is a data point. Three failures of the same type with the same trigger is a pattern
- **Human in the Loop for Skill Changes**: Every proposed skill improvement becomes a GitHub pull request. The accountant or developer sees exactly what changed, why, and what evidence led to the proposal. Merge = accepted. Close = rejected and never re-proposed
- **Rate Limited to Protect the Machine**: Memory operations are token-budgeted. Pattern scans run overnight. Storage limits are enforced. The system cannot consume itself
The natural-language configuration specifies that pattern detection runs at '02:00 Athens time,' which imposes a locale-specific behavior. While the skill has Greek/accounting context, this file does not explicitly justify the locale constraint or present it as configurable or opt-in, so it matches the policy category for locale-specific language or regional defaults.
The skill metadata and setup section state that GitHub PR functionality uses the GITHUB_TOKEN environment variable and that this token is optional. In the GitHub integration flow, the prerequisites instead say the token is stored in /data/auth/github-token.enc, which is an active contradiction in the documentation about how the skill authenticates for PR creation.