Closed
Description
Hi! sqlc looks neat and I'm playing around with it.
The docs make this statement:
WASM plugins are fully sandboxed; they do not have access to the network, filesystem, or environment variables.
This caused me to look into how filesystem writes are performed. Am I misinterpreting the code, or does the use of path.Join allow for path traversal attacks? e.g. if a plugin emits a path beginning with ../../../
. I don't speak any Go, but my read of the Clean function (which appears to be applied automatically to the result of Join) is that it only normalizes ..
inside a path and preserves it at the front.
Apologies in advance if I've missed the defense against this.