api

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(r *gin.Engine, h *Handler)

Types

type HTTPResponseReport

type HTTPResponseReport struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	StartTime time.Time `json:"start_time"`
	EndTime   time.Time `json:"end_time"`

	Vulns []HTTPResponseVulnerability `json:"vulnerabilities"`
}

func FormatReports

func FormatReports(reports []*report.ScanReport) (responseReports []HTTPResponseReport)

type HTTPResponseVulnerability

type HTTPResponseVulnerability struct {
	OWASP2023Category string `json:"owasp2023_category"`

	ID   string `json:"id"`
	Name string `json:"name"`
}

type Handler

type Handler struct {
}

func NewHandler

func NewHandler() *Handler

func (*Handler) ScanGraphQL

func (h *Handler) ScanGraphQL(ctx *gin.Context)

func (*Handler) ScanOpenAPI

func (h *Handler) ScanOpenAPI(ctx *gin.Context)

func (*Handler) ScanURL

func (h *Handler) ScanURL(ctx *gin.Context)

type NewGraphQLScanRequest

type NewGraphQLScanRequest struct {
	Endpoint string `form:"endpoint" json:"endpoint" binding:"required"`
	Headers  []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `form:"headers" json:"headers"`
	Cookies []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `form:"cookies" json:"cookies"`
}

type NewOpenAPIScanRequest

type NewOpenAPIScanRequest struct {
	Schema     string `json:"schema" binding:"required"`
	ValidToken string `json:"valid_token"`
}

type NewURLScanRequest

type NewURLScanRequest struct {
	URL     string `form:"url" json:"url" binding:"required"`
	Method  string `form:"method" json:"method" binding:"required"`
	Headers []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `form:"headers" json:"headers"`
	Cookies []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `form:"cookies" json:"cookies"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL