Tp4
High
- Category
- MCP Tool Poisoning
- Confidence
- 97% confidence
- Finding
- 声明描述的是面向家长和学生学习管理场景的用户功能,但实际代码并未实现任何学习计划、学习打卡、错题记录或学习报告相关逻辑。相反,这段代码仅用于项目发布前的工程校验与测试执行,属于开发/运维辅助功能,主目的与声明明显不一致。虽然这可能是仓库中的辅助脚本,但就所给代码片段本身而言,其行为与技能声明存在明显描述-行为不匹配。
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed local study-tracking tool that stores study data on the user's machine and does not show evidence of hidden network access, exfiltration, or unsafe persistence.
Install only if you are comfortable storing a child's study profile, learning logs, wrong-question entries, and reports as local JSON files. Use STUDY_BUDDY_HOME for an isolated directory on shared machines, and delete the local data directory when you no longer want the records retained.
---
name: study-buddy
description: 初高中学生家长的学习陪伴助手,帮助家长为孩子制定学习计划、追踪学习进度、管理错题本、生成学习报告。适用于家长辅导孩子学习、监督学习进度、记录学习成果。触发词包括"帮我制定学习计划"、"孩子学习打卡"、"查看学习进度"、"记录错题"、"生成学习报告"。
version: 1.2.0
author: jianghaidong
runtime:
permissions:
filesystem: true
requires:
python: ">=3.8"
---
# Study Buddy - 初高中学生家长学习陪伴助手
专为初高中学生家长设计的智能学习陪伴�dy.py wrong add "二次函数求根错误" --subject "数学"
python3 scripts/study-buddy.py report
数据存储:~/.study-buddy/(可用 STUDY_BUDDY_HOME 覆盖)
""")
def cmd_start():
"""开始学习之旅 - 交互式收集学习背景(家长视角)"""
print("🎯 欢迎使用 Study Buddy - 初高中学生家长学习陪伴助手!")
print("=" * 50)
print("\n👨👩👧 本工具帮助家长科学管理孩子的学习过程")
print(" 让我们一起为孩子建立学习档案...")
profile = load_profile()
if profile:
print(f"\n📋 发现已有学习档案:{profile.get('student_name', '孩子')} - {profile.get('subject', '未设置')}")
overwrite = input("是否重新设置?(y/N): ").strip().lower()
if overwrite != 'y':
print("保持现有设置。使用 /study-buddy today 查看今日任务。")
return
print("\n请回答以下问题,为孩子创建学习档案:def run_command(cmd):
"""运行命令并返回结果"""
try:
result = subprocess.run(
cmd,
shell=True,
capture_output=True,shell=True,
capture_output=True,
text=True,
env=os.environ.copy(),
timeout=5
)
return result.returncode == 0, result.stdout, result.stderrdef save_profile(profile):
"""保存用户档案"""
with open(PROFILE_FILE, 'w', encoding='utf-8') as f:
json.dump(profile, f, ensure_ascii=False, indent=2)# 保存计划
plan_file = PLANS_DIR / f"plan_{datetime.now().strftime('%Y%m%d')}.json"
with open(plan_file, 'w', encoding='utf-8') as f:
json.dump(plan, f, ensure_ascii=False, indent=2)
print(f"\n📋 {profile.get('student_name', '孩子')}的{profile['subject']}学习计划已生成!")existing = [existing, log_entry]
log_entry = existing
with open(log_file, 'w', encoding='utf-8') as f:
json.dump(log_entry, f, ensure_ascii=False, indent=2)
print("✅ 打卡成功!")}
report_file = DATA_DIR / f"report_{datetime.now().strftime('%Y%m%d')}.json"
with open(report_file, 'w', encoding='utf-8') as f:
json.dump(report_data, f, ensure_ascii=False, indent=2)
print(f"\n✅ 报告已保存: {report_file}")wrong_list.append(wrong_entry)
with open(wrong_file, 'w', encoding='utf-8') as f:
json.dump(wrong_list, f, ensure_ascii=False, indent=2)
print("✅ 错题已记录")break
if found:
with open(wrong_file, 'w', encoding='utf-8') as f:
json.dump(wrong_list, f, ensure_ascii=False, indent=2)
else:
print("⚠️ 未找到该错题")break
if found:
with open(wrong_file, 'w', encoding='utf-8') as f:
json.dump(wrong_list, f, ensure_ascii=False, indent=2)
else:
print("⚠️ 未找到该错题")def run(cmd):
result = subprocess.run(cmd, cwd=ROOT, text=True, capture_output=True)
if result.returncode != 0:
print(result.stdout)
print(result.stderr, file=sys.stderr)def run_command(cmd):
"""运行命令并返回结果"""
try:
result = subprocess.run(
cmd,
shell=True,
capture_output=True,No suspicious patterns detected.