subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # 使用OpenClaw的web_fetch工具获取内容 import subprocess result = subprocess.run([ sys.executable, "-c", f"import requests; import feedparser; \ feed = feedparser.parse('{source_url}'); \- Confidence
- 94% confidence
- Finding
- The skill spawns a Python subprocess and builds the code to execute via an f-string that interpolates source_url directly into a python -c command. While the current URLs are hardcoded, this pattern is dangerous because any future config change or user-controlled source value could break out of the string literal and trigger arbitrary code execution; using a subprocess here is also unnecessary for RSS fetching.
