T09 · Insecure Skill Coding Practices
- Location
tts_podcast.py:528- Finding
COS Uploads Are Explicitly Made Publicly Readable
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its text-to-speech purpose, but its optional cloud upload can make generated audio public and it may install a package at runtime without clear user warning.
Install only if you are comfortable sending text to Tencent Cloud and, if you enable COS upload, treating generated audio as potentially public. Use least-privilege Tencent credentials, avoid sensitive source text, keep upload_cos disabled unless needed, and prefer a reviewed version that removes runtime pip installation and uses private COS objects or signed URLs.
tts_podcast.py:528COS Uploads Are Explicitly Made Publicly Readable
tts_podcast.py:514Unpinned Package Installation Is Performed at Runtime
requirements.txt:1Dependency Versions Are Not Reproducibly Pinned
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"X-TC-Version": version
}
resp = requests.post(endpoint, headers=headers, data=payload.encode('utf-8'), timeout=timeout)
resp.raise_for_status()
response_data = resp.content.decode('utf-8', errors='replace')
response_json = json.loads(response_data)
The documented purpose is TTS generation, but the implementation reportedly also uploads audio to COS, may set uploaded objects to public-read, and dynamically installs external packages. These undeclared behaviors materially expand the trust boundary: generated content may be exposed publicly, credentials may be used for broader cloud actions than expected, and runtime package installation introduces supply-chain and arbitrary code execution risk.
Referenced artifact was not completely inspected
- `SKILL.md`
Installing a package at runtime via pip is an unjustified capability for a TTS generator and creates a supply-chain and arbitrary code execution risk. It also changes the host environment state without clear consent, which is especially dangerous in shared runners or enterprise agents.
The skill can upload generated audio to cloud storage and return a public URL without strong user-facing warning or confirmation. In this skill's context, that is more dangerous because podcast text may include unpublished, internal, or personal content, and publication materially changes confidentiality expectations.
The skill attempts to set uploaded objects to public-read, making generated audio internet-accessible by URL. Since the content is derived from user-provided text, this can unintentionally expose sensitive or proprietary material and is not necessary for basic TTS generation.
The skill appears to require network access, environment access, and shell capability, but the manifest does not declare any tool scope or permission boundaries. This is dangerous because users and hosting platforms cannot easily tell that the skill may access secrets, make outbound requests, or invoke shell operations, increasing the chance of over-privileged execution and abuse if the implementation is modified or compromised.
The skill requests Tencent Cloud and COS credentials and transmits user-provided text and generated audio to external cloud services, but the documentation does not clearly warn about data handling, storage location, or privacy implications. This is risky because users may provide sensitive text or production credentials without understanding that content may be uploaded, stored remotely, or exposed via returned URLs.
The skill sends user text to Tencent Cloud's external TTS API but does not provide a clear user-facing disclosure in the interface or function contract about third-party processing. In contexts where text may contain confidential, regulated, or personal information, silent transmission to an external provider creates privacy and compliance risk.
The skill includes optional COS upload and URL publication functionality that goes beyond the stated core purpose of generating podcast audio. This expands the data-handling surface and can cause user content to be persisted remotely and shared when a caller may reasonably expect only local TTS generation.
The skill executes a runtime pip install when an import fails, which gives the code package-management and code-execution capability beyond ordinary TTS behavior. In a hostile or misconfigured environment this can install unexpected code, pull from an untrusted index configuration, or fail unpredictably, turning a content-generation skill into a software modification mechanism.
except ImportError:
# Try to install
import subprocess
subprocess.check_call([sys.executable, "-m", "pip", "install", "cos-python-sdk-v5", "-q"])
from qcloud_cos import CosConfig, CosS3Client
cfg = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key)
The function exposes only Chinese voice labels and its docstring states the input text 'supports Chinese', which imposes a locale-specific experience in natural language. Because the file does not present this as an explicit user opt-in or justified region-specific constraint, it matches the language/locale policy violation criteria.
The dependency is specified with only a lower bound, which allows builds to resolve to different versions over time. This creates supply-chain and reproducibility risk because a future vulnerable or breaking release could be installed without review.
tencentcloud-sdk-python>=3.0.0
cos-python-sdk-v5>=1.8.0
requests>=2.20.0
This dependency is unpinned and may resolve to different versions depending on install time and environment. That weakens build reproducibility and can expose the skill to newly introduced vulnerable releases in the dependency chain.
tencentcloud-sdk-python>=3.0.0
cos-python-sdk-v5>=1.8.0
requests>=2.20.0
The requests dependency is unpinned, so package resolution may select versions with known security flaws or future insecure releases. Because this skill interacts with cloud services and likely performs outbound HTTP operations, dependency drift in a networking library is more security-relevant than a purely local package.
tencentcloud-sdk-python>=3.0.0
cos-python-sdk-v5>=1.8.0
requests>=2.20.0
The manifest includes requests without pinning a version, and requests has multiple published advisories affecting some releases. Since the installed version is not constrained, deployments could end up with an affected release, which is particularly concerning for a skill that communicates with external cloud endpoints and may handle credentials or sensitive URLs.
The skill writes generated audio to local disk without clearly disclosing that behavior or defining storage location/lifetime. This can leave behind residual files containing sensitive spoken content, especially on shared systems or long-lived agent hosts.