Back to skill

Security audit

Feishu Sheet Reader

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims by reading Feishu sheets, but it uses local Feishu app credentials and exposes secrets through curl command arguments without clear user confirmation or scoping.

Review before installing. This skill is not clearly malicious, but it can use configured Feishu app credentials to read spreadsheet contents and should only be used with least-privileged Feishu credentials, explicit user approval for each sheet, and safer HTTP handling that does not put secrets in process arguments.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/read_feishu_sheet.py:35
Finding

Feishu Credentials Exposed Through Subprocess Command-Line Arguments

Content
View full analysis
Remediation
View remediation
`. Avoid putting authorization headers in command-line arguments; use a protected, short-lived configuration input only if the tool provides a mechanism that does not expose values through its argument vector. 4. Apply restrictive permissions to `~/.openclaw/openclaw.json`, allowing access only to the account that runs the Skill. 5. Use a dedicated Feishu application with the minimum required spreadsheet scopes and resource access. 6. Rotate the Feishu application secret if the current implementation has run in an environment where process arguments or audit records were visible to untrusted users. 7. Ensure diagnostic logs, process accounting, and monitoring systems do not retain secrets. Restrict access to any historical records that may contain command lines. 8. Add explicit HTTP timeouts, status validation, and safe error handling while refactoring the network requests. Error messages must not include credentials or authorization headers. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

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 · SKILL.md (reported line 43)May include surrounding context.

md
1. Parse spreadsheet token and sheet ID from the URL
2. Get Feishu app credentials from gateway config via `openclaw config get`
3. Obtain tenant access token via Feishu Auth API
4. Call Sheets API: `GET /open-apis/sheets/v2/spreadsheets/{token}/values/{range}`
5. Format and return the data

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

This code obtains app credentials and exchanges them for a tenant access token, enabling authenticated access to Feishu tenant resources. In a skill execution environment, automatic token minting from locally available secrets is dangerous because it can turn simple script execution into unauthorized data access across organizational resources.

Content

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

python
return os.environ.get("FEISHU_APP_ID", ""), os.environ.get("FEISHU_APP_SECRET", "")

def get_access_token(app_id, app_secret):
    """Get tenant access token from Feishu."""
    cmd = [
        "curl", "-s", "-X", "POST",
        "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

At this point the script actively retrieves and uses an access token to query spreadsheet metadata and contents, which confirms the credential-access path is operational rather than incidental. Because the skill is specifically designed to read Feishu sheet data, the context makes the credential use more sensitive: successful execution can disclose tenant spreadsheet contents with minimal visibility to the user.

Content

Scanner excerpt · scripts/read_feishu_sheet.py (reported line 104)May include surrounding context.

python
access_token = get_access_token(app_id, app_secret)
    if not access_token:
        print("Error: Failed to get access token.")
        sys.exit(1)

    # If no sheet_id, get meta to find the first sheet

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly describes retrieving Feishu app credentials from local gateway configuration and sending user-requested spreadsheet data to Feishu APIs, but it does not warn the user that external network access and credential-backed data retrieval will occur. This creates a transparency and consent problem: users may share a sheet link expecting local analysis, while the skill actually uses privileged app credentials to access remote content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script silently reads Feishu credentials from a local config file or environment and uses them to access tenant data without any user consent, warning, or scope restriction. In an agent-skill context, this is sensitive because running the skill can implicitly leverage stored organization credentials to access remote data the user may not realize is being exposed.

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/read_feishu_sheet.py (reported line 40)May include surrounding context.

python
"-H", "Content-Type: application/json",
        "-d", json.dumps({"app_id": app_id, "app_secret": app_secret})
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    data = json.loads(result.stdout)
    return data.get("tenant_access_token", "")

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/read_feishu_sheet.py (reported line 61)May include surrounding context.

python
"-H", "Content-Type: application/json",
        "-d", json.dumps({"app_id": app_id, "app_secret": app_secret})
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    data = json.loads(result.stdout)
    return data.get("tenant_access_token", "")

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/read_feishu_sheet.py (reported line 77)May include surrounding context.

python
"-H", "Content-Type: application/json",
        "-d", json.dumps({"app_id": app_id, "app_secret": app_secret})
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    data = json.loads(result.stdout)
    return data.get("tenant_access_token", "")