T06 · System Persistence
- Location
scripts/daily_workflow.py:14- Finding
Persistent disclosure to a hard-coded Telegram recipient
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This paper-research skill is mostly coherent, but it can create recurring automation that sends generated briefings to a fixed Telegram account.
Review this skill carefully before installing. Do not run the cron command or daily_workflow.py unless you replace the Telegram ID with one you control, understand that briefings and local paths may be sent externally, and are comfortable with recurring downloads and local file creation under your user account.
scripts/daily_workflow.py:14Persistent disclosure to a hard-coded Telegram recipient
scripts/review_papers.py:20Indirect prompt injection through untrusted paper metadata
scripts/fetch_papers.py:48Remote paper identifiers are used in local paths without validation
The skill instructs automatic PDF downloads, local file generation, and Telegram delivery to a fixed recipient without prominently requiring explicit user consent at execution time. This creates a real risk of unintended data transmission and disk writes, especially in an agent environment where users may invoke the skill for research without realizing it will persist files and exfiltrate generated content to an external channel.
The file requires the abstract to be a complete Chinese translation and later states that the abstract 'must be Chinese,' while presenting the format as mandatory with no exceptions. This forces a specific language/locale without user opt-in, which matches the policy-violation category for language constraints.
The note at L380 states 'The briefing is Jarvis's creative work - not automated'. However, the rest of the document repeatedly defines an automated daily workflow that '自动完成:获取 → 下载 → 生成 → 发送' and says the script generates the briefing and sends it to Telegram. This is an active contradiction in the skill documentation about whether briefing generation is automated.
The workflow mandates extraction of a Chinese abstract and later explicitly instructs writing a Chinese translation and using Chinese section labels in the briefing. This forces a specific language/locale in the skill's instructions without user opt-in or a documented region-specific justification.
The workflow explicitly instructs the agent to send the generated briefing to Telegram, an external messaging channel, without any consent check, sensitivity review, or warning that content is leaving the local environment. Even if the briefing is intended to contain paper summaries, agent-generated content can include unexpected sensitive data from prompts, local files, or prior context, so unguarded exfiltration to third-party services is a real data-leak risk.
The natural-language description states the workflow in Chinese only and frames the skill behavior entirely in that locale, with no indication that users can opt into another language. Under the policy, forcing a specific language without user choice is a locale/language policy violation.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def fetch_papers():
"""获取论文并下载 PDF"""
log("📥 获取智能体与AI前沿研究论文...")
result = subprocess.run(
['python3', 'scripts/fetch_papers.py', '--download', '--limit', '6', '--json'],
cwd=SKILL_DIR, capture_output=True, text=True, timeout=180
)
The code constructs a subagent task by interpolating untrusted paper metadata such as title, id, and pdf_url directly into a natural-language prompt sent to another agent. If upstream paper metadata is adversarial, this creates a prompt-injection channel that can manipulate the spawned subagent into performing unintended actions or producing tainted results.
3. 评分 1-5,给出推荐
4. 回复 JSON:{{"review": {{"id": "{p['id']}", "score": 5, "contribution": "一句话", "conclusion": "一句话", "experiments": "实验设置和关键发现", "recommended": "yes"}}}}"""
subprocess.run([
'clawdbot', 'sessions', 'spawn',
'--task', task,
'--label', f"review-{p['id']}",
The code passes a file path derived from untrusted paper IDs into pdftotext without sanitizing the identifier. If an attacker can influence p['id'], they may cause the workflow to read unintended local files via path traversal or process attacker-chosen files, which is especially risky in an automated scheduled job.
pdf_path = f"{PAPERS_DIR}/{p['id']}.pdf"
text = ""
if os.path.exists(pdf_path):
result = subprocess.run(['pdftotext', pdf_path, '-'], capture_output=True, text=True, timeout=30)
text = result.stdout[:3000] if result.returncode == 0 else ""
# 提取机构
This code creates and saves a markdown briefing under PAPERS_DIR, which is a persistent file write affecting user/system data. Although there is a log after the write succeeds, there is no prior warning, confirmation, or explanatory comment disclosing that the workflow will create dated briefing files on disk.
The workflow automatically transmits generated research content to an external Telegram target without any explicit disclosure, confirmation, or content-classification checks. In a skill context, this creates data exfiltration risk if fetched papers, extracted text, or local summaries contain sensitive or proprietary information.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 使用 clawdbot CLI 发送
try:
result = subprocess.run([
'clawdbot', 'message', 'send',
'--target', TELEGRAM_ID,
'--message', message
The workflow explicitly skips subagent review but still outputs fixed scores, recommendations, and analysis-like sections as though substantive review occurred. This is dangerous because it can mislead recipients into trusting fabricated research assessments, enabling poor decisions and integrity failures in downstream workflows.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
for category in CATEGORIES:
url = f'https://export.arxiv.org/api/query?search_query=cat:{category}&start=0&max_results=30&sortBy=submittedDate&sortOrder=descending'
result = subprocess.run(['curl', '-sL', url], capture_output=True, text=True, timeout=30)
data = result.stdout
entries = re.findall(r'<entry>(.*?)</entry>', data, re.DOTALL)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
continue
try:
subprocess.run(['curl', '-sL', p['pdf_url'], '-o', str(pdf_path)], timeout=60)
if pdf_path.exists() and pdf_path.stat().st_size > 1000:
downloaded.append(str(pdf_path))
except:
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
cmd = ['pdftotext', str(pdf_path), '-']
try:
result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
if result.returncode != 0:
return {"error": f"pdftotext failed: {result.stderr}"}
The embedded task template is entirely in Chinese and directs downstream sub-agents to respond in that language and format, but the script does not offer any language choice or explain a locale-specific requirement. This creates a natural-language policy issue because it imposes a specific language on users and sub-agents by default.
No suspicious patterns detected.