Go

Go

Made by DeepSource

Exposure of directory listing using Serve / ServeFS GO-S1035

Security
Major
a01 owasp top 10 cwe-548

A directory listing is inappropriately exposed using github.com/gin-gonic/gin's Serve / ServeFS, yielding potentially sensitive information to attackers.

Bad practice

package main

import (
    "github.com/gin-gonic/gin"
)

func main() {
    router := gin.Default()
    router.Static("/static", "./static")
}

References