Goal
Treat Magicloder as a local service that handles arbitrary remote URLs and filesystem paths.
Scope
- Write a threat model for SSRF, local-file access, path traversal, malicious redirects, resource exhaustion and untrusted response headers.
- Validate schemes and reject unsupported protocols.
- Add safe redirect policy.
- Prevent writes outside allowed directories where sandboxing is enabled.
- Add maximum file size, timeout, retry and queue limits.
- Sanitize filenames derived from URLs/content-disposition.
- Avoid logging secrets or sensitive local paths unnecessarily.
- Harden WebSocket/API authentication and origin handling.
- Add security-focused tests and a dependency scanning workflow.
Acceptance criteria
- Threat model is committed.
- Security tests cover SSRF/path traversal/resource exhaustion cases.
- Fuzz/property tests cover URL and filename handling where practical.
- CI runs security/dependency checks.
Goal
Treat Magicloder as a local service that handles arbitrary remote URLs and filesystem paths.
Scope
Acceptance criteria