From cfbcd15d6a42533e5d3abd32b96331e6c3c40f32 Mon Sep 17 00:00:00 2001 From: Raph Soeiro <123182884+wizraph@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:49:19 -0500 Subject: [PATCH 1/2] Create main.go --- main.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 main.go diff --git a/main.go b/main.go new file mode 100644 index 0000000..7acc6df --- /dev/null +++ b/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "net/http" + + "github.com/dgrijalva/jwt-go" // Known for vulnerabilities in some versions + "github.com/gin-gonic/gin" // Example, replace with actual vulnerable library + "gopkg.in/yaml.v2" // Example, replace with actual vulnerable library +) + +func main() { + r := gin.Default() + r.GET("/", func(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{ + "message": "hello world", + }) + }) + r.Run() // listen and serve on 0.0.0.0:8080 +} From 39c1e273bd5ab709ee4969c34c417d157233a03e Mon Sep 17 00:00:00 2001 From: Raph Soeiro <123182884+wizraph@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:51:37 -0500 Subject: [PATCH 2/2] Create go.mod --- go.mod | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..80baf4a --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module example/vulnerable-app + +go 1.16 + +require ( + github.com/dgrijalva/jwt-go v3.2.0+incompatible // Vulnerable version as an example + github.com/gin-gonic/gin v1.6.3 // Example, replace with actual vulnerable version + gopkg.in/yaml.v2 v2.2.8 // Example, replace with actual vulnerable version +)