T08 · Insecure Dependencies
- Location
oil_price_monitor.py:18- Finding
Unsafe sibling-module resolution permits local dependency confusion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its oil-price monitoring purpose, but unsafe adjacent Python imports and an unnecessary subprocess stub make it worth manual Review before installing.
Review before installing. Only run it in an environment where the skills directory is not writable by less-trusted code, verify the chinese-workdays dependency, pin or lock Python dependencies, and consider removing the subprocess search stub. Also confirm that stdout announcements are the intended Feishu delivery path and that you are comfortable with Chinese-only output and scheduled NDRC web requests.
oil_price_monitor.py:18Unsafe sibling-module resolution permits local dependency confusion
oil_price_monitor.py:197Unvalidated remote content is forwarded into trusted Markdown notifications
The documented behavior does not match the detected implementation: the skill omits the claimed Feishu push path, performs undeclared local file storage, and includes undeclared subprocess-based future-window logic. This is dangerous because hidden persistence and shell-adjacent behavior expand the attack surface and can conceal functionality that users did not authorize or expect.
This markdown file is written entirely in Chinese, including operational instructions and warnings, with no indication that the skill is region-specific or that users may choose another language. The policy allows locale constraints when clearly documented and justified, but this file does not state such a justification within the document.
The skill description, usage examples, and output samples are entirely in Chinese, indicating the skill is intended to operate in a fixed language/locale. The file does not mention any option for users to choose another language or explicitly opt into Chinese-only behavior, which matches the policy's language/locale violation criterion.
The skill advertises networked monitoring behavior but declares no explicit tool scope or permissions despite detected capabilities for file access, network, and shell. This weakens least-privilege controls and makes it harder for reviewers or runtimes to constrain what the skill can actually do if the implementation is modified or abused.
The script's docstring, status messages, and output are consistently hard-coded in Chinese, with no option for users to select another language or locale. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in or documented justification.
The manifest describes monitoring the NDRC website for oil price adjustment announcements, which does not inherently require launching child processes. This code invokes a separate Python interpreter via subprocess as part of a search strategy for next-year holiday notices, expanding capability beyond straightforward web monitoring.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
try:
# 调用 multi-search-engine (通过 subprocess)
result = subprocess.run(
["python3", "-c", f"""
import subprocess, json, sys
# 模拟调用 search_utils (实际需要正确导入)
The manifest says the skill 'pushes notifications via Feishu', which is a key part of the advertised behavior. In the implementation, the main run path only fetches news, detects price changes, and prints formatted output; there is no Feishu API call, webhook invocation, or messaging integration anywhere in the file.
This markdown file describes an external notification behavior ('pushes notifications via Feishu') but does not include any caution about transmitting fetched content outside the local environment. Under the markdown-specific SQP-2 criteria, behaviors that affect privacy or system/data flow should be disclosed with a user-facing warning.
The code creates a local data directory and writes window cache data to windows_cache.json, but there is no user-facing notice in the main execution flow that running the script will modify local files. For code files, file writes should have some visible disclosure unless already clearly documented or inherent to the stated purpose; this script's top-level description focuses on monitoring and pushing updates, not local persistence.
The manifest focuses on checking the NDRC site every 10 working days and pushing announcement notifications. The implementation also predicts and caches the next year's adjustment windows by searching for State Council holiday notices or calculating future schedules, which is broader than simple announcement monitoring.
The dependency is specified with a lower bound only, which allows future installs to resolve to different versions over time. This weakens reproducibility and can unintentionally introduce vulnerable or breaking releases into the skill, especially in an automated monitoring workflow that may be redeployed without review.
requests>=2.28.0
beautifulsoup4>=4.11.0
lxml>=4.9.0
The manifest does not pin requests, and the package has multiple published advisories across versions. That means the deployed environment could resolve to a vulnerable release without any way to verify from this file alone, which is a genuine supply-chain risk even if the exact affected version is unknown.
Using an unpinned beautifulsoup4 version means builds are not deterministic and later installs may pull in unexpected package changes. While this is not directly exploitable by itself, it increases supply-chain risk and makes it harder to ensure that only reviewed versions are deployed.
requests>=2.28.0
beautifulsoup4>=4.11.0
lxml>=4.9.0
The lxml dependency is not pinned, so installations may resolve to different versions with different security properties. Because lxml is a parser library with a history of security advisories, leaving it floating increases the chance of pulling an unsafe version into production.
requests>=2.28.0
beautifulsoup4>=4.11.0
lxml>=4.9.0
lxml has known historical advisories, and because the requirement is not pinned, there is no assurance that installations will avoid affected versions. In a skill that fetches and parses remote web content, parser library risk is somewhat more relevant because malformed input may be attacker-controlled or externally influenced.