mirror of
https://github.com/github/codeql.git
synced 2026-07-24 04:32:03 +02:00
13 lines
239 B
Go
13 lines
239 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
"os/exec"
|
|
)
|
|
|
|
func handler(req *http.Request) {
|
|
cmdName := req.URL.Query()["cmd"][0] // $ Source[go/command-injection]
|
|
cmd := exec.Command(cmdName) // $ Alert[go/command-injection]
|
|
cmd.Run()
|
|
}
|