T09 · Insecure Skill Coding Practices
- Location
scripts/move-to-inbox.mjs:20- Finding
Message is moved to Inbox without the documented user confirmation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it claims at a high level, but its mailbox-changing commands can run without the confirmations its documentation promises.
Review this skill carefully before installing. It is not showing clear malicious intent, but it can alter Outlook or Exchange mailbox state without the confirmations its documentation describes. Use only with a Microsoft profile you trust, avoid running undocumented bulk commands unless you understand the effects, and prefer dry-run or manual review workflows until the move and labeling commands require explicit approval.
scripts/move-to-inbox.mjs:20Message is moved to Inbox without the documented user confirmation
scripts/move-to-learning.mjs:20Learning-folder creation and message movement occur without user confirmation
scripts/check-spam.mjs:6Spam-check command defaults to live bulk mutations and modifies categories during dry-run mode
scripts/analyze.mjs:148Attacker-controlled email fields are printed without terminal control-character sanitization
This is a true autonomous-decision risk because the skill advertises 'Automatic mode (no confirmation)' for taking mailbox actions based on heuristic spam scoring rather than deterministic truth. The skill context makes this more dangerous, not less, because email classification is error-prone and the affected resource is a real Exchange mailbox, including potentially shared mailboxes.
node skills/m365-spam-manager/scripts/move-to-learning.mjs --profile tom-business-mail --mailbox radman@e-ola.com --id <MSG_ID>
### Automatic mode (no confirmation)
```bash
# Auto-clean: move high-confidence spam to learning, medium to review
The skill explicitly supports an automatic mode that performs mailbox-moving actions without per-item confirmation, which can modify a user's mailbox state at scale. In the context of email security workflows, false positives are common, so unattended moves can misclassify legitimate mail and cause loss of visibility, missed business communications, or training-folder pollution.
This code persists the MSAL token cache back to the local filesystem with fs.writeFileSync, which is a safety-relevant file write involving authentication material. In this file there is no confirmation prompt, logging, or comment warning the user that token data may be updated on disk.
The graphFetch helper performs outbound HTTP requests and may attach an Authorization bearer token, which can transmit user or system data to remote services. This file contains no confirmation, logging, or explanatory comment warning that requests and credentials may be sent over the network.
This script accesses mailbox contents via Microsoft Graph and prints sender addresses, subjects, folder names, and risk annotations directly to stdout without any built-in warning, consent prompt, masking, or output-safety controls. In an agent/skill context, that can expose sensitive email metadata to logs, calling processes, terminals, or downstream tools, increasing the chance of unintended disclosure of private communications.
The lockfile pins uuid to 8.3.2, which the supplied finding identifies as affected by a bounds-check issue in v3/v5/v6 when a caller provides a buf argument. Although package-lock.json alone does not prove the vulnerable API path is exercised, shipping a dependency version with a known security advisory is generally a real supply-chain risk because downstream code or transitive code may invoke the affected functions.
The dependency version is specified with a caret range (^5.0.4), which permits automatic installation of newer minor and patch releases. This weakens build reproducibility and can unintentionally introduce a compromised or breaking upstream release into the skill's authentication flow, especially significant because this package handles Microsoft identity and token management.
"type": "module",
"description": "OpenClaw skill: Microsoft 365 spam folder manager with suspicious score calculation.",
"dependencies": {
"@azure/msal-node": "^5.0.4"
}
}
No suspicious patterns detected.