T09 · Insecure Skill Coding Practices
- Location
scripts/_lib.mjs:15- Finding
Profile Name Path Traversal Enables Filesystem Access Outside the Secrets Directory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Microsoft 365 calendar skill is mostly purpose-aligned, but it stores sensitive OAuth tokens with weak filesystem safeguards and has a profile path handling flaw that merits review before install.
Review this skill before installing on shared or multi-user machines. Use only trusted profile names, protect ~/.openclaw/secrets/m365-calendar with owner-only permissions, avoid raw-token import unless necessary, prefer explicit timezone arguments, and consider pinning dependencies with a lockfile before relying on it for business calendars.
scripts/_lib.mjs:15Profile Name Path Traversal Enables Filesystem Access Outside the Secrets Directory
scripts/_lib.mjs:9OAuth Token and Configuration Files Are Created Without Restrictive Permissions
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- `email` (optional; informational)
- `scopes` (calendar delegated scopes)
- `~/.openclaw/secrets/m365-calendar/<profile>-token-cache.json`
- MSAL token cache (refresh token, access token, etc.)
## Why not workspace/secrets?
Multiple usage examples and recommended commands consistently force --tz Europe/Vienna, and the workflow does not indicate that the timezone should be chosen based on the user's preference or locale. This can violate language/locale policy by implicitly steering operation to a fixed locale without opt-in.
The dependency is specified with a caret range (^5.0.4) rather than being pinned to an exact version, which makes builds non-reproducible and can result in different installed versions over time. In a security-sensitive skill that handles Microsoft Graph authentication flows, this increases supply-chain risk because a newly published semver-compatible release could introduce a vulnerability or malicious code without any manifest change.
"type": "module",
"description": "OpenClaw skill: Microsoft Graph calendar automation (M365 business + consumer).",
"dependencies": {
"@azure/msal-node": "^5.0.4"
}
}
The manifest references @azure/msal-node without an exact version pin, while the package has a known advisory in some releases, so it is not possible to verify from this file alone whether deployment will resolve to a patched or affected version. Because this skill automates Microsoft 365 calendar access via Microsoft Graph, any vulnerable authentication library could increase the risk of token handling, privilege, or account-compromise issues in a context that likely processes user credentials or delegated access.
The statement at L03 suggests a strong safety property, but the rest of the document explicitly describes storing MSAL token cache files with refresh and access tokens under the user's home directory. While this does keep them out of git, it contradicts any implication that secrets are broadly protected or not persisted, which can mislead users about the actual handling of sensitive credentials.
The script defaults tz to Europe/Vienna, which imposes a specific locale-related behavior unless the user explicitly overrides it. This is a natural-language/policy-style locale constraint embedded in code behavior and is not documented here as justified or optional by default.