Back to skill

Security audit

Feishu Smart Alarm

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Feishu reminder skill, but it needs review because it can send app credentials and chat data to an arbitrary configured API host and keeps reminder data locally without clear retention controls.

Review this before installing. Use only a trusted, HTTPS Feishu/Lark API host, avoid current-directory .env files from untrusted workspaces, restrict which chats/messages can create reminders, disable or tightly gate --no-confirm, and set a retention and access-control policy for the SQLite database.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/feishu_api.py:10
Finding

Unrestricted API Base URL Can Exfiltrate Feishu Application Credentials

Content
View full analysis
None: self.base_url = get_optional('FEISHU_BASE_URL', 'https://open.feishu.cn') self.app_id = get_required('FEISHU_APP_ID') self.app_secret = get_required('FEISHU_APP_SECRET') def tenant_access_token(self) -> str: resp = requests.post( f'{self.base_url}/open-apis/auth/v3/tenant_access_token/internal', headers={'Content-Type': 'application/json; charset=utf-8'}, json={'app_id': self.app_id, 'app_secret': self.app_secret}, timeout=30, ) ``` The endpoint can also be implicitly selected through environment files in the current working directory: ```python def load_local_env() -> None: candidates = [ Path.cwd() / '.env.local', Path.cwd() / '.env', ROOT_DIR / '.env.local', ROOT_DIR / '.env', ] for item in candidates: _load_env_file(item) ``` ### Technical Analysis `FEISHU_BASE_URL` is used directly when constructing the authentication endpoint. The implementation does not enforce HTTPS, validate the hostname against an allowlist, reject URL credentials, or otherwise establish that the destination is an authorized Feishu/Lark API service. The application ID and application secret are included in the body of the first request to this configurable destination. If the destination returns a successful token-shaped response, the same base URL is subsequently used to transmit the bearer token, destination identifier, and reminder message. The risk is increased by loading `.env` and `.env.local` from the current working directory. A file controlled by another local user, deployment artifact, or untrusted workspace can alter `FEI ...[truncated 1809 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:67
Finding

Excess Feishu Message and Identity Data Is Retained Indefinitely in Plaintext SQLite Storage

Content
View full analysis
None: self.db_path = str(db_path) Path(self.db_path).parent.mkdir(parents=True, exist_ok=True) self._init_db() def _connect(self) -> sqlite3.Connection: conn = sqlit ...[truncated 2492 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A second description-behavior mismatch is reported: the skill lacks the claimed message-ingestion, natural-language parsing, reminder scheduling, and sender/conversation handling logic, but does obtain Feishu app credentials and tenant access tokens. Undeclared authentication behavior is sensitive because it grants API capabilities that operators may not expect from a supposedly narrow reminder skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A second description-behavior mismatch is reported: the skill lacks the claimed message-ingestion, natural-language parsing, reminder scheduling, and sender/conversation handling logic, but does obtain Feishu app credentials and tenant access tokens. Undeclared authentication behavior is sensitive because it grants API capabilities that operators may not expect from a supposedly narrow reminder skill.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 22)May include surrounding context.

python
def load_local_env() -> None:
    candidates = [
        Path.cwd() / '.env.local',
        Path.cwd() / '.env',
        ROOT_DIR / '.env.local',
        ROOT_DIR / '.env',

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 24)May include surrounding context.

python
def load_local_env() -> None:
    candidates = [
        Path.cwd() / '.env.local',
        Path.cwd() / '.env',
        ROOT_DIR / '.env.local',
        ROOT_DIR / '.env',

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 23)May include surrounding context.

python
def load_local_env() -> None:
    candidates = [
        Path.cwd() / '.env.local',
        Path.cwd() / '.env',
        ROOT_DIR / '.env.local',
        ROOT_DIR / '.env',
    ]

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/config.py (reported line 25)May include surrounding context.

python
def load_local_env() -> None:
    candidates = [
        Path.cwd() / '.env.local',
        Path.cwd() / '.env',
        ROOT_DIR / '.env.local',
        ROOT_DIR / '.env',
    ]

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The --no-confirm parameter allows silent creation of reminders in an original chat context without notifying the affected user, which can be abused by an upstream agent or caller to perform actions the user may not realize were scheduled. In a messaging/reminder skill, silent state-changing operations are more dangerous because they create persistent behavior and later outbound messages that appear system-authorized.

Content

Scanner excerpt · scripts/main.py (reported line 148)May include surrounding context.

python
p2.add_argument('--sender-open-id', default='', help='原消息发送者 open_id,可选')
    p2.add_argument('--sender-name', default='', help='原消息发送者名称,可选')
    p2.add_argument('--message-id', default='', help='原消息 ID,可选')
    p2.add_argument('--no-confirm', action='store_true', help='只建提醒,不发送确认消息')
    p2.add_argument('--now', default='', help='当前时间,ISO 格式,可选')
    p2.set_defaults(func=cmd_create_reminder)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill declares no explicit tool scope or permissions even though its documented behavior requires environment-variable access, local file/database access, and network calls to Feishu APIs. That mismatch weakens least-privilege controls and makes it harder for reviewers and operators to understand what the skill can access, increasing the chance of overbroad execution in production.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description says reminders and confirmation messages are sent back into Feishu conversations, but it does not prominently warn users that message content and derived summaries may be echoed into chats or groups. In group contexts this can expose sensitive task details, deadlines, or personal reminders to unintended participants.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guidance to call create-reminder on every Feishu message makes the trigger surface overly broad and can cause the skill to process messages that were never intended to create reminders. In a chat integration, this increases the risk of unwanted reminder creation, privacy over-collection of message content, and abuse through message flooding or accidental parsing of sensitive text.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The title explicitly defines this as Chinese-only time parsing rules, and the document provides all examples and behavior solely in Chinese. This can violate language/locale policy if the skill applies broadly and does not offer the user a language choice or clearly document a justified locale-specific constraint.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/feishu_api.py (reported line 16)May include surrounding context.

python
self.app_secret = get_required('FEISHU_APP_SECRET')

    def tenant_access_token(self) -> str:
        resp = requests.post(
            f'{self.base_url}/open-apis/auth/v3/tenant_access_token/internal',
            headers={'Content-Type': 'application/json; charset=utf-8'},
            json={'app_id': self.app_id, 'app_secret': self.app_secret},

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code sends the app ID and app secret to a remote API to obtain a tenant access token, and later sends message content and recipient identifiers over the network. There is no confirmation prompt, logging/print statement, or explanatory comment/docstring in this file disclosing that sensitive configuration values and user-provided message data are transmitted externally.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/feishu_api.py (reported line 32)May include surrounding context.

python
def send_text_message(self, receive_id: str, text: str, receive_id_type: str = 'chat_id') -> dict:
        token = self.tenant_access_token()
        resp = requests.post(
            f'{self.base_url}/open-apis/im/v1/messages',
            params={'receive_id_type': receive_id_type},
            headers={

Tainted flow: 'token' from requests.post (line 25, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/feishu_api.py (reported line 32)May include surrounding context.

python
def send_text_message(self, receive_id: str, text: str, receive_id_type: str = 'chat_id') -> dict:
        token = self.tenant_access_token()
        resp = requests.post(
            f'{self.base_url}/open-apis/im/v1/messages',
            params={'receive_id_type': receive_id_type},
            headers={

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
65% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · scripts/main.py (reported line 148)May include surrounding context.

python
p2.add_argument('--sender-open-id', default='', help='原消息发送者 open_id,可选')
    p2.add_argument('--sender-name', default='', help='原消息发送者名称,可选')
    p2.add_argument('--message-id', default='', help='原消息 ID,可选')
    p2.add_argument('--no-confirm', action='store_true', help='只建提醒,不发送确认消息')
    p2.add_argument('--now', default='', help='当前时间,ISO 格式,可选')
    p2.set_defaults(func=cmd_create_reminder)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The parser relies on Chinese keywords, Chinese numerals, and Chinese date/time expressions, and the default timezone is also fixed to Asia/Shanghai. This creates a language/locale constraint in the skill behavior without any visible user choice or documented opt-in, which matches the policy-violation category for forced language/locale behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description limits support to Chinese time expressions and sets a default timezone of Asia/Shanghai, but does not indicate any user choice or opt-in for language/locale handling. This is a natural-language policy concern because the skill appears to force a specific locale behavior by default rather than offering selection or clearly documenting a region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
73% confidence
Finding

整份说明以中文编写并面向“飞书消息流”集成,默认在特定语言/平台环境下工作,但没有说明是否支持其他语言输入、回复语言选择或地区限制依据。若该技能面向更广泛用户使用,这种隐含的语言/locale 约束可能违反需提供选择或明确说明的组织策略。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The runtime error string 缺少配置 is hard-coded in Chinese, which imposes a specific language choice in a user-facing message. The file does not provide any locale selection or indicate that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command descriptions and argument help strings are written entirely in Chinese, which imposes a specific language on users of this skill. There is no indication of alternative locale support or any user choice, so this is a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The add() method writes reminder text, recipient identifiers, sender details, and timestamps into a local SQLite database. In this file there is no confirmation prompt, logging/print statement, or explanatory comment/docstring disclosing that user-related content will be persisted.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified as requests>=2.31.0, which allows installation of any future version and does not guarantee reproducible or reviewed builds. This can lead to accidental adoption of vulnerable or breaking releases through normal dependency resolution or supply-chain compromise, even though the file itself does not prove an immediately exploitable flaw.

Content

Scanner excerpt · scripts/requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.31.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

Because requests is not pinned, it is impossible to verify from this manifest whether deployment will use a version affected by known advisories. In a skill that reads chat content and may interact with Feishu/Lark APIs, use of a vulnerable HTTP client could expose credentials, mishandle TLS or redirects, or leak request metadata depending on the resolved version and runtime behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.