Back to skill

Security audit

柳比歇夫时间记录

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly purpose-aligned, but it can read and persist personal Feishu activity data too broadly in multi-user setups and exposes sensitive base identifiers in logs.

Review carefully before installing, especially if more than one person may use the same Feishu base. Use a dedicated Feishu account or isolated base with least privileges, avoid sharing setup logs because they include base identifiers, pin and verify lark-cli before authentication, and prefer dry-run or explicit confirmation before scheduled or manual daily report writes.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/daily_report.py:77
Finding

Daily reports aggregate records across users without ownership filtering

Content
View full analysis
list[dict]: """从飞书读取指定日期的所有记录""" # 计算日期的毫秒时间戳 date_obj = datetime.strptime(date_str, "%Y-%m-%d").replace(tzinfo=CST) date_ts = int(date_obj.timestamp() * 1000) data = run_lark_cli([ "+record-list", "--base-token", BASE_TOKEN, "--table-id", RECORDS_TABLE_ID, "--limit", "200", ]) fields = data["data"]["fields"] records_raw = data["data"]["data"] field_names = {i: n for i, n in enumerate(fields)} records = [] for raw in records_raw: row = {} for i, val in enumerate(raw): name = field_names.get(i, f"field_{i}") row[name] = val # 只取目标日期的记录 rec_date = str(row.get("记录日期", ""))[:10] if rec_date == date_str: records.append(row) return records ``` The command-line interface accepts recorder identity parameters: ```python parser.add_argument("--recorder", default="", help="记录人姓名(用于显示)") parser.add_argument("--recorder-id", default="", help="记录人open_id(飞书user类型字段必填,格式:ou_xxx)") ``` However, those parameters are not applied when records are retrieved: ```python # Step 1: 读取记录 records = fetch_records(args.date) print(f"📋 读取到 {len(records)} 条记录") if not records: print(f"⚠️ {args.date} 无记录,跳过") return # Step 2: 计算统计 stats = compute_stats(records) # Step 3: 拼接全文 report_text = build_report_text(args.date, stats, args.insight) # Step 4: 写入日报表 write_daily_report(args.date, stats, report_text, args.insight, args.dry_run, args.recorder, args.recorder_id) ``` ### Technical Analysis The report generator retrieves up to 200 records from the entire records table and filters them only by date. It does not filter by the `记录人` field, ev ...[truncated 2283 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup.py:29
Finding

Feishu base token is exposed in console and automation logs

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:4
Finding

Unpinned lark-cli dependency creates supply-chain exposure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The setup and reporting instructions describe initialization and automation, but do not prominently warn that these actions create Feishu tables and write user activity data into them. Because the stored content includes time logs, tags, and personal routines, users may unknowingly persist sensitive behavioral data to a third-party service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrase for report generation is broad enough that a normal user message like “日报” can cause the skill to run a reporting workflow, potentially reading records and writing a daily report to Feishu. In this skill’s context, that action is state-changing and may expose or persist personal activity data without a clear confirmation step, making accidental invocation a real safety issue.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises shell-capable behavior via setup and report-generation scripts, but it does not declare an explicit tool scope such as allowed-tools or permissions. This creates a permission-boundary ambiguity: an agent or platform may permit broader execution than users expect, increasing the risk of unintended command execution and external data access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level description does not clearly warn that user activity logs and generated reports are persisted to Feishu tables. Because the stored data includes detailed daily activities and potentially relationship or health-adjacent information, omission of an upfront storage disclosure weakens user consent and increases privacy risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger condition covers nearly any user description of recent activity, which is overly broad for a skill that stores personal behavior data and can initiate report workflows. In context, broad activation increases the chance of accidental capture, classification, and persistence of ordinary conversation into Feishu without sufficiently deliberate user intent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims it only performs understanding/classification and never writes to databases, yet the document later instructs shell scripts to read from and write to Feishu for daily reports. This mismatch can mislead users and reviewers about the skill's actual capabilities and data-handling behavior, undermining informed consent and security review.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/daily_report.py (reported line 59)May include surrounding context.

python
def run_lark_cli(args: list[str]) -> dict:
    """调用 lark-cli 并返回 JSON 结果"""
    cmd = ["lark-cli", "base"] + args + ["--as", "user"]
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"❌ lark-cli 错误: {result.stderr}", file=sys.stderr)
        sys.exit(1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script writes detailed activity records, generated report text, and optionally recorder identity to Feishu, but it provides no explicit user-consent gate, disclosure, or confirmation before transmitting personal productivity data to an external service. In a time-tracking skill, this data can reveal sensitive behavioral patterns, routines, and identity information, so silent export increases privacy and compliance risk.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup.py (reported line 33)May include surrounding context.

python
"""执行 lark-cli 命令并返回解析后的 JSON"""
    cmd = ["lark-cli"] + args
    print(f"  → {' '.join(cmd)}")
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
    if result.returncode != 0 and check:
        print(f"  ✗ 命令失败 (exit {result.returncode})")
        print(f"    stdout: {result.stdout[:200]}")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup.py (reported line 52)May include surrounding context.

python
"""检查 lark-cli 是否可用"""
    print("\n📋 步骤 1/4:检查 lark-cli")
    try:
        result = subprocess.run(["lark-cli", "--version"], capture_output=True, text=True, timeout=5)
        if result.returncode == 0:
            print("  ✓ lark-cli 已安装")
        else:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/setup.py (reported line 65)May include surrounding context.

python
sys.exit(1)

    # 检查是否已登录
    result = subprocess.run(["lark-cli", "auth", "whoami"], capture_output=True, text=True, timeout=5)
    if result.returncode == 0 and result.stdout.strip():
        print(f"  ✓ 已登录: {result.stdout.strip()}")
    else:

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

All user-facing instructions, examples, field names, and command phrases are presented only in Chinese, including expected invocation text like "执行柳比歇夫日报生成,日期为昨天". Under the stated policy, forcing a specific language without opt-in can be a locale/language policy issue when no alternative or user choice is offered.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

L56 说明可根据用户用词“主动标注”能量状态,L95 和 L98 的模式A JSON/确认消息示例也包含非空 energy_state。可是在 L182 又规定记录时 energy_state 必须填 null,由用户后续在飞书补填。两处说明对同一字段的处理方式互相冲突,容易导致实现意图混乱。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

All natural-language instructions, descriptions, and generated report labels are hard-coded in Chinese, with no indication that other languages are supported or that the locale is intentionally constrained. Under the policy, a fixed language requirement without user opt-in is a natural-language locale violation unless clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language instructions, usage guidance, and prerequisites entirely in Chinese. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script's operational prints and final instructions shown to users are all in Chinese, which effectively enforces a single language during execution. Because no opt-in, alternative locale, or justification is provided, this conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.