Trusted — Risk Score 10/100
Last scan:8 hr ago Rescan
10 /100
Facebook Publisher Skill
Facebook Graph API 工作流工具,用于自动化发布页面帖子和管理令牌
合法的 Facebook Graph API 发布工具,代码功能与文档声明一致,无恶意行为。存在轻微文件写入风险但有合理解释。
Skill NameFacebook Publisher Skill
Duration56.0s
Enginepi
Safe to install
建议将 fb_tokens_output.json 添加到 .gitignore 确保不泄露令牌文件。

Findings 2 items

Severity Finding Location
Low
文件写入行为未在文档中声明 Doc Mismatch
fb_token_helper.py 在获取令牌后会写入 fb_tokens_output.json 文件,但 SKILL.md 未提及此行为
with open(output_path, "w", encoding="utf-8") as f:
    json.dump({...}, f, ensure_ascii=False, indent=2)
→ 在 SKILL.md 中补充说明令牌会写入本地 JSON 文件,并提示用户添加到 .gitignore
agents/fb_token_helper.py:134
Low
加载多个 API 密钥环境变量 Sensitive Access
config.py 加载 OPENAI_API_KEY、APIFY_API_TOKEN、FB_* 等多个凭证变量,但代码仅用于各自 API 调用,无外传行为
OPENAI_API_KEY: str = os.getenv("OPENAI_API_KEY", "")
→ 确认仅授权的 AI Agent 环境需要这些变量,按需分配
config.py:1
ResourceDeclaredInferredStatusEvidence
Filesystem NONE WRITE ✓ Aligned agents/fb_token_helper.py:134
Network READ READ ✓ Aligned 仅调用 Facebook Graph API
3 findings
🔗
Medium External URL 外部 URL
https://www.facebook.com/
agents/fb_publisher_agent.py:107
🔗
Medium External URL 外部 URL
https://developers.facebook.com/tools/explorer[/link
agents/fb_token_helper.py:81
🔗
Medium External URL 外部 URL
https://graph.facebook.com/
config.py:27

File Tree

5 files · 21.6 KB · 587 lines
Python 4f · 481L Markdown 1f · 106L
├─ 📁 agents
│ ├─ 🐍 fb_publisher_agent.py Python 180L · 8.3 KB
│ └─ 🔑 fb_token_helper.py Python 150L · 5.1 KB
├─ 🐍 config.py Python 51L · 2.2 KB
├─ 📝 SKILL.md Markdown 106L · 2.7 KB
└─ 🐍 test_fb_connection.py Python 100L · 3.3 KB

Dependencies 3 items

PackageVersionSourceKnown VulnsNotes
requests * pip No 无版本锁定但为标准库
python-dotenv * pip No 无版本锁定
rich * pip No 无版本锁定

Security Positives

✓ 代码结构清晰,注释完整(越南语注释辅助理解)
✓ 仅调用 Facebook Graph API (graph.facebook.com),无其他外部网络请求
✓ 实现了重试机制和指数退避,符合生产环境最佳实践
✓ 无 shell 执行、无 base64 编码、无混淆代码
✓ 凭证仅用于内存中构造 API 请求,无外传行为
✓ SKILL.md 权限声明准确,与实际代码行为一致