net/http.FileServer
GO-S1034A directory listing is inappropriately exposed using net/http.FileServer
,
yielding potentially sensitive information to attackers.
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir("/")))
_ = http.ListenAndServe(":3000", nil)
}