Skip to content

Security: Fix path traversal in evaluator and restrict Docker fallback#1

Open
Nafjan wants to merge 1 commit into
slopedrop:mainfrom
Nafjan:fix-security-sandbox-traversal
Open

Security: Fix path traversal in evaluator and restrict Docker fallback#1
Nafjan wants to merge 1 commit into
slopedrop:mainfrom
Nafjan:fix-security-sandbox-traversal

Conversation

@Nafjan
Copy link
Copy Markdown

@Nafjan Nafjan commented Apr 17, 2026

Security: Fix path traversal in evaluator and restrict Docker fallback

This patches two security flaws in the execution pipeline:

  1. Docker Sandbox Fallback: Previously, if Docker was unavailable, the sandbox would quietly fall back to running commands on the host OS. Downstream tools couldn't tell the difference. This strips out that host-fallback logic entirely. Now, if we can't find Docker, it blocks execution and returns a predictable error pattern instead of compromising the host.

  2. Path Traversal: The DualToolEvaluator allowed basic path traversal strings. We moved from naive substring matching to using os.path.abspath(os.path.expanduser(token)) across all platforms. This actively breaks ../ attempts before they reach the execution layer.

Also included the markdown security audit report detailing these findings and confirming false positives in the package-lock.json scanner hits.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

@Nafjan is attempting to deploy a commit to the swaroopmalina-1877's projects Team on Vercel.

A member of the Team first needs to authorize it.

This patches two security flaws in the execution pipeline:

1. Docker Sandbox Fallback: Previously, if Docker was unavailable, the sandbox would quietly fall back to running commands on the host OS. Downstream tools couldn't tell the difference. This strips out that host-fallback logic entirely. Now, if we can't find Docker, it blocks execution and returns a predictable error pattern instead of compromising the host.

2. Path Traversal: The DualToolEvaluator allowed basic path traversal strings. We moved from naive substring matching to using `os.path.abspath(os.path.expanduser(token))` across all platforms. This actively breaks `../` attempts before they reach the execution layer.

Also included the markdown security audit report detailing these findings and confirming false positives in the package-lock.json scanner hits.
@Nafjan Nafjan force-pushed the fix-security-sandbox-traversal branch from 727c0c2 to 3d567e2 Compare April 17, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant