Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
)
19 changes: 19 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -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
}