fix(security): restrict agent log file access (#6050)

This commit is contained in:
InfinityPacer
2026-07-05 09:25:25 +08:00
committed by GitHub
parent cab2ac400a
commit 064e6535d5
6 changed files with 46 additions and 10 deletions
+4 -2
View File
@@ -21,10 +21,12 @@ def test_moviepilot_info_does_not_expose_api_token_or_database_password(monkeypa
assert "db.example.local" not in moviepilot_info
assert str(settings.CONFIG_PATH) in moviepilot_info
assert str(settings.TEMP_PATH) in moviepilot_info
assert str(settings.LOG_PATH) in moviepilot_info
assert str(settings.LOG_PATH / "moviepilot.log") in moviepilot_info
assert str(settings.LOG_PATH) not in moviepilot_info
assert str(settings.LOG_PATH / "moviepilot.log") not in moviepilot_info
assert str(settings.LOG_PATH / "moviepilot.stdout.log") not in moviepilot_info
assert str(settings.LOG_PATH / "moviepilot.frontend.stdout.log") not in moviepilot_info
assert "日志目录" not in moviepilot_info
assert "主日志文件" not in moviepilot_info
assert str(settings.CONFIG_PATH / "agent") not in moviepilot_info
assert str(settings.CONFIG_PATH / "agent" / "memory") not in moviepilot_info
assert str(settings.CONFIG_PATH / "agent" / "skills") not in moviepilot_info