Back to skill

Security audit

Microsoft 365 Email & Calendar

Security checks for vulnerabilities and agentic risk

Overview

This Microsoft 365 skill mostly matches its stated email and calendar purpose, but it has user-impacting actions with weak or misleading safeguards.

Review carefully before installing. Use a least-privilege Microsoft app registration, only authenticate accounts you intend this CLI to access, protect the local credential directory, and be aware that mail sending and calendar creation occur without an actual confirmation prompt in the current code.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documentation indicates use of environment variables and network access to Microsoft Graph, but it does not declare an explicit tool scope such as permissions or allowed-tools. This creates a trust and review gap: consumers may not understand that the skill can access external services and sensitive account data, increasing the chance of unintended data exposure or misuse.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
79% confidence
Finding

The skill states that separate account tokens are stored persistently in ~/.openclaw/credentials/, which means authentication material survives across sessions. Persistent tokens for email and calendar accounts increase the risk of account compromise or cross-account misuse if the local credential store is exposed, shared, or insufficiently protected.

Content

Scanner excerpt · SKILL.md (reported line 27)May include surrounding context.

md
- Send: `node index.js --account work mail send --to a@b.com --subject "Hi" --body "Hello"`
- Search: `node index.js --account work mail search "invoice"`
- Calendar: `node index.js --account work calendar --from 2026-04-14T00:00:00Z --to 2026-04-14T23:59:59Z`
- Create event: `node index.js --account work calendar-create --subject "Meeting" --start 2026-04-15T10:00 --end 2026-04-15T11:00`

## Multi-account
Use `--account <name>` to switch. Each account has separate tokens stored in `~/.openclaw/credentials/`.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This function sends outbound email via the Microsoft Graph API, which is a user-impacting external action. The code provides no confirmation prompt, warning, logging, or inline documentation disclosing that invoking it will transmit message content and recipients to an external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code hard-codes the calendar event time zone to 'Europe/Kyiv' when creating events, regardless of the user's actual locale or mailbox settings. This can silently create meetings at incorrect times, causing missed meetings, accidental disclosure through mis-scheduled invites, or operational disruption across accounts and regions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This function performs a destructive operation by deleting a calendar event through the Graph API. There is no confirmation step, warning, logging, or documentation in the file indicating that the action is irreversible or user-affecting.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.