Skip to content

Conversation

@djeebus
Copy link
Contributor

@djeebus djeebus commented Jan 17, 2026

No description provided.

}

func (p *Proxy) getPrefixFromSandbox(conn net.Conn) (string, error) {
sbx, err := p.sandboxes.GetByHostPort(conn.RemoteAddr().String())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security issue: Sandbox isolation could be bypassed. The GetByHostPort method matches based on IP address, but conn.RemoteAddr() returns the client's IP which could be spoofed or shared between sandboxes if they use NAT. Consider using a more secure authentication mechanism.

Comment on lines +149 to +153
data, err := exec.CommandContext(ctx, "bash", "-c", fmt.Sprintf(`
set -e
mkdir -p %q
mount -v -t nfs -o mountproto=tcp,mountport=2049,proto=tcp,port=2049,nfsvers=3,noacl %q %q
`, path, nfsTarget, path)).CombinedOutput()

Check failure

Code scanning / CodeQL

Command built from user-controlled sources Critical

This command depends on a
user-provided value
.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is executed in their sandbox with sudo credentials. There's nothing for them to hack, they already have root.

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.

3 participants