Back to skill

Security audit

feishu-sheets-toolkit

Security checks for vulnerabilities and agentic risk

Overview

This Feishu Sheets skill mostly matches its spreadsheet purpose, but it can directly delete or alter remote spreadsheets and includes under-described management capabilities without clear safeguards.

Install only if you intend to let an agent read and modify Feishu Sheets. Treat delete rows, delete columns, delete worksheet, find/replace, and protection changes as high-impact actions: use test spreadsheets first, keep backups or version history, limit Feishu app permissions, and require explicit human confirmation before destructive operations.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented purpose understates or omits materially different capabilities such as permission/protection changes, comments, formatting, and worksheet copying. This mismatch is dangerous because users and policy layers may authorize the skill expecting simple spreadsheet CRUD, while the implementation could alter protections, expose more data, or perform broader modifications than anticipated.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · feishu_enhanced.py (reported line 17)May include surrounding context.

python
self.access_token = None
    
    def get_access_token(self):
        """获取Access Token"""
        url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
        data = {
            "app_id": self.app_id,

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/api-reference.md (reported line 11)May include surrounding context.

Authentication

All API calls require a tenant access token in the Authorization header:

text
Authorization: Bearer {tenant_access_token}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

The documented delete endpoint enables direct destructive modification of spreadsheet structure, and the reference provides no approval, validation, or safety constraints around its use. In an agent-integrated skill, parameter abuse or prompt misunderstanding could translate into unauthorized or overbroad deletion of rows or columns, making this more dangerous than ordinary static documentation.

Content

Scanner excerpt · references/api-reference.md (reported line 149)May include surrounding context.

md
### 7. Delete Rows/Columns

**Endpoint:** `DELETE /sheets/v2/spreadsheets/{spreadsheet_token}/dimension_range`

**Request Body:** Same as insert

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

python
self._token = None
        
    def _get_token(self) -> str:
        """Get tenant access token"""
        if self._token:
            return self._token

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README documents create, write, append, and delete-capable spreadsheet operations without any warning that these actions modify remote Feishu data and may be irreversible. In an agent skill context, this increases the chance that an agent or user invokes destructive actions on production spreadsheets without explicit confirmation or safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation exposes delete-sheet functionality without warning that removing a sheet can permanently delete data or break dependent workflows. Because this skill is intended for agent use, omitting such warnings makes accidental destructive execution more plausible than in a passive library README.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The column deletion example demonstrates a destructive structural change without warning about loss of cell contents, formula breakage, and downstream reporting impact. In spreadsheet automation, deleting the wrong columns can silently corrupt datasets at scale, making this omission security-relevant from an operational integrity standpoint.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill does not explicitly constrain tool scope even though the content indicates capabilities that may require network and environment access. In an agent setting, missing scope declarations can enable broader-than-expected execution privileges, making it harder to enforce least privilege and increasing the chance of unintended data access or outbound requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documents destructive operations like deleting rows, columns, and worksheets without any warning, confirmation expectation, or backup guidance. In an agent workflow, that increases the likelihood of irreversible user-data loss from ambiguous prompts, mistaken identifiers, or automation errors.

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 · feishu_enhanced.py (reported line 23)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 48)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 56)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 75)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 87)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 115)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 123)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

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 · feishu_enhanced.py (reported line 138)May include surrounding context.

python
"app_id": self.app_id,
            "app_secret": self.app_secret
        }
        resp = requests.post(url, json=data)
        if resp.status_code == 200:
            self.access_token = resp.json().get("tenant_access_token")
            return self.access_token

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill exposes sheet deletion as a direct API call with no built-in confirmation, dry-run mode, or guardrail against accidental invocation. In an agent context, ambiguous prompts, prompt injection, or misrouting could cause irreversible destruction of user data without clear user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Deleting rows or columns is a destructive modification, yet the method performs the operation immediately without confirmation or safeguards. In a tool used by an autonomous or semi-autonomous agent, this increases the risk of accidental data loss from prompt confusion or malicious instruction chaining.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes the skill as supporting create/read/write data, appending rows, inserting/deleting rows or columns, and managing worksheets. The code additionally changes visual styles, applies sheet protection permissions, creates conditional formatting rules, and reads/adds comments, which are materially different capabilities not reflected in the declared description or supported operations.

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 · feishu_enhanced.py (reported line 95)May include surrounding context.

python
url = f"https://open.feishu.cn/open-apis/sheets/v3/spreadsheet/{spreadsheet_token}/sheets/{sheet_id}/style"
        headers = {"Authorization": f"Bearer {self.access_token}"}
        data = {"range": range, "style": style}
        resp = requests.put(url, json=data, headers=headers)
        return resp.json()
    
    def protect_sheet(self, spreadsheet_token, sheet_id, permission):

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 · feishu_enhanced.py (reported line 103)May include surrounding context.

python
url = f"https://open.feishu.cn/open-apis/sheets/v3/spreadsheet/{spreadsheet_token}/sheets/{sheet_id}/style"
        headers = {"Authorization": f"Bearer {self.access_token}"}
        data = {"range": range, "style": style}
        resp = requests.put(url, json=data, headers=headers)
        return resp.json()
    
    def protect_sheet(self, spreadsheet_token, sheet_id, permission):

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and user-facing descriptions are only in Chinese, which effectively forces a specific language for users of the skill. The policy allows language constraints only when the skill offers user choice or clearly documents a justified locale restriction, neither of which appears here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The reference documents destructive operations such as deleting rows, columns, and worksheets without any warning, confirmation guidance, or guardrails around irreversible data loss. In an agent skill context, this increases the chance that an automated workflow could execute destructive actions from ambiguous or mistaken user prompts, causing loss or corruption of spreadsheet data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.