Back to skill

Security audit

Lead Processor

Security checks for vulnerabilities and agentic risk

Overview

This lead-processing skill does what it claims, but it ships live-looking Feishu credentials and automatically writes business data to a specific Feishu table and group chat.

Review carefully before installing. Use only with your own Feishu tenant, rotate the exposed app secret, remove embedded credentials, require environment or secret-manager configuration, verify the Bitable and chat IDs, and add an explicit confirmation step before updating records or posting reports to a group chat.

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

Error
Location
index.js:4
Finding

Hard-Coded Feishu Application Credentials

Content
View full analysis

Vulnerability Details

File Location:

  • index.js:4-5
  • config.json:2-5
  • lead-processor/index.js:4-5
  • lead-processor/config.json:2-5

Vulnerability Type: Hard-coded application secret and plaintext sensitive configuration
Risk Level: High

Vulnerable Code

index.js:4-5 and lead-processor/index.js:4-5:

javascript
const FEISHU_APP_ID = process.env.FEISHU_APP_ID || 'cli_a9140ac9cab85bd3';
const FEISHU_APP_SECRET = process.env.FEISHU_APP_SECRET || 'qlySTZmzM567o4TnZDrvOdVNXMqIwaD0';

config.json:2-5 and lead-processor/config.json:2-5:

json
"feishu": {
  "app_id": "cli_a9140ac9cab85bd3",
  "app_secret": "qlySTZmzM567o4TnZDrvOdVNXMqIwaD0"
}

The credentials are used to request a Feishu tenant access token in index.js:14-17 and the duplicated implementation:

javascript
const postData = JSON.stringify({
  app_id: FEISHU_APP_ID,
  app_secret: FEISHU_APP_SECRET
});

Technical Analysis

A Feishu application ID and application secret are stored directly in source code and plaintext configuration. The source implementation uses environment variables only when they are available; otherwise, it silently falls back to the embedded credentials. Consequently, environment-variable support does not eliminate the exposure.

Anyone able to obtain the package, repository contents, an archive, or retained source history can recover the secret without needing access to the deployment environment. The application submits these credentials to Feishu's tenant access-token endpoint. The resulting bearer token is subsequently used by the code to read Bitable records, update Bitable records, and send chat messages.

The duplicated root and lead-processor/ implementations increase the number of locations from which the secret must be removed. Deleting only one copy would leave the credentials exposed elsewhere in the package.

Attack Path

  1. An attacker downlo ...[truncated 1517 chars]
Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed Feishu application secret. Treat it as compromised because it has been distributed in plaintext.

  2. Remove the application secret from:

    • index.js
    • config.json
    • lead-processor/index.js
    • lead-processor/config.json
    • Repository history, release archives, caches, and previously published packages.
  3. Require credentials to be supplied through an approved secret manager or deployment-time environment injection. Do not provide a hard-coded fallback:

    javascript
    const FEISHU_APP_ID = process.env.FEISHU_APP_ID;
    const FEISHU_APP_SECRET = process.env.FEISHU_APP_SECRET;
    
    if (!FEISHU_APP_ID || !FEISHU_APP_SECRET) {
      throw new Error('Required Feishu credentials are not configured');
    }
    
  4. Keep only non-sensitive configuration in version-controlled JSON files. If local configuration is necessary, provide a placeholder template and exclude the populated file through .gitignore and packaging rules.

  5. Review the Feishu application's assigned scopes and reduce them to the minimum required for the intended Bitable and messaging operations.

  6. Audit Feishu authentication and API activity for use of the exposed credentials, including unexpected token requests, record changes, and messages.

  7. Add automated secret scanning to commit hooks, continuous integration, release pipelines, and Skill publication workflows.

  8. Consolidate the duplicated implementation so that security fixes and credential removal cannot be missed in one copy.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (15)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code embeds fallback Feishu app credentials directly in source and uses them to request a tenant access token from an external API. Hardcoded secrets are highly likely to be exposed through source distribution, logs, or reuse across deployments, enabling unauthorized access to Feishu resources tied to that app.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is configured to write analysis results into a Feishu table and send reports to a named group chat, but it does not clearly warn the user that their data and generated conclusions will be transmitted to external collaboration systems. This creates a meaningful risk of unintended data disclosure, especially because lead-enrichment outputs may contain sensitive business intelligence, contact details, or misclassified customer information shared beyond the immediate operator.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill imposes rigid conversational constraints such as forbidding common acknowledgment phrases and intermediate questions, effectively forcing a specific language/interaction style without user opt-in. While not directly data-exfiltrative, this can suppress clarifying dialogue, increase operator confusion, and interfere with safe confirmation behavior before external actions are taken.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function issues a PUT request that modifies Bitable records on a remote system, which is a data-changing operation. The code contains no confirmation prompt, logging, or explanatory comment/docstring indicating that user or business data will be updated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This function sends text content to a Feishu chat via an external HTTP API, which transmits user-provided data off-system. There is no confirmation, user-visible logging, or explanatory comment/docstring disclosing that chat messages will be sent to a remote recipient.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The analysis function returns only Chinese-language output strings for company type and recommended actions. This imposes a specific language/locale in the skill behavior without opt-in or documented justification, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly requires platform credentials, reads customer URLs from Feishu tables, visits external websites, writes results back to the table, and sends reports to a Feishu group, but it provides no warning about data handling, outbound network access, or privacy/system impact. This is dangerous because users may authorize sensitive credentials and customer data processing without understanding that third-party data will be fetched, analyzed, stored, and redistributed through external services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The config maps output fields to Chinese labels such as "公司名", "国家/地区", and "最后更新时间", which imposes a specific language/locale in the skill's natural-language interface. There is no indication in this file that users can opt into this locale or that the skill is explicitly limited to a Chinese-language or region-specific deployment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code embeds a default Feishu app ID and app secret directly in source and automatically transmits them to Feishu to obtain tenant access tokens. Hardcoded credentials are a real secret-management vulnerability because anyone with code access can extract and misuse them to access the linked Feishu tenant, and the fallback values mean the secret may be used even when environment configuration is absent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The function issues a PUT request that modifies Bitable records, which is a data-changing operation, but the code contains no confirmation prompt, user-facing log, or explanatory comment describing that external records will be updated. This matches the missing-warning criterion for write-like operations in code files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This function sends text content to Feishu chat via an external network call, but there is no user-facing notice, comment, or docstring warning that supplied content will be transmitted to a third-party messaging platform. Network transmission of user or system data in code files should have some disclosure when none is otherwise present.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The analysis results are hard-coded in Chinese text labels and actions, which imposes a specific language on downstream users without any opt-in or justification. The policy specifically flags language or locale constraints when the skill does not offer a user choice or document why the locale is required.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill states it will visit customer websites for deep analysis using a browser tool, but it does not disclose this external browsing behavior to the user. Visiting third-party sites can expose user-driven targets, trigger unintended interactions with untrusted content, and create compliance or privacy issues if users are unaware that external network access will occur.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The config maps multiple fields to Chinese-only labels such as "公司名", "官网URL", and "国家/地区". This imposes a specific locale in natural-language configuration without any indication of user choice or documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language description and rules are presented entirely in Chinese, with no indication that users may choose another language or that the skill is intended only for a Chinese-speaking context. Under the language/locale policy, forcing a specific language without opt-in can be a policy issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.