Back to skill

Security audit

Oil Price Monitor

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
oil_price_monitor.py:18
Finding

Unsafe sibling-module resolution permits local dependency confusion

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
oil_price_monitor.py:197
Finding

Unvalidated remote content is forwarded into trusted Markdown notifications

Content
View full analysis
Optional[Dict]: """检测新闻中是否包含价格调整信息""" for item in news: text = item['title'] + ' ' + item.get('content', '') keyword_hits = [kw for kw in KEYWORDS if kw in text] if not keyword_hits: continue increase = any(w in text for w in ['上调', '上涨', '提高', '增加']) decrease = any(w in text for w in ['下调', '降低', '下降', '减少']) amount_patterns = [ r'每吨[上调|下调|上涨|降低]+\s*(\d+)\s*元', r'[汽油|柴油].*?(\d{2,3})\s*元', r'调整.*?(\d{2,3})\s*元/吨' ] amount = None for pattern in amount_patterns: match = re.search(pattern, text) if match: amount = int(match.group(1)) break return { 'title': item['title'], 'date': item['date'], 'url': item['url'], 'increase': increase, 'decrease': decrease, 'amount': amount, 'raw_text': text[:300], 'keywords': keyword_hits } return None ``` Unescaped Markdown ou ...[truncated 2677 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · oil_price_monitor.py (reported line 323)May include surrounding context.

python
try:
            # 调用 multi-search-engine (通过 subprocess)
            result = subprocess.run(
                ["python3", "-c", f"""
import subprocess, json, sys
# 模拟调用 search_utils (实际需要正确导入)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

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.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0
beautifulsoup4>=4.11.0
lxml>=4.9.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

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.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests>=2.28.0
beautifulsoup4>=4.11.0
lxml>=4.9.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

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.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
requests>=2.28.0
beautifulsoup4>=4.11.0
lxml>=4.9.0

Unverifiable Dependency: lxml has 14 known advisory(ies) (CVE-2021-43818 (lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through); CVE-2014-3146 (lxml Cross-site Scripting Via Control Characters); CVE-2021-28957 (lxml vulnerable to Cross-Site Scripting ) +11 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.