Low Risk — Risk Score 20/100
Last scan:2 days ago Rescan
20 /100
agent-memory
AI Agent 记忆基础设施,实现 Context Engineering 五大核心能力
合法的 AI Agent 记忆基础设施,未发现恶意行为,但文档中存在硬编码密码示例需注意
Skill Nameagent-memory
Duration51.4s
Enginepi
Safe to install
建议移除文档中的硬编码密码示例,使用纯占位符替代;检查 export_master_key() 方法的使用场景

Findings 2 items

Severity Finding Location
Low
文档包含硬编码密码示例
references/encryption_guide.md 第157行和171行包含硬编码密码字符串 'user_password_123' 和 'optional_password' 作为示例代码
password = "user_password_123"
→ 将示例密码替换为占位符如 '<YOUR_PASSWORD>' 并添加注释说明
references/encryption_guide.md:157
Info
主密钥导出功能
CredentialManager.export_master_key() 方法允许导出主密钥,在正常使用中用于备份和迁移,但需确保调用场景授权
def export_master_key(self) -> str: return base64.b64encode(self._master_key).decode('utf-8')
→ 建议添加访问控制或日志记录
scripts/credential_manager.py:260
ResourceDeclaredInferredStatusEvidence
Filesystem WRITE WRITE ✓ Aligned SKILL.md: 仅限 ./memory_data/ 路径
Environment NONE READ ✓ Aligned scripts/credential_manager.py:134 读取 MEMORY_MASTER_KEY 环境变量
Network NONE NONE 无网络请求代码
Shell NONE NONE 无 shell 执行代码
2 High 2 findings
🔑
High API Key 疑似硬编码凭证
password = "user_password_123"
references/encryption_guide.md:157
🔑
High API Key 疑似硬编码凭证
password="optional_password"
references/encryption_guide.md:171

File Tree

68 files · 1.4 MB · 45450 lines
Python 50f · 36715L Markdown 17f · 8236L JSON 1f · 499L
├─ 📁 assets
│ └─ 📁 templates
│ └─ 📋 memory_schemas.json JSON 499L · 14.1 KB
├─ 📁 references
│ ├─ 📝 activation_mechanism.md Markdown 526L · 13.2 KB
│ ├─ 📝 agent_loops_advanced.md Markdown 548L · 17.4 KB
│ ├─ 📝 agent_loops_integration.md Markdown 540L · 13.7 KB
│ ├─ 📝 api_class_reference.md Markdown 478L · 29.5 KB
│ ├─ 📝 api_enums.md Markdown 903L · 18.5 KB
│ ├─ 📝 architecture_execution_model.md Markdown 410L · 14.3 KB
│ ├─ 📝 architecture_overview.md Markdown 672L · 35.7 KB
│ ├─ 📝 chain_reasoning_guide.md Markdown 604L · 20.9 KB
│ ├─ 📝 encryption_guide.md Markdown 482L · 10.9 KB
│ ├─ 📝 index_sync_guide.md Markdown 540L · 17.4 KB
│ ├─ 📝 insight_design.md Markdown 496L · 11.1 KB
│ ├─ 📝 memory_types.md Markdown 517L · 19.2 KB
│ ├─ 📝 module_index.md Markdown 138L · 5.7 KB
│ ├─ 📝 privacy_guide.md Markdown 407L · 9.8 KB
│ ├─ 📝 short_term_insight_guide.md Markdown 357L · 11.6 KB
│ └─ 📝 usage_guide.md Markdown 305L · 8.1 KB
├─ 📁 scripts
│ ├─ 🐍 __init__.py Python 262L · 5.9 KB
│ ├─ 🐍 async_writer.py Python 462L · 13.9 KB
│ ├─ 🐍 batched_writer.py Python 297L · 8.6 KB
│ ├─ 🐍 bloom_filter.py Python 349L · 10.8 KB
│ ├─ 🐍 cache_consistency.py Python 578L · 16.3 KB
│ ├─ 🐍 cache_layer.py Python 649L · 17.8 KB
│ ├─ 🐍 causal_chain_extractor.py Python 575L · 18.2 KB
│ ├─ 🐍 chain_reasoning.py Python 837L · 26.1 KB
│ ├─ 🐍 cognitive_model_builder.py Python 824L · 29.3 KB
│ ├─ 🐍 conflict_resolver.py Python 509L · 17.8 KB
│ ├─ 🐍 context_lazy_loader.py Python 733L · 20.4 KB
│ ├─ 🐍 context_orchestrator.py Python 914L · 27.9 KB
│ ├─ 🐍 context_reconstructor.py Python 1292L · 41.9 KB
│ ├─ 🔑 credential_manager.py Python 364L · 10.4 KB
│ ├─ 🐍 cross_session_memory_linker.py Python 569L · 16.8 KB
│ ├─ 🐍 encryption.py Python 661L · 16.3 KB
│ ├─ 🐍 fallback_manager.py Python 480L · 14.3 KB
│ ├─ 🐍 heat_manager.py Python 242L · 6.6 KB
│ ├─ 🐍 importance_scorer.py Python 547L · 17.8 KB
│ ├─ 🐍 incremental_sync.py Python 544L · 13.7 KB
│ ├─ 🐍 insight_module.py Python 1297L · 42.6 KB
│ ├─ 🐍 knowledge_gap_identifier.py Python 627L · 21.3 KB
│ ├─ 🐍 long_term.py Python 1180L · 40.5 KB
│ ├─ 🐍 memory_conflict.py Python 936L · 30.3 KB
│ ├─ 🐍 memory_forgetting_mechanism.py Python 557L · 17.5 KB
│ ├─ 🐍 memory_index.py Python 664L · 19.4 KB
│ ├─ 🐍 monitoring.py Python 606L · 15.4 KB
│ ├─ 🐍 multi_source_coordinator.py Python 676L · 22.7 KB
│ ├─ 🐍 noise_filter.py Python 556L · 16.8 KB
│ ├─ 🐍 observability_manager.py Python 1071L · 31.0 KB
│ ├─ 🐍 perception.py Python 850L · 24.1 KB
│ ├─ 🐍 permission_boundary_controller.py Python 823L · 24.6 KB
│ ├─ 🐍 prefetch_manager.py Python 580L · 17.1 KB
│ ├─ 🐍 privacy.py Python 776L · 21.8 KB
│ ├─ 🐍 progressive_compressor.py Python 583L · 18.6 KB
│ ├─ 🐍 redis_adapter.py Python 947L · 24.4 KB
│ ├─ 🐍 result_compressor.py Python 1211L · 39.6 KB
│ ├─ 🐍 retrieval_decision_engine.py Python 574L · 17.6 KB
│ ├─ 🐍 retrieval_organizer.py Python 754L · 22.8 KB
│ ├─ 🐍 retrieval_quality_evaluator.py Python 629L · 19.4 KB
│ ├─ 🐍 short_term_insight.py Python 630L · 21.7 KB
│ ├─ 🐍 short_term_redis.py Python 704L · 19.6 KB
│ ├─ 🐍 short_term.py Python 1689L · 53.2 KB
│ ├─ 🐍 smart_allocator.py Python 532L · 17.0 KB
│ ├─ 🐍 state_capture.py Python 1119L · 29.3 KB
│ ├─ 🐍 state_consistency_validator.py Python 603L · 19.4 KB
│ ├─ 🐍 state_inference_engine.py Python 604L · 19.4 KB
│ ├─ 🐍 task_progress.py Python 1024L · 30.1 KB
│ ├─ 🔑 token_budget.py Python 645L · 18.2 KB
│ └─ 🐍 type_defs.py Python 1580L · 46.6 KB
└─ 📝 SKILL.md Markdown 313L · 10.2 KB

Dependencies 4 items

PackageVersionSourceKnown VulnsNotes
cryptography >=41.0.0 pip No 标准加密库
pydantic >=2.0.0 pip No 数据验证
redis >=4.5.0 pip No 本地缓存
tiktoken >=0.5.0 pip No Token 计数

Security Positives

✓ 使用 AES-256-GCM 标准加密算法保护凭证
✓ 包含完整的隐私同意管理机制
✓ 无 subprocess、eval、exec 等危险函数调用
✓ 无外部网络请求或数据外传
✓ 无访问 ~/.ssh、~/.aws、.env 等敏感路径
✓ 无 reverse shell 或 C2 通信行为
✓ 文件权限设置正确(chmod 600)
✓ 代码结构清晰,使用 pydantic 进行类型验证