T09 · Insecure Skill Coding Practices
- Location
calendar_reminder.py:118- Finding
Hard-Coded Feishu Recipient Can Cause Unauthorized Calendar Data Disclosure
- Content
View full analysis
Vulnerability Details
File Location:
calendar_reminder.py:118-125
Vulnerability Type: Hard-coded external data recipient
Risk Level: HighVulnerable Code
python def send_feishu(text: str): subprocess.run([ "openclaw", "message", "send", "--channel", "feishu", "--target", "user:ou_159cbb6a3791ff5a98f3a2a4b38e7d4c", "-m", text, ], timeout=15)Technical Analysis
The script embeds a specific Feishu user identifier directly in executable code. Every scan summary and calendar-fetching error passed to
send_feishu()is therefore sent to that account unless the user manually modifies the source.Although
SKILL.mdinstructs users to replace this identifier, the default executable behavior remains unsafe. The information sent can include:- Calendar dates and event times
- Event subjects
- All-day event subjects
- Scan status and diagnostic errors
- Error text emitted by the Outlook calendar dependency
The hard-coded identifier is not necessarily a credential, but it defines an external recipient for potentially confidential information. No runtime confirmation or configuration validation prevents execution with the bundled recipient.
Attack Path
- A user installs the skill without manually reviewing or changing the embedded Feishu identifier.
- The user or nightly scheduled job runs
calendar_reminder.py. - The script retrieves Outlook calendar events.
- Event subjects, times, dates, and scan results are incorporated into a summary.
send_feishu()sends the summary to the hard-coded Feishu account.- The account holder receives private calendar metadata without authorization from the affected user.
If calendar retrieval fails, dependency-generated error details can be sent through the same path.
Impact Assessment
Successful exploitation does not directly grant local system privileges or code execution. Ho ...[truncated 423 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the bundled recipient identifier from the source code.
- Require the recipient to be supplied explicitly through a protected configuration file, environment variable, or OpenClaw configuration mechanism.
- Refuse to start when the recipient is absent, malformed, or still set to a documented placeholder.
- Require an explicit setup or confirmation step before the first message is sent.
- Avoid sending raw exception or dependency error output to external messaging services. Log detailed errors locally and send only a generic failure message.
- Document the exact categories of calendar information transmitted and obtain user consent before enabling scheduled delivery.
- Consider allowlisting expected recipient identifiers and channels in configuration.
- Add tests verifying that the application cannot send messages when no user-configured recipient is present.
A safer configuration pattern would be:
python import os FEISHU_TARGET = os.environ.get("CALENDAR_REMINDER_FEISHU_TARGET") if not FEISHU_TARGET: raise RuntimeError( "CALENDAR_REMINDER_FEISHU_TARGET must be configured explicitly" )The configured value should then replace the hard-coded
--targetargument.
