Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Contrast-Security-OSS/go-test-bench
/ functions
Functions
665 in github.com/Contrast-Security-OSS/go-test-bench
⨍
Functions
665
◇
Types & classes
169
↓ 28 callers
Method
Fatalf
(f string, va ...interface{})
internal/common/logger.go:11
↓ 22 callers
Method
Errorf
(f string, va ...interface{})
internal/common/logger.go:10
↓ 19 callers
Function
RouteHandler
RouteHandler returns a middleware.Responder that serves our html and the vulnerable functions.
pkg/serveswagger/setup.go:103
↓ 18 callers
Method
Query
([]driver.Value)
internal/injection/sqli/db.go:13
↓ 16 callers
Method
Logf
(f string, va ...interface{})
internal/common/logger.go:9
↓ 10 callers
Function
LocateDir
LocateDir finds a dir with the given name and returns its path. The given name may contain a slash, i.e. 'cmd/go-swagger'.
internal/common/routes.go:111
↓ 10 callers
Function
PopulateRouteMap
PopulateRouteMap returns a RouteMap, for use in nav bar template.
internal/common/routes.go:190
↓ 9 callers
Method
String
String returns the string representation of the path with query string
cmd/go-swagger/restapi/operations/xss/xss_front_urlbuilder.go:58
↓ 9 callers
Function
getMockRequest
(t *testing.T, method, url, body string)
internal/common/input_test.go:119
↓ 8 callers
Function
GetUserInput
GetUserInput returns the first value found in the request with the key 'input'. If none are found, it tries for a header with key 'credentials', and
internal/common/input.go:28
↓ 7 callers
Method
Close
()
internal/injection/sqli/db.go:10
↓ 7 callers
Method
Fatalf
Fatalf logs message either via defined user logger or via system one if no user logger is defined. Exits with non-zero status after printing
cmd/go-swagger/restapi/server.go:117
↓ 7 callers
Method
Logf
Logf logs message either via defined user logger or via system one if no user logger is defined.
cmd/go-swagger/restapi/server.go:107
↓ 7 callers
Method
String
()
internal/common/sink.go:46
↓ 7 callers
Method
hasScheme
(scheme string)
cmd/go-swagger/restapi/server.go:138
↓ 6 callers
Function
Register
Register adds one or more Endpoints to the global list of routes.
internal/common/routes.go:66
↓ 6 callers
Function
Reset
Reset clears AllRoutes and rmap. For testing.
internal/common/routes.go:177
↓ 5 callers
Function
GenericHandler
GenericHandler returns a generic replacement for HandlerFn. It requires VulnerableFnWrapper and Sanitize to be set.
internal/common/handler.go:22
↓ 5 callers
Function
ParseViewTemplates
ParseViewTemplates is used to set up the template resources for use by std and go-swagger
internal/common/routes.go:140
↓ 5 callers
Function
RegisterRoutes
RegisterRoutes is to be called to add the routes in this package to common.AllRoutes.
internal/ssrf/ssrf.go:14
↓ 5 callers
Function
RegisterRoutes
RegisterRoutes is to be called to add the routes in this package to common.AllRoutes.
internal/xss/xss.go:9
↓ 5 callers
Function
RegisterRoutes
RegisterRoutes is to be called to add the routes in this package to common.AllRoutes.
internal/pathtraversal/path-traversal.go:17
↓ 5 callers
Function
RegisterRoutes
RegisterRoutes is called in framework init to register routes in this package.
internal/injection/sqli/sql-injection.go:19
↓ 5 callers
Function
RegisterRoutes
RegisterRoutes is to be called to add the routes in this package to common.AllRoutes.
internal/injection/cmdi/cmd-injection.go:16
↓ 4 callers
Function
FindViewsDir
FindViewsDir looks for the views dir, which contains our html templates. It looks in the current dir and its parents.
internal/common/routes.go:107
↓ 4 callers
Method
Listen
Listen creates the listeners for the server
cmd/go-swagger/restapi/server.go:329
↓ 4 callers
Function
RegisterRoutes
RegisterRoutes is to be called to add the routes in this package to common.AllRoutes.
internal/unvalidated/unvalidated-redirect.go:8
↓ 4 callers
Function
Setup
Setup loads templates, sets up routes, etc.
pkg/servestd/servestd.go:155
↓ 4 callers
Function
TestRouteData
TestRouteData is called from a framework-specific test to check that input types are correct. rmap and/or routeInputs may be nil, in which case the de
pkg/servetest/servetest.go:32
↓ 4 callers
Function
exportIdentifier
return an identifier suitable for use in an exported function name
cmd/go-swagger/regen/regen.go:196
↓ 4 callers
Function
newHandler
(v common.Route)
pkg/servechi/servechi.go:27
↓ 3 callers
Function
GetHeaderValue
GetHeaderValue returns the input value from the given header
internal/common/input.go:86
↓ 3 callers
Method
ServeHTTP
(rw http.ResponseWriter, r *http.Request)
cmd/go-swagger/restapi/operations/xss/xss_front.go:42
↓ 3 callers
Function
Setup
Setup loads templates, sets up routes, etc.
pkg/servegin/servegin.go:145
↓ 3 callers
Function
Setup
Setup loads templates, sets up routes, etc.
pkg/servechi/servechi.go:149
↓ 3 callers
Function
Setup
Setup sets up the configuration for the go-swagger server
pkg/serveswagger/setup.go:34
↓ 3 callers
Function
Setup
Setup loads templates, sets up routes, etc.
pkg/servejschmidt/servejschmidt.go:138
↓ 3 callers
Method
Shutdown
Shutdown server and clean up resources
cmd/go-swagger/restapi/server.go:400
↓ 3 callers
Function
configureServer
As soon as server is initialized but not run yet, this function will be called. If you need to modify a config, store server instance to stop it indiv
cmd/go-swagger/restapi/configure_swagger_bench.go:171
↓ 3 callers
Function
logErr
(c *gin.Context, pre string, err error, values ...string)
pkg/servegin/inputs.go:12
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_open_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_write_file_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_create_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_read_file_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_write_file_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_front_urlbuilder.go:35
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_create_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_open_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_read_file_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/ssrf/ssrf_front_urlbuilder.go:35
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/ssrf/ssrf_get_query_http_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/xss/xss_get_buffered_query_reflected_xss_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/xss/xss_front_urlbuilder.go:35
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/xss/xss_get_query_reflected_xss_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/swagger_server/root_urlbuilder.go:35
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/sql_injection/sql_injection_get_query_exec_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/sql_injection/sql_injection_front_urlbuilder.go:35
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/cmd_injection/cmd_injection_get_query_command_context_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/cmd_injection/cmd_injection_get_query_command_urlbuilder.go:42
↓ 2 callers
Method
Build
Build a url path and query string
cmd/go-swagger/restapi/operations/cmd_injection/cmd_injection_front_urlbuilder.go:35
↓ 2 callers
Method
Context
Context returns the middleware context for the swagger bench API
cmd/go-swagger/restapi/operations/swagger_bench_api.go:420
↓ 2 callers
Method
Exec
([]driver.Value)
internal/injection/sqli/db.go:12
↓ 2 callers
Function
FilterInputTypes
FilterInputTypes removes unsupported input types so they are not rendered. NOTE: this filtering only has an effect on routes using the generic templat
pkg/serveswagger/shared/shared.go:22
↓ 2 callers
Function
FuncMap
FuncMap returns a map of functions for use from templates.
internal/common/templateFns.go:12
↓ 2 callers
Function
GetCookieValue
GetCookieValue returns the input value for the given cookie
internal/common/input.go:76
↓ 2 callers
Function
GetFormValue
GetFormValue returns the input value for the given key from the submitted form
internal/common/input.go:71
↓ 2 callers
Function
GetParamValue
GetParamValue returns the input value for the given key of a GET request query
internal/common/input.go:52
↓ 2 callers
Function
GetPathValue
GetPathValue returns element(s) from the given position(s) in the url, joined with '/'. Negative positions are allowed and start at the right.
internal/common/input.go:58
↓ 2 callers
Function
GetRouteMap
GetRouteMap returns the already-populated RouteMap.
internal/common/routes.go:185
↓ 2 callers
Method
Handle
(XSSFrontParams)
cmd/go-swagger/restapi/operations/xss/xss_front.go:24
↓ 2 callers
Method
Init
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
cmd/go-swagger/restapi/operations/swagger_bench_api.go:531
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_open_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_write_file_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_create_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_read_file_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_write_file_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_front_urlbuilder.go:47
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_create_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_buffered_query_open_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/path_traversal/path_traversal_get_query_read_file_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/ssrf/ssrf_front_urlbuilder.go:47
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/ssrf/ssrf_get_query_http_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/xss/xss_get_buffered_query_reflected_xss_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/xss/xss_front_urlbuilder.go:47
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/xss/xss_get_query_reflected_xss_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/swagger_server/root_urlbuilder.go:47
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/sql_injection/sql_injection_get_query_exec_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/sql_injection/sql_injection_front_urlbuilder.go:47
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/cmd_injection/cmd_injection_get_query_command_context_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/cmd_injection/cmd_injection_get_query_command_urlbuilder.go:70
↓ 2 callers
Method
Must
Must is a helper function to panic when the url builder returns an error
cmd/go-swagger/restapi/operations/cmd_injection/cmd_injection_front_urlbuilder.go:47
↓ 2 callers
Method
Open
(name string)
internal/injection/sqli/db.go:23
↓ 2 callers
Function
RegisterNewRoutes
RegisterNewRoutes is called from Setup() and from the code regenerator
pkg/serveswagger/shared/shared.go:52
↓ 2 callers
Function
RegisterRoutes
RegisterRoutes registers all decoupled routes used by servestd. Shared with cmd/exercise.
pkg/servestd/servestd.go:133
↓ 2 callers
Function
RegisterRoutes
RegisterRoutes registers all decoupled routes used with gin. Shared with cmd/exercise.
pkg/servegin/servegin.go:135
↓ 2 callers
Function
RegisterRoutes
RegisterRoutes registers all decoupled routes used by servechi. Shared with cmd/exercise. Right now, this func has the same behavior as servestd.Regis
pkg/servechi/servechi.go:127
↓ 2 callers
Function
RegisterRoutes
RegisterRoutes registers all decoupled routes used by servejschmidt. Shared with cmd/exercise. Right now, this func has the same behavior as servestd.
pkg/servejschmidt/servejschmidt.go:116
↓ 2 callers
Method
Serve
Serve the api
cmd/go-swagger/restapi/server.go:153
↓ 2 callers
Method
String
()
internal/common/routes.go:30
↓ 2 callers
Function
buffer
(s string)
pkg/servegin/inputs.go:66
next →
1–100 of 665, ranked by callers