T09 · Insecure Skill Coding Practices
- Location
scripts/06_tts_ws.js:94- Finding
Cartesia API Key Exposed in WebSocket Query String
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is purpose-aligned, but it captures live microphone audio, sends content to external AI providers, and injects audio into meetings without enough privacy and credential safeguards.
Review this carefully before installing. Only use it in calls where all participants and your organization allow AI voice processing, assume microphone audio and transcripts may be sent to third-party providers, keep .env local and untracked, avoid PIPELINE_DEBUG during real conversations, and prefer providers or code paths that do not put API keys in URLs.
scripts/06_tts_ws.js:94Cartesia API Key Exposed in WebSocket Query String
scripts/03_deepgram_ws.js:69Debug Logging Exposes Microphone Transcripts and Generated Conversation Content
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// scripts/01_list_devices.js
// Lists all audio input/output devices via ffmpeg.
// Run: node scripts/01_list_devices.js
// Copy the exact VB-Cable device name into your .env as VIRTUAL_CABLE_NAME
const { execSync } = require('child_process')
const os = require('os')
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// scripts/01_list_devices.js
// Lists all audio input/output devices via ffmpeg.
// Run: node scripts/01_list_devices.js
// Copy the exact VB-Cable device name into your .env as VIRTUAL_CABLE_NAME
const { execSync } = require('child_process')
const os = require('os')
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// scripts/01_list_devices.js
// Lists all audio input/output devices via ffmpeg.
// Run: node scripts/01_list_devices.js
// Copy the exact VB-Cable device name into your .env as VIRTUAL_CABLE_NAME
const { execSync } = require('child_process')
const os = require('os')
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// scripts/01_list_devices.js
// Lists all audio input/output devices via ffmpeg.
// Run: node scripts/01_list_devices.js
// Copy the exact VB-Cable device name into your .env as VIRTUAL_CABLE_NAME
const { execSync } = require('child_process')
const os = require('os')
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// scripts/01_list_devices.js
// Lists all audio input/output devices via ffmpeg.
// Run: node scripts/01_list_devices.js
// Copy the exact VB-Cable device name into your .env as VIRTUAL_CABLE_NAME
const { execSync } = require('child_process')
const os = require('os')
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
if (!this.stopped) console.error('[pcm-writer] Write error:', e.message)
if (e.message.includes('No such') || e.message.includes('Invalid')) {
console.error(`[pcm-writer] Device "${deviceName}" not found.`)
console.error('[pcm-writer] Run node scripts/01_list_devices.js and update VIRTUAL_CABLE_NAME in .env')
}
})
The skill explicitly instructs writing required API keys into the project's .env file without any guidance on secure handling, scoping, storage, or avoiding accidental commit/exposure. In a build-oriented automation skill, this can normalize unsafe secret placement and increase the chance credentials are leaked through source control, logs, shared workspaces, or downstream tooling.
The README explicitly describes intercepting a real microphone stream, sending speech content to multiple third-party providers, and routing synthesized output into meeting applications, but it provides no clear privacy notice, consent guidance, or warning about transmitting potentially sensitive conversations off-device. In this context, users may unknowingly expose confidential audio, meeting content, or personal data to external services, making the omission a real privacy and security issue rather than a harmless documentation gap.
The documented pipeline continuously captures live microphone audio and transmits it to multiple third-party AI services, but the design includes no consent, disclosure, minimization, or trust-boundary controls. In practice, this can expose sensitive speech, bystander conversations, meeting content, and regulated data to external processors without user awareness, making the architecture materially privacy-impacting rather than a harmless implementation detail.
Routing synthesized output into Google Meet or Zoom through a virtual microphone enables impersonation-like behavior and covert audio injection into live calls if not clearly disclosed and controlled. The architecture normalizes this behavior as a pipeline component without safety interlocks, warnings, or confirmation steps, which increases the risk of misuse, confusion in meetings, and policy violations on managed systems.
The guide instructs users to stream live microphone audio to Deepgram but does not clearly disclose that spoken content is transmitted to a third-party service for processing. In a voice pipeline handling real-time mic input, this omission can cause users to unknowingly expose sensitive conversations, credentials, or regulated data.
The guide references API keys and external STT/TTS services without warning that credentials, transcript text, prompts, and synthesized audio may be sent to third-party providers. Users may assume the workflow is local because it emphasizes plain Node.js and ffmpeg, leading to unintentional disclosure of sensitive data and poor credential-handling practices.
The WebSocket URL forces language=en-US, which imposes a specific language/locale on all users. The file does not offer opt-in, configuration, or a documented region-specific reason for restricting transcription to English (US), which matches the language/locale policy violation criteria.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
const PROVIDER_URLS = {
groq: 'https://api.groq.com/openai/v1/chat/completions',
openai: 'https://api.openai.com/v1/chat/completions',
anthropic: 'https://api.anthropic.com/v1/messages',
ollama: 'http://localhost:11434/api/chat'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const PROVIDER_URLS = {
groq: 'https://api.groq.com/openai/v1/chat/completions',
openai: 'https://api.openai.com/v1/chat/completions',
anthropic: 'https://api.anthropic.com/v1/messages',
ollama: 'http://localhost:11434/api/chat'
}
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const PROVIDER_URLS = {
groq: 'https://api.groq.com/openai/v1/chat/completions',
openai: 'https://api.openai.com/v1/chat/completions',
anthropic: 'https://api.anthropic.com/v1/messages',
ollama: 'http://localhost:11434/api/chat'
}
The Cartesia WebSocket URL embeds the API key in the query string, which is commonly exposed through logs, error messages, proxy instrumentation, browser/debug tooling, and upstream connection metadata. Even though the connection uses WSS, secrets in URLs are more broadly propagated than header-based credentials, increasing the chance of credential disclosure and subsequent unauthorized API use.
The dependency uses a caret range (^16.0.0), which allows automatic installation of newer minor/patch releases instead of a single verified version. This weakens build reproducibility and can expose the project to supply-chain risk if a later allowed release is compromised or introduces a breaking security regression.
"start": "node index.js"
},
"dependencies": {
"dotenv": "^16.0.0",
"ws": "^8.0.0",
"node-fetch": "^3.0.0"
}
The ws package is specified with a caret range (^8.0.0), so different installs may resolve to different versions. For a network-facing WebSocket library, this creates uncertainty about which code is actually deployed and increases exposure to supply-chain compromise or inadvertent installation of vulnerable releases.
},
"dependencies": {
"dotenv": "^16.0.0",
"ws": "^8.0.0",
"node-fetch": "^3.0.0"
}
}
The manifest references ws without pinning an exact version, and ws has multiple published advisories, including denial-of-service and memory disclosure issues in some releases. Because the resolved installed version is unverifiable from this file alone, the project may be using an affected version while the risk remains hidden.
The node-fetch dependency is not pinned to an exact version, allowing package resolution to drift over time. This can result in inconsistent deployments and possible inclusion of a newly introduced vulnerable or malicious upstream release without explicit review.
"dependencies": {
"dotenv": "^16.0.0",
"ws": "^8.0.0",
"node-fetch": "^3.0.0"
}
}
The node-fetch package has known historical advisories, and this manifest does not pin a specific version, making it impossible to verify whether the deployed version is patched. Given that fetch libraries often handle outbound HTTP requests and headers, an affected version could enable header leakage, resource exhaustion, or other request-handling weaknesses.