Skip to content

Consider sandboxed environment for agent execution #2

@iliall

Description

@iliall

Summary

Currently mini-swe-agent runs in a local environment (default_type="local") which executes commands directly on the host machine. When processing repositories from untrusted datasets, this could lead to arbitrary code execution.

Current Behavior

env = get_environment(config.get("environment", {}), default_type="local")

Potential Mitigations

  1. Container-based environment: Use mini-swe-agent's container environment if available
  2. Explicit opt-in: Require explicit flag/env var to enable local execution
  3. Dataset trust level: Add dataset metadata indicating trust level
  4. Documentation: Prominently document the risk for users

Priority

Medium - acceptable for controlled research datasets, but should be addressed before processing arbitrary/untrusted data.

References

  • src/generator.py:_run_agent()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions