Skip to content

Phase 10: Add security hardening and threat-model tests #11

Description

@ashishsinghbora

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbackend issuesphasephase issuessecuritysecurity issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions