Back to skill

Security audit

Feishu Calendar Meeting.Tmp

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its Feishu calendar purpose, but it tells users to keep Feishu OAuth tokens in a plaintext workspace file, which warrants review before installing.

Review this skill carefully before installing. It appears intended to create Feishu calendar meetings, but you should avoid storing Feishu access or refresh tokens in a normal workspace markdown file; use a credential store or tightly permissioned secret mechanism, grant only the minimum Feishu scopes needed, and rotate any token that may have been exposed.

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
SKILL.md:33
Finding
OAuth Tokens Stored in a Plaintext Workspace File## Vulnerability Details **File Location**: `SKILL.md`, lines 33–44 **Vulnerability Type**: Plaintext storage of sensitive OAuth credentials **Risk Level**: Medium ### Vulnerable Code Snippet The following is an English translation of the relevant source documentation: ```markdown ### 2. Token Management - The access token is valid for approximately two hours. - The refresh token is valid for approximately 30 days. - Use the refresh token after expiration. Tokens are stored in `~/.openclaw/workspace/feishu_tokens.md`. ## Usage ```bash USER_TOKEN="xxx" # Read from feishu_tokens.md ``` ``` The token is subsequently used as a bearer credential in the Feishu API request at lines 68–70: ```bash curl -s -X POST "https://open.feishu.cn/open-apis/calendar/v4/calendars/${CALENDAR_ID}/events" \ -H "Authorization: Bearer $USER_TOKEN" \ -H "Content-Type: application/json" ``` ### Technical Analysis The Skill explicitly directs the user or Agent to persist OAuth access and refresh tokens in a Markdown file under the OpenClaw workspace. It does not require restrictive file permissions, encryption, an operating-system credential store, a platform secret manager, token redaction, or secure deletion. OAuth bearer tokens grant access based on possession. A process that obtains the token does not need the user's password to exercise the permissions associated with it. The refresh token presents greater exposure because the documentation states that it remains valid for approximately 30 days and can be used to obtain replacement access tokens. Keeping credentials inside a workspace also increases the chance of unintended disclosure through workspace synchronization, backups, diagnostic archives, source-control operations, broad local permissions, or access by another local process. ### Attack Path 1. The Skill stores an access token and potentially a refresh token in `~/.openclaw/workspace/feishu_tokens.md` ...[truncated 1403 chars]
Remediation
## Remediation Suggestions 1. Store access and refresh tokens in the OpenClaw credential store, an operating-system keychain, or a dedicated secret-management service rather than a Markdown workspace file. 2. If file-based storage is unavoidable, place the file outside synchronized or project workspaces and enforce owner-only permissions such as mode `0600`. 3. Encrypt credentials at rest using a key that is not stored alongside the encrypted token data. 4. Avoid printing, logging, embedding, or returning bearer tokens in command output, diagnostics, or Agent responses. 5. Request only the minimum Feishu OAuth scopes needed for the requested operation. 6. Implement secure token refresh handling, including refresh-token rotation where supported and deletion of superseded credentials. 7. Revoke and rotate any tokens that may already have been stored in broadly accessible workspace files. 8. Document explicit cleanup procedures so credentials are removed when authorization is revoked or the Skill is uninstalled.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill explicitly instructs reading a Feishu user access token from a local file and using it in API calls, but it provides no warning about sensitive credential handling, scope minimization, storage security, or avoiding disclosure in logs/history. In an agent setting, this increases the risk of token exposure or misuse because user tokens grant direct access to calendar and meeting resources.

External Transmission

Medium
Category
Data Exfiltration
Content
# 可选:用户指定地点时添加
# "location": "地点"

curl -s -X POST "https://open.feishu.cn/open-apis/calendar/v4/calendars/${CALENDAR_ID}/events" \
  -H "Authorization: Bearer $USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$JSON"
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.