From 583a6f059c10adb76b78060c6cd7e3437d516d3f Mon Sep 17 00:00:00 2001 From: Ajaykn-mac Date: Tue, 24 May 2022 09:08:30 +0530 Subject: [PATCH] Fixing cross site scripting codescan alert --- test/github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/github.go b/test/github.go index d3caec5..39bd814 100644 --- a/test/github.go +++ b/test/github.go @@ -159,7 +159,7 @@ func main() { if repoName != existingRepo { w.WriteHeader(http.StatusNotFound) - _, err := w.Write([]byte(fmt.Sprintf("Repo %s not found", repoName))) + _, err := w.Write([]byte(fmt.Sprintf("Repo %s not found", html.EscapeString(repoName)))) if err != nil { panic(err) }