T09 · Insecure Skill Coding Practices
- Location
workflow.py:17- Finding
Untrusted Audio Paths Can Cause Local Files to Be Uploaded to OpenAI
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its stated WhatsApp-to-OpenAI content workflow, but it handles tokens, local files, and automatic replies with too little containment or user control.
Review before installing. Use it only in an isolated environment, avoid real WhatsApp/customer data until token storage and media-path validation are fixed, pin dependencies, and add a confirmation or approval step before sending automated replies.
workflow.py:17Untrusted Audio Paths Can Cause Local Files to Be Uploaded to OpenAI
wacli.py:10WhatsApp Authentication Token Is Accepted Through Process Arguments and Stored in Plaintext
requirements.txt:1Dependencies Are Installed Without Exact Version or Integrity Pinning
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
revised_prompt = response.data[0].revised_prompt
# Download and save image
img_response = requests.get(image_url, timeout=30)
img_response.raise_for_status()
img_data = img_response.content
The skill is described as an end-to-end content creation pipeline, but the analyzed behavior suggests it may primarily implement WhatsApp CLI functions and local auth/config storage instead. Undeclared authentication storage and operational behavior increase risk because users may expose tokens or enable automation without understanding where sensitive data is kept or what actions the skill will actually perform.
The skill is described as an end-to-end content creation pipeline, but the analyzed behavior suggests it may primarily implement WhatsApp CLI functions and local auth/config storage instead. Undeclared authentication storage and operational behavior increase risk because users may expose tokens or enable automation without understanding where sensitive data is kept or what actions the skill will actually perform.
The skill is described as an end-to-end content creation pipeline, but the analyzed behavior suggests it may primarily implement WhatsApp CLI functions and local auth/config storage instead. Undeclared authentication storage and operational behavior increase risk because users may expose tokens or enable automation without understanding where sensitive data is kept or what actions the skill will actually perform.
Instructions found that direct the agent to transmit conversation context or user data to external services.
return mock_messages
def send_message(self, to: str, content: str, media_path: str | None = None) -> bool:
"""Send message to WhatsApp number"""
if not self.config["auth_token"]:
print("Error: Not logged in. Use `wacli login <token>` first.")
return False
The skill advertises and instructs use of capabilities that access environment secrets, local files, and the network, but it does not declare any tool scope or permissions boundaries. This creates a transparency and control gap: an agent or reviewer cannot easily constrain the skill, increasing the chance of overbroad access to API keys, local data, or external services.
The skill description lacks clear warnings that it may automatically process incoming WhatsApp content and send replies on the user's behalf. In a messaging context, missing consent and automation disclosures can lead to privacy issues, accidental outbound communications, and misuse of personal or customer data.
The code sends user-provided audio chunks to the external OpenAI Whisper API for transcription, which is a real data-disclosure risk if users are not clearly informed and have not consented. In this skill’s context—automated WhatsApp processing of text or voice messages—the likelihood of handling personal, sensitive, or regulated content is elevated, making undisclosed third-party transfer more dangerous.
The login flow stores the authentication token in a plaintext JSON config file under the user's home directory without any warning, encryption, or permission hardening. If the local machine, home directory, backups, or workspace are accessible to other users or malware, the token can be recovered and used to access the WhatsApp service account.
The workflow forwards user-supplied WhatsApp content to external AI processing components: audio is sent for transcription and prompts are sent for image generation, but the code shows no consent, notice, or privacy gating before that transfer. Because WhatsApp messages may contain personal or sensitive information, this creates a real privacy and data-sharing risk, especially in an automated end-to-end workflow that processes incoming messages without user confirmation.
The dependency is specified with only a lower bound, which allows future unreviewed versions to be installed and makes builds non-reproducible. In a workflow that processes external WhatsApp content and calls third-party APIs, this increases supply-chain risk and makes it harder to ensure deployed environments are not exposed to newly introduced vulnerable or breaking releases.
openai>=1.0.0
pydub>=0.25.1
requests>=2.31.0
python-dotenv>=1.0.0
Using an unpinned pydub version permits installation of arbitrary newer releases, reducing reproducibility and increasing exposure to supply-chain or compatibility issues. Because this skill handles audio transcription inputs, unexpected dependency changes in media-processing libraries could affect parsing behavior or introduce exploitable flaws from upstream.
openai>=1.0.0
pydub>=0.25.1
requests>=2.31.0
python-dotenv>=1.0.0
The requests dependency is unpinned, so environments may resolve to different versions, including versions affected by known advisories. Since this skill likely makes outbound HTTP requests as part of automated messaging and API workflows, a vulnerable or behavior-changing requests release could expose credentials, alter TLS behavior, or otherwise increase remote attack surface.
openai>=1.0.0
pydub>=0.25.1
requests>=2.31.0
python-dotenv>=1.0.0
The manifest does not pin requests, and that package has multiple known advisories across versions, so it is impossible to verify from this file whether the deployed version is safe. This is more concerning in this skill because network communication is central to its operation, increasing the chance that any requests-related flaw could be exercised through remote interaction or credential-bearing API calls.
An unpinned python-dotenv package allows uncontrolled version drift and complicates assurance that only reviewed releases are installed. In a skill that likely relies on environment-based secrets for API keys and messaging credentials, dependency instability in dotenv handling can increase configuration and supply-chain risk.
openai>=1.0.0
pydub>=0.25.1
requests>=2.31.0
python-dotenv>=1.0.0
Because python-dotenv is not pinned and has known advisories in some versions, the file does not provide enough assurance that the installed release is not vulnerable. Given this skill likely loads secrets from environment files, weaknesses in dotenv handling could affect confidentiality or integrity of configuration if unsafe versions are installed or local file handling is exposed.