Back to skill

Security audit

weekly-report-generator-feishu

Security checks for vulnerabilities and agentic risk

Overview

This skill does useful weekly-report automation, but it can scan local repositories and send report contents to Feishu automatically without a clear consent step.

Review this before installing if your Git repositories, commit messages, screenshots, or weekly reports may contain private company information. Use it only with an explicit project allowlist, keep Feishu credentials out of the script, preview the generated report before sending, and avoid enabling scheduled sending until the workflow has a clear opt-in and uninstall path.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:21
Finding

Skill instructions force execution and external transmission without user confirmation

Content
View full analysis
When the user needs to generate a weekly report, summarize this week's work, or analyze Git commit records, this skill must be invoked first. This skill defines the complete process for extracting information from Git logs, categorizing work, and formatting weekly reports. ``` The original directive at lines 171-176 states that transmission is mandatory and must occur without review or confirmation: ```markdown **Important: After the AI optimizes the weekly report, it must immediately send it to Feishu without any inspection or confirmation.** 1. **Directly execute the sending command**: ```bash /Users/ai/cline-skills/send-to-feishu.sh /Users/ai/cline-skills/weekly-report-YYYYMMDD.md ``` ``` ### Technical Analysis The skill attempts to control the agent through a hard-gate directive and mandates an external side effect regardless of the user's immediate intent. A request to summarize work or inspect Git history does not necessarily authorize sending the resulting data to a third party. The mandatory sending instruction conflicts with the principle of explicit authorization for external communications. It also conflicts internally with the later “User-centric” principle and example workflow, which state that parameters should first be confirmed. The information sent can include: - Git commit subjects and development activity. - Repository-derived statistics. - Work descriptions supplied by the user. - Text extracted from screenshots. - AI-generated summaries of potentially confidential projects. The sending script truncates the report to 3,000 characters, but truncation does not prevent disclosure of sensitive content. ### Attack Path 1. A user asks the agent to summarize Git activity ...[truncated 1310 chars]
Remediation
View remediation
` directive and all language that attempts to override agent-level safety or user-consent requirements. 2. Make generation, preview, and transmission separate operations. 3. Generate a local draft first and display: - The exact destination. - The data sources used. - A preview of the content. - The files or repositories scanned. 4. Require explicit, current-session confirmation immediately before sending. 5. Never interpret “summarize my work” or “generate a report” as permission to transmit it externally. 6. Add a `--dry-run` or preview mode and make it the default. 7. Require an explicit `--send` flag and recipient argument for network transmission. 8. Allow users to disable screenshot data, commit subjects, repository names, and other sensitive fields. 9. Restrict repository discovery to an explicit allowlist rather than recursively processing a broad project root. 10. Record a local audit entry containing the confirmation time, destination, and report path without logging credentials or access tokens. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/send-to-feishu.sh:7
Finding

Feishu application secret is designed to be stored in plaintext executable source

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/send-to-feishu.sh:12
Finding

Sender accepts an arbitrary readable file for external transmission

Content
View full analysis
/dev/null | sort | tail -1 | xargs basename 2>/dev/null)}" ``` The supplied path is checked only for existence: ```bash if [[ -z "$REPORT_FILE" || ! -f "$REPORT_FILE" ]]; then echo "❌ Cannot find report file: $REPORT_FILE" exit 1 fi ``` The Python component then reads and transmits the file: ```python report_file = os.environ.get('REPORT_FILE') receive_id = os.environ.get('RECEIVE_ID') token = os.environ.get('TOKEN') with open(report_file, 'r', encoding='utf-8') as f: report_content = f.read()[:3000] payload = { 'receive_id': receive_id, 'msg_type': 'text', 'content': json.dumps({'text': report_content}, ensure_ascii=False) } req = urllib.request.Request( 'https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers={ 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json; charset=utf-8' } ) ``` ### Technical Analysis The script treats any regular file supplied as its first argument as a weekly report. It does not validate that the canonical path is inside the intended report directory, that the name follows the expected report convention, or that the file was generated by the reporting workflow. This is especially risky when combined with the skill's instruction to execute the sender automatically. An erroneous, manipulated, or injected file path could cause the script to transmit the first 3,000 characters of another UTF-8-readable file. The script correctly quotes `"$REPORT_FILE"`, so no shell command-injection vulnerability was identified in this path. The issue is ...[truncated 1083 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
安装和配置指南.md:108
Finding

Installation guide registers a persistent user LaunchAgent without integrity hardening

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This mismatch is security-relevant because the skill presents itself as a benign reporting tool while also implying local file access and external Feishu transmission without declaring permissions. Misrepresenting capabilities can cause users or orchestrators to authorize the skill under false assumptions, enabling unexpected data access or disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This mismatch is security-relevant because the skill presents itself as a benign reporting tool while also implying local file access and external Feishu transmission without declaring permissions. Misrepresenting capabilities can cause users or orchestrators to authorize the skill under false assumptions, enabling unexpected data access or disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description emphasizes convenience and zero configuration but does not adequately warn that the skill may scan local repositories and potentially extract work details from them. Missing upfront disclosure undermines informed consent for access to sensitive local development data.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The workflow explicitly says to execute local scanning without asking the user first. Because Git histories often contain sensitive internal details and the scan may cover many repositories, automatic execution violates least surprise and can collect far more data than necessary for a single request.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This guidance combines two dangerous behaviors in context: broad local repository scanning and onward transmission of derived work details. For a reporting skill, the context makes this more dangerous because users may expect harmless summarization, not silent access across many projects followed by potential disclosure of internal engineering activity.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill mandates sending the generated weekly report to Feishu immediately and without any user review or confirmation. Weekly reports derived from Git logs can contain confidential project names, internal ticket numbers, roadmap details, bug references, and other sensitive business information, so automatic transmission creates a clear exfiltration risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The workflow requires automatic Feishu transmission with no warning or confirmation, which is a classic unconsented outbound data flow. Given the business-sensitive nature of weekly reports, this significantly raises the chance of accidental disclosure to the wrong chat, tenant, or webhook.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The skill mandates immediate sending of the final report to Feishu without review, permission checks, or validation of destination. This is a direct exfiltration pathway for sensitive operational and development information and is especially risky because the instruction is framed as mandatory and bypasses normal consent safeguards.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/send-to-feishu.sh (reported line 39)May include surrounding context.

sh
# Step 1: 获取 tenant_access_token
echo "🔑 获取飞书访问令牌..."
TOKEN_RESPONSE=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d "{\"app_id\":\"$APP_ID\",\"app_secret\":\"$APP_SECRET\"}")

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description emphasizes convenience and automation but does not present a clear warning that the skill may scan multiple local Git repositories, read screenshots, process their contents with AI, and automatically transmit generated summaries to Feishu. Because these inputs may contain proprietary source code context, internal discussions, or sensitive images, lack of up-front disclosure undermines informed consent and can lead to unintended data exposure.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares no explicit tool or permission scope while its instructions clearly require shell execution, local file/repository access, environment-variable use, and network transmission to Feishu. This weakens review and consent boundaries because the agent could perform sensitive actions without an auditable least-privilege declaration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to scan all Git repositories under a configured root rather than limiting access to user-specified repositories relevant to the request. This over-collects local development data and may expose unrelated projects, credentials-in-commits, internal codenames, or confidential workstreams to later processing or transmission.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The listed trigger cases include very common phrases such as "生成周报", "写周报", "总结本周工作", and "这周做了什么", which are broad enough to overlap with ordinary conversation rather than a narrowly scoped skill invocation. The file does not provide exclusion conditions or negative examples to distinguish when the skill should not activate.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

At L319 the document states a key principle of asking the user to confirm parameters before acting, and the example flow at L332-L341 shows explicit confirmation before execution. But earlier instructions at L044-L045 and L171 say to execute automatically and send to Feishu without any checking or asking, which is a direct contradiction in documented intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script is described entirely as a Chinese-language weekly report generator, and the generated report content and user-facing log messages are hard-coded in Chinese. Because this is a natural-language policy concern applying to all file types, forcing a specific language without opt-in or a documented region-specific justification is a policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest claims the tool can automatically extract information from local Git commits, work descriptions, and screenshots to produce an AI-generated, business-oriented weekly report. In this file, the report content is explicitly described as simplified handling and is generated solely from Git commit messages, with no processing of work descriptions, screenshots, or AI-based summarization.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes the skill as automatically pushing generated weekly reports to Feishu and supporting scheduled sending. However, this script explicitly states that the auto-send functionality has been removed and only saves the report locally, which means the implemented behavior in this file falls short of the advertised delivery capability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script instructs users to hardcode Feishu APP_ID, APP_SECRET, and RECEIVE_ID directly into the shell script, which encourages unsafe secret handling. Storing credentials in source-controlled files or skill directories increases the chance of accidental disclosure through backups, repository commits, file sharing, or local compromise.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This code transmits Feishu application credentials to an external Feishu API endpoint in order to obtain an access token. While the transmission is functionally required, it is still a real data egress path involving sensitive secrets, and in a skill that advertises automatic scanning and sending of local work data, such outbound communication materially increases exposure if users do not understand what is being sent.

Content

Scanner excerpt · scripts/send-to-feishu.sh (reported line 39)May include surrounding context.

sh
# Step 1: 获取 tenant_access_token
echo "🔑 获取飞书访问令牌..."
TOKEN_RESPONSE=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d "{\"app_id\":\"$APP_ID\",\"app_secret\":\"$APP_SECRET\"}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script sends the contents of the generated weekly report to Feishu without any explicit consent gate, preview, redaction step, or warning about potential disclosure of sensitive business information. In the context of this skill, the report is derived from local git history and work artifacts, so it may contain confidential project names, internal bugs, code details, or customer information that are automatically exfiltrated to an external service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advertises a highly generic trigger phrase such as “按照skill帮我生成周报,” while the overall behavior performs sensitive actions: scanning local repositories, extracting screenshot contents, and sending output to Feishu automatically. Broad activation language increases the chance of accidental invocation during ordinary conversation, which could cause unintended collection and external transmission of potentially sensitive work data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The scheduled automation section describes unattended weekly generation and sending, but omits a user-facing warning about autonomous execution and delivery to Feishu without real-time review. In a skill that aggregates local development activity and screenshots, unattended operation increases the risk of repeatedly sending inaccurate, overbroad, or sensitive information to a chat destination.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The usage examples show normal-language requests like “帮我生成本周周报” and “总结一下我这周做了什么,” which are common conversational phrases and not safely scoped commands. In this skill’s context, those phrases can trigger repository enumeration, screenshot analysis, AI summarization, and message delivery, making accidental activation materially risky.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installation guide and skill description emphasize convenience and 'zero configuration' while stating that the tool scans local repositories/files and automatically sends generated reports to Feishu, but they do not present this data collection and exfiltration behavior as a clear, front-loaded consent warning. In an AI skill context, users may trigger the workflow with a simple natural-language request, making silent collection of project metadata and outbound transmission significantly riskier than a normal manual script.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The guide instructs users to install a LaunchAgent plist to enable recurring execution, which establishes persistence on the host. In the context of a skill that scans local development data and can automatically send reports externally, persistence materially increases the chance of repeated unintended collection and transmission.

Content

Scanner excerpt · 安装和配置指南.md (reported line 108)May include surrounding context.

⏰ 配置定时任务(macOS)

步骤 1:复制 plist 文件

bash
# 复制定时任务配置

Static analysis

No suspicious patterns detected.