Back to skill

Security audit

openclaw自动化配置飞书,几乎不要人手动干预,测试成功

Security checks for vulnerabilities and agentic risk

Overview

This Feishu integration skill is mostly purpose-aligned, but it can write generated code that exposes credentials and produces insecure webhook examples.

Install only after reviewing or patching the generated-code behavior. Do not provide real Feishu secrets to this skill unless generated files are guaranteed not to store them, rotate any secrets that may have been written into solution files, verify webhook authentication before deployment, and limit Feishu app scopes to the exact operations needed.

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/solve_feishu_integration.py:346
Finding

User-supplied Feishu credentials are embedded in generated source files

Content
View full analysis
str: os.makedirs(self.solutions_dir, exist_ok=True) language = solution['language'] problem_type = solution['problem_type'] solution_id = f"{language}_{problem_type}_{len(os.listdir(self.solutions_dir)) + 1}" solution_path = os.path.join(self.solutions_dir, f"{solution_id}.{language}") if solution['source'] == 'official': code = self._generate_official_implementation(solution, config) elif solution['source'] == 'community': code = self._generate_community_implementation(solution, config) else: code = self._generate_manual_implementation(solution, config) with open(solution_path, 'w', encoding='utf-8') as f: f.write(code) return solution_path def _generate_official_implementation(self, solution: Dict[str, Any], config: Dict[str, Any]) -> str: template = solution['solution']['code_template'] code = template for key, value in config.items(): placeholder = f"your_{key}" code = code.replace(placeholder, str(value)) return code ``` The official authentication template contains credential placeholders such as: ```python config = Config.new_config_with_memory_store( DOMAIN_FEISHU, app_id="your_app_id", app_secret="your_app_secret" ) ``` ### Technical Analysis The implementation directly substitutes every value supplied through `config` into generated source code. When `app_id` and `app_secret` are provided, the placeholders in the authentication template are replaced with their actual values. The resulting source file is then written to the workspace under the `solutions` directory. This stores authentication secrets in plaintext source code rat ...[truncated 1809 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/solve_feishu_integration.py:442
Finding

Generated webhook handler disables signature verification and logs untrusted event bodies

Content
View full analysis
bool: """Verify webhook signature""" message = f"{timestamp}\n{nonce}\n{body}" signature = hmac.new( secret.encode('utf-8'), message.encode('utf-8'), hashlib.sha256 ).hexdigest() return signature == request.headers.get('X-Lark-Signature') ``` ### Technical Analysis The generated webhook endpoint reads attacker-controlled request headers and bodies but does not enforce signature verification. The only call to `verify_signature` is commented out, so any client capable of reaching the endpoint can submit an event that the handler treats as legitimate. The handler also prints the complete parsed event body. Feishu events may contain message text, user identifiers, document references, chat metadata, or other tenant information. Printing complete event objects can therefore disclose sensitive content through console logs, centralized log collectors, or deployment diagnostics. Even if the commented verification call were enabled without further changes, the helper u ...[truncated 1774 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (31)

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

md
## Capabilities

- **Authentication & Authorization**: Handles app_id/app_secret setup, tenant access tokens, user access tokens, and bot access tokens
- **Message Handling**: Supports text, rich text, cards, and file messages with proper formatting
- **Event Processing**: Webhook event handling with signature verification and proper response format
- **API Integration**: Comprehensive support for Feishu's service APIs including docs, drive, wiki, calendar, etc.

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 7)May include surrounding context.

md
## Capabilities

- **Authentication & Authorization**: Handles app_id/app_secret setup, tenant access tokens, user access tokens, and bot access tokens
- **Message Handling**: Supports text, rich text, cards, and file messages with proper formatting
- **Event Processing**: Webhook event handling with signature verification and proper response format
- **API Integration**: Comprehensive support for Feishu's service APIs including docs, drive, wiki, calendar, etc.

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 35)May include surrounding context.

md
## Capabilities

- **Authentication & Authorization**: Handles app_id/app_secret setup, tenant access tokens, user access tokens, and bot access tokens
- **Message Handling**: Supports text, rich text, cards, and file messages with proper formatting
- **Event Processing**: Webhook event handling with signature verification and proper response format
- **API Integration**: Comprehensive support for Feishu's service APIs including docs, drive, wiki, calendar, etc.

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 37)May include surrounding context.

md
## Capabilities

- **Authentication & Authorization**: Handles app_id/app_secret setup, tenant access tokens, user access tokens, and bot access tokens
- **Message Handling**: Supports text, rich text, cards, and file messages with proper formatting
- **Event Processing**: Webhook event handling with signature verification and proper response format
- **API Integration**: Comprehensive support for Feishu's service APIs including docs, drive, wiki, calendar, etc.

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 · config_schema.json (reported line 26)May include surrounding context.

json
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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 · config_schema.json (reported line 30)May include surrounding context.

json
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

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

python
},
    "tenant_access_token": {
      "type": "string",
      "description": "Pre-configured tenant access token (optional, for testing)"
    },
    "user_access_token": {
      "type": "string",

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The declared OAuth/API permissions are read-only, but the enabled features advertise management operations such as drive management and permission management. This mismatch is dangerous because it obscures the true security posture, can mislead reviewers and operators, and may result in future permission expansion or alternate API usage that silently turns a nominally read-only integration into a privileged one.

Content

No source excerpt is available for this finding.

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · scripts/test_feishu_integration_solver.py (reported line 44)May include surrounding context.

python
def test_parse_problem_simple(self):
        """Test parsing simple integration problems."""
        problem = "I need to send messages to Feishu chat"
        result = self.solver.parse_problem(problem)
        self.assertIn("message", result['required_capabilities'])
        self.assertIn("chat", result['required_capabilities'])

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger condition 'when users mention Feishu integration issues' is very broad and can cause the skill to activate in situations the user did not explicitly intend. Because this skill can guide or implement external-system actions, unintended invocation increases the risk of surprising side effects, over-collection of context, or execution of integration steps without sufficiently specific user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill advertises document automation, workflow integration, and permission management without prominent user-facing warnings that these actions may modify files, shares, permissions, or external systems. In a skill capable of interacting with Feishu docs, drive, wiki, and calendars, missing effect warnings can lead users to authorize impactful operations without understanding the consequences.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The configuration enables broad management-related capabilities such as drive, wiki, and permission management without any documented business need or scope limitation. Even if not all capabilities are immediately exercised, exposing unnecessary privileged features increases attack surface and creates a higher risk of misuse, privilege creep, or unintended future access paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script writes generated code directly into the workspace without prompting the user, previewing diffs, or requiring confirmation. In an agent skill context, silent file creation can overwrite expectations, introduce risky code into repositories, and make users unknowingly run code that handles credentials or network access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The generated template performs network authentication calls using app credentials but does not embed any warning that it will transmit secrets to an external service or require secure secret handling. In this skill context, generated code may be copied and executed by users who assume it is safe and validated, making the omission more dangerous.

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

python
if not self.tenant_access_token:
            url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal/"
            payload = {"app_id": self.app_id, "app_secret": self.app_secret}
            response = requests.post(url, json=payload)
            response.raise_for_status()
            data = response.json()
            if data.get("code") == 0:

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function advertises testing and validation but always returns a simulated success result unless the output file is missing. This can cause users or downstream automation to trust generated integration code that was never actually validated, increasing the chance of deploying broken or insecure code paths.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · README.md (reported line 179)May include surrounding context.

md
- `tests/`: Test cases (if applicable)
- `assets/`: Additional resources (if needed)

To extend functionality:
1. Add new problem types to the solver logic
2. Implement additional language support
3. Enhance error diagnosis capabilities

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This is a manifest-style JSON file, so vague-trigger checks apply. The descriptions for app_id and app_secret say they are required for "most operations," but do not specify which operations are in or out of scope, which could cause ambiguous activation or configuration expectations.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency is specified with a lower bound only, which allows future installs to resolve to different versions over time. This weakens supply-chain reproducibility and can unintentionally introduce vulnerable or breaking upstream releases into the skill.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
# Feishu Integration Solver Skill Dependencies
lark-oapi>=1.4.8
requests>=2.31.0
python-dotenv>=1.0.0
pydantic>=2.0.0

Static analysis

No suspicious patterns detected.