T09 · Insecure Skill Coding Practices
- Location
scripts/send-voice.mjs:20- Finding
Feishu app secret exposed through command-line arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The voice-message skill mostly matches its stated Feishu purpose, but it needs Review because it includes underdeclared video-sending capability and unsafe app-secret handling examples.
Install only after reviewing whether you want this package to support video as well as audio. Use least-privilege Feishu app scopes, avoid passing app secrets as command-line arguments, prefer a secret manager or carefully controlled environment variables, and treat any selected media file as uploaded to Feishu/Lark. If you only need voice messages, remove or ignore the video script and documentation before use.
scripts/send-voice.mjs:20Feishu app secret exposed through command-line arguments
scripts/send-video.mjs:169Temporary video covers and segments are not reliably deleted after failures
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Endpoint | Description |
|----------|-------------|
| `/auth/v3/tenant_access_token/internal` | Get access token |
| `/im/v1/files` | Upload audio file |
| `/im/v1/messages` | Send voice message |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## API Details
### 1. Get Tenant Access Token
```
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
```
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## API Details
### 1. Get Tenant Access Token
```
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
```
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## API Details
### 1. Get Tenant Access Token
```
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
```
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## API Details
### 1. Get Tenant Access Token
```
POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
```
The file implements video-message sending even though the skill is described and scoped as an audio/voice messaging skill. This capability mismatch is dangerous because it expands the skill's effective permissions and data-handling behavior beyond what a reviewer or user would reasonably expect, enabling covert or unauthorized media exfiltration under misleading packaging.
The manifest states the skill is for sending voice/audio messages to Feishu users, and the README repeatedly frames the skill as voice-message focused. However, the documented commands include a separate send-video.mjs flow for sending video messages, which expands the behavior beyond the declared audio-only scope.
The skill documentation instructs users to upload and send audio/video content to Feishu APIs but does not clearly warn that user-provided media will leave the local environment and be transmitted to a third-party service. In an agent setting, this can cause accidental disclosure of sensitive recordings or videos if the user does not realize external transfer occurs.
The skill documents use of environment variables and outbound network calls to Feishu APIs, but it does not declare any explicit tool scope or permissions boundaries. This increases the chance that an agent or user invokes the skill without clear awareness that secrets will be read from the environment and data will be transmitted externally.
The skill instructs users to provide Feishu app credentials and upload audio content to Feishu, but it does not warn that credentials and user audio will leave the local environment and be sent to a third-party service. This can lead to accidental disclosure of sensitive voice content or misuse of app secrets by users who do not realize the privacy implications.
The segmentation, cover extraction, upload, and send workflow introduces substantial video-processing capability that is unjustified for an audio-only skill. Even if the code uses legitimate Feishu APIs, the hidden expansion of media handling increases attack surface and creates a trust-boundary violation between declared purpose and actual behavior.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
formData.append('image_type', 'message');
formData.append('image', new Blob([coverBuffer]), 'cover.jpg');
const response = await fetch('https://open.feishu.cn/open-apis/im/v1/images', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// Get Tenant Access Token
async function getTenantAccessToken() {
const response = await fetch('https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal', {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=utf-8'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
// Get Tenant Access Token
async function getTenantAccessToken() {
const response = await fetch('https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal', {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=utf-8'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
formData.append('duration', DURATION_MS.toString());
formData.append('file', new Blob([audioBuffer]), fileName);
const response = await fetch('https://open.feishu.cn/open-apis/im/v1/files', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
formData.append('duration', DURATION_MS.toString());
formData.append('file', new Blob([audioBuffer]), fileName);
const response = await fetch('https://open.feishu.cn/open-apis/im/v1/files', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`
The documentation's API endpoint section lists only token retrieval, file upload for audio, and message sending for voice messages, reinforcing an audio-only purpose. Elsewhere, the same README documents video-message sending, indicating the skill behavior exceeds the stated audio-message scope.
The file includes user-facing example output entirely in Chinese, which can indicate a fixed language/locale assumption. The skill does not state that Chinese output is optional, configurable, or required for a region-specific use case.