package
0.0.0-20241106034851-cf7c0969f192
Repository: https://github.com/pyneda/sukyan.git
Documentation: pkg.go.dev
# Functions
ActiveScanHandler godoc @Summary Submit items for active scanning @Description Receives a list of items and schedules them for active scanning.
CreatePlaygroundCollection godoc @Summary Create a new playground collection @Description Create a new playground collection @Tags Playground @Accept json @Produce json @Param input body CreatePlaygroundCollectionInput true "Create Playground Collection Input" @Success 201 {object} db.PlaygroundCollection @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/collections [post].
CreatePlaygroundSession godoc @Summary Create a new playground session @Description Create a new playground session @Tags Playground @Accept json @Produce json @Param input body CreatePlaygroundSessionInput true "Create Playground Session Input" @Success 201 {object} db.PlaygroundSession @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/sessions [post].
CreateStoredBrowserActions handles the API request for creating a new StoredBrowserActions @Summary Create a new StoredBrowserActions @Description Creates a new StoredBrowserActions record @Tags Browser Actions @Accept json @Produce json @Param input body BrowserActionsInput true "Browser actions input object to create" @Success 201 {object} db.StoredBrowserActions @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions [post].
CreateWorkspace godoc @Summary Create a new workspace @Description Saves a new workspace to the database @Tags Workspaces @Accept json @Produce json @Param workspace body WorkspaceCreateInput true "Workspace to create" @Success 201 {object} db.Workspace @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces [post].
DeleteStoredBrowserActions handles the API request for deleting a StoredBrowserActions @Summary Delete a StoredBrowserActions @Description Deletes an existing StoredBrowserActions record @Tags Browser Actions @Accept json @Produce json @Param id path int true "StoredBrowserActions ID" @Success 204 "No Content" @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions/{id} [delete].
DeleteWorkspace godoc @Summary Delete a workspace @Description Deletes a workspace and all associated data @Tags Workspaces @Accept json @Produce json @Param id path string true "Workspace ID" @Success 200 {object} map[string]interface{} "message": "Workspace successfully deleted" @Failure 404 {object} ErrorResponse @Failure 422 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces/{id} [delete].
FindHistory gets history with pagination and filtering options @Summary Get history @Description Get history with optional pagination and filtering by status codes, HTTP methods, and sources @Deprecated @Tags History @Produce json @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param status query string false "Comma-separated list of status codes to filter by" @Param methods query string false "Comma-separated list of HTTP methods to filter by" @Param sources query string false "Comma-separated list of sources to filter by" @Param ids query string false "Comma-separated list of history IDs to filter by" @Param workspace query integer true "Workspace ID to filter by" @Param playground_session query integer false "Playground session ID to filter by" @Param task query integer false "Task ID" @Param sort_by query string false "Field to sort by" Enums(id,created_at,updated_at,status_code,request_body_size,url,response_body_size,parameters_count,method) default("id") @Param sort_order query string false "Sort order" Enums(asc, desc) default("desc") @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history [get].
FindHistoryPost handles POST requests for fetching history with pagination and filtering options @Summary Get history (POST) @Description Get history with optional pagination and filtering using POST request @Tags History @Accept json @Produce json @Param filters body db.HistoryFilter true "History filter options" @Success 200 {object} map[string]interface{} @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history [post].
FindInteractions gets interactions with pagination and filtering options @Summary Get interactions @Description Get interactions with optional pagination and protocols filter @Tags Interactions @Produce json @Param workspace query int true "Workspace ID" @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param protocols query string false "Comma-separated list of protocols to filter by" @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/interactions [get].
FindIssues godoc @Summary List all issues @Description Retrieves all issues with a count @Tags Issues @Accept json @Produce json @Param workspace query int true "Workspace ID" @Param task query int false "Task ID" @Param taskjob query int false "Task Job ID" @Param codes query string false "Comma-separated list of issue codes to filter by" @Success 200 {array} db.Issue @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues [get].
FindIssuesGrouped godoc @Summary List all issues grouped @Description Retrieves all issues grouped @Tags Issues @Accept json @Produce json @Param workspace query int true "Workspace ID" @Param task query int false "Task ID" @Param taskjob query int false "Task Job ID" @Success 200 {array} db.GroupedIssue @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues/grouped [get].
@Summary Search Task Jobs @Description Allows to filter and search task jobs @Tags Tasks @Accept json @Produce json @Param task query int true "Task ID" @Param page_size query int false "Number of items per page" default(50) @Param page query int false "Page number" default(1) @Param status query string false "Comma-separated list of statuses to filter" @Param title query string false "Comma-separated list of titles to filter" @Param status_codes query string false "Comma-separated list of status codes to filter" @Param methods query string false "Comma-separated list of methods to filter" @Param sort_by query string false "Field to sort by" Enums(id, history_method, history_url, history_status, history_parameters_count, title, status, started_at, completed_at, created_at, updated_at) @Param sort_order query string false "Sort order" Enums(asc, desc) @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/tasks/jobs [get].
FindTasks godoc @Summary List tasks with pagination and filtering @Description Retrieves tasks based on pagination and status filters @Tags Tasks @Accept json @Produce json @Param query query string false "Query string to search for" @Param page_size query int false "Number of items per page" default(50) @Param page query int false "Page number" default(1) @Param workspace query int true "Workspace ID" @Param status query string false "Comma-separated list of statuses to filter" @Param playground_session query integer false "Playground session ID to filter by" @Success 200 {array} db.Task @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/tasks [get].
@Summary Get WebSocket connection details @Description Get details of a specific WebSocket connection by its ID, including its associated messages @Tags History @Produce json @Param id path int true "WebSocket connection ID" @Success 200 {object} db.WebSocketConnection @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/websocket/connections/{id} [get].
@Summary Get WebSocket connections @Description Get WebSocket connections with optional pagination @Tags History @Produce json @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param workspace query int true "Workspace ID" @Param task query int false "Task ID" @Param sources query string false "Comma-separated list of sources to filter by" @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/websocket/connections [get].
@Summary Get WebSocket messages @Description Get WebSocket messages with optional pagination and filtering by connection id @Tags History @Produce json @Param page_size query integer false "Size of each page" default(50) @Param page query integer false "Page number" default(1) @Param connection_id query string false "Filter messages by WebSocket connection ID" @Success 200 {array} db.WebSocketMessage @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/websocket/messages [get].
FindWorkspaces godoc @Summary List all workspaces @Description Retrieves all workspaces with a count @Tags Workspaces @Accept json @Produce json @Param query query string false "Search query" @Param page_size query integer false "Size of each page" default(20) @Param page query integer false "Page number" default(1) @Success 200 {array} db.Workspace @Failure 422 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces [get].
FullScanHandler godoc @Summary Submit URLs for full scanning @Description Receives a list of URLs and other parameters and schedules them for a full scan @Tags Scan @Accept json @Produce json @Param input body scan_options.FullScanOptions true "Configuration for full scan" @Success 200 {object} ActionResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/scan/full [post].
FuzzRequest godoc @Summary Schedules a new task to fuzz the provided request @Description Schedules a new task to fuzz the provided request with the provided insertion points, payloads, etc and returns the task ID to filter the results @Tags Playground @Accept json @Produce json @Param input body PlaygroundFuzzInput true "Set the fuzzing request configuration" @Success 200 {string} PlaygroundFuzzResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/fuzz [post].
@Summary Get children history @Description Get all the other history items that have the same depth or more than the provided history ID and that start with the same URL @Tags History @Accept json @Produce json @Param id path int true "History ID" @Success 200 {array} HistorySummary @Failure 400,404 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/{id}/children [get].
GetInteractionDetail fetches the details of a specific OOB Interaction by its ID.
GetIssueDetail godoc @Summary Get details of an issue @Description Retrieves details of a specific issue by its ID @Tags Issues @Accept json @Produce json @Param id path int true "Issue ID" @Success 200 {object} db.Issue @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues/{id} [get].
GetPlaygroundCollection retrieves a PlaygroundCollection by its ID.
GetPlaygroundSession retrieves a PlaygroundSession by its ID.
@Summary Gets all root history nodes @Description Get all the root history items @Tags History @Accept json @Produce json @Param workspace query integer true "Workspace ID to filter by" @Success 200 {array} RootNode @Failure 400,404 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/history/root-nodes [get].
GetSitemap godoc @Summary Retrieve sitemap based on filters @Description Retrieves sitemap based on workspace and task ID @Tags Sitemap @Accept json @Produce json @Param workspace query int false "Workspace ID filter" @Param task query int false "Task ID filter" @Success 200 {array} db.SitemapNode @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/sitemap [get].
GetStoredBrowserActions handles the API request for retrieving a StoredBrowserActions by ID @Summary Get a StoredBrowserActions by ID @Description Retrieves a StoredBrowserActions record by its ID @Tags Browser Actions @Accept json @Produce json @Param id path int true "StoredBrowserActions ID" @Success 200 {object} db.StoredBrowserActions @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions/{id} [get].
GetWorkspaceDetail godoc @Summary Get a single workspace @Description Retrieves a workspace by ID @Tags Workspaces @Accept json @Produce json @Param id path string true "Workspace ID" @Success 200 {object} db.Workspace @Failure 404 {object} ErrorResponse @Failure 422 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces/{id} [get].
No description provided by the author
JwtListHandler handles the API request for listing JWTs with filtering and sorting @Summary List JWTs with filtering and sorting @Description Retrieves a list of JWTs with optional filtering and sorting options @Tags JWT @Accept json @Produce json @Param input body db.JwtFilters true "Filtering and sorting options" @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/tokens/jwts [post].
JWTProtected func for specify routes group with JWT authentication.
ListAvailableWordlists godoc @Summary List available wordlists @Description List all wordlists available for use in the playground @Tags Playground @Accept json @Produce json @Success 200 {array} manual.Wordlist @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/wordlists [get].
ListPlaygroundCollections godoc @Summary List playground collections @Description List playground collections @Tags Playground @Accept json @Produce json @Param query query string false "Search by name or description" @Param workspace query uint true "Filter by workspace id" @Param sort_by query string false "Sort by field (id, name, description, workspace_id)" @Param sort_order query string false "Sort order (asc, desc)" @Param page query int false "Page number for pagination" @Param page_size query int false "Page size for pagination" @Success 200 {array} db.PlaygroundCollection @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/collections [get].
ListPlaygroundSessions godoc @Summary List Playground Sessions @Description List Playground Sessions @Tags Playground @Accept json @Produce json @Param type query string false "Filter by session type (manual, fuzz)" @Param original_request_id query uint false "Filter by original request ID" @Param collection query uint false "Filter by collection ID" @Param workspace query uint true "Filter by workspace ID" @Param query query string false "Search by name" @Param page query int false "Page number for pagination" @Param page_size query int false "Page size for pagination" @Param sort_by query string false "Sort by field (id, name, type, original_request_id, collection, workspace)" @Param sort_order query string false "Sort order (asc, desc)" @Success 200 {array} db.PlaygroundSession @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/sessions [get].
ListStoredBrowserActions handles the API request for listing StoredBrowserActions with filtering and sorting @Summary List StoredBrowserActions with filtering and sorting @Description Retrieves a list of StoredBrowserActions with optional filtering and sorting options @Tags Browser Actions @Accept json @Produce json @Param page query int false "Page number" default(1) @Param page_size query int false "Page size" default(50) @Param query query string false "Search query for title" @Param scope query string false "Scope filter (global or workspace)" @Param workspace_id query int false "Workspace ID filter" @Success 200 {object} map[string]interface{} "Returns 'data' (array of StoredBrowserActions) and 'count' (total number of records)" @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions [get].
PassiveScanHandler godoc @Summary Submit items for passive scanning @Description Receives a list of items and schedules them for passive scanning @Tags Scan @Accept json @Produce json @Param input body PassiveScanInput true "List of items" @Success 200 {object} ActionResponse @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/scan/passive [post].
RenewTokens method for renew access and refresh tokens.
ReplayRequest godoc @Summary Sends a request to a target @Description Sends a request to a target and returns the response @Tags Playground @Accept json @Produce json @Param input body PlaygroundReplayInput true "Set the request configuration" @Success 200 {object} manual.ReplayResult @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/playground/replay [post].
ReportHandler godoc @Summary Generate a report @Description Generates a report for a given workspace @Tags Reports @Accept json @Produce json @Param report body ReportRequest true "Report request" @Success 200 {object} string @Failure 400 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/report [post].
SetFalsePositive godoc @Summary Set an issue as a false positive @Description Updates the FalsePositive attribute of a specific issue @Tags Issues @Accept json @Produce json @Param id path int true "Issue ID" @Param value body bool true "Boolean value for FalsePositive" @Success 200 {object} IssueUpdateResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/issues/{id}/set-false-positive [post].
@title Sukyan API @version 0.1 @description The Sukyan API documentation.
SystemStats retrieves overall system statistics.
UpdateStoredBrowserActions handles the API request for updating a StoredBrowserActions @Summary Update a StoredBrowserActions @Description Updates an existing StoredBrowserActions record @Tags Browser Actions @Accept json @Produce json @Param id path int true "StoredBrowserActions ID" @Param input body BrowserActionsInput true "BrowserActionsInput object to update" @Success 200 {object} db.StoredBrowserActions @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/browser-actions/{id} [put].
UpdateWorkspace godoc @Summary Update a workspace @Description Updates a workspace by ID @Tags Workspaces @Accept json @Produce json @Param id path string true "Workspace ID" @Param workspace body WorkspaceUpdateInput true "Workspace object" @Success 200 {object} db.Workspace @Failure 404 {object} ErrorResponse @Failure 422 {object} ErrorResponse @Security ApiKeyAuth @Router /api/v1/workspaces/{id} [put].
UserSignIn method to auth user and return access and refresh tokens.
UserSignOut method to de-authorize user and delete refresh token.
WorkspaceStats retrieves statistics for a given workspace.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CreatePlaygroundCollectionInput represents the input for creating a Playground Collection.
CreatePlaygroundSessionInput represents the input for creating a Playground Session.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReportRequest represents the structure of the JSON payload for generating a report.
No description provided by the author
SignIn struct to describe login user.
SignInResponse represents the response from the UserSignIn endpoint.
No description provided by the author
WorkspaceCreateInput defines the acceptable input for creating a workspace.
WorkspaceUpdateInput defines the acceptable input for updating a workspace.