1760 lines
42 KiB
JSON
1760 lines
42 KiB
JSON
{
|
||
"openapi": "3.1.0",
|
||
"info": {
|
||
"title": "SBOM Analysis Platform",
|
||
"version": "0.1.0"
|
||
},
|
||
"paths": {
|
||
"/api/health": {
|
||
"get": {
|
||
"summary": "Health Check",
|
||
"operationId": "health_check_api_health_get",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/config/nexus": {
|
||
"get": {
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Get Nexus Config",
|
||
"operationId": "get_nexus_config_api_config_nexus_get",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/NexusConfigResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Set Nexus Config",
|
||
"operationId": "set_nexus_config_api_config_nexus_post",
|
||
"requestBody": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/NexusConfigRequest"
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/NexusConfigResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/config/ai": {
|
||
"get": {
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Get Ai Config",
|
||
"operationId": "get_ai_config_api_config_ai_get",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AIConfigResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Set Ai Config",
|
||
"operationId": "set_ai_config_api_config_ai_post",
|
||
"requestBody": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AIConfigRequest"
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AIConfigResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/config/status": {
|
||
"get": {
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Get Config Status",
|
||
"operationId": "get_config_status_api_config_status_get",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ConfigStatusResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/tasks": {
|
||
"post": {
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "Create Task",
|
||
"description": "Upload Excel file, parse components, create task, and start workflow.",
|
||
"operationId": "create_task_api_tasks_post",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/Body_create_task_api_tasks_post"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TaskCreateResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"get": {
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "List Tasks",
|
||
"description": "Get paginated list of historical tasks.",
|
||
"operationId": "list_tasks_api_tasks_get",
|
||
"parameters": [
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"default": 1,
|
||
"title": "Page"
|
||
}
|
||
},
|
||
{
|
||
"name": "page_size",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"maximum": 100,
|
||
"minimum": 1,
|
||
"default": 20,
|
||
"title": "Page Size"
|
||
}
|
||
},
|
||
{
|
||
"name": "status",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Status"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TaskListResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/tasks/{task_id}/status": {
|
||
"get": {
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "Get Task Status",
|
||
"description": "Get current task status with workflow steps.",
|
||
"operationId": "get_task_status_api_tasks__task_id__status_get",
|
||
"parameters": [
|
||
{
|
||
"name": "task_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TaskStatusResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/tasks/{task_id}/report": {
|
||
"get": {
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "Get Task Report",
|
||
"description": "Get complete analysis report for a task.",
|
||
"operationId": "get_task_report_api_tasks__task_id__report_get",
|
||
"parameters": [
|
||
{
|
||
"name": "task_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/ReportResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/tasks/{task_id}/export": {
|
||
"get": {
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "Export Report",
|
||
"description": "Export report as PDF.",
|
||
"operationId": "export_report_api_tasks__task_id__export_get",
|
||
"parameters": [
|
||
{
|
||
"name": "task_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
}
|
||
},
|
||
{
|
||
"name": "format",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "pdf",
|
||
"title": "Format"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/tasks/{task_id}/retry": {
|
||
"post": {
|
||
"tags": [
|
||
"tasks"
|
||
],
|
||
"summary": "Retry Task",
|
||
"description": "Retry a failed task from a specific step.",
|
||
"operationId": "retry_task_api_tasks__task_id__retry_post",
|
||
"parameters": [
|
||
{
|
||
"name": "task_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/RetryRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/internal/download": {
|
||
"post": {
|
||
"tags": [
|
||
"internal"
|
||
],
|
||
"summary": "Download Component",
|
||
"operationId": "download_component_api_internal_download_post",
|
||
"parameters": [
|
||
{
|
||
"name": "name",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"title": "Name"
|
||
}
|
||
},
|
||
{
|
||
"name": "version",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string",
|
||
"title": "Version"
|
||
}
|
||
},
|
||
{
|
||
"name": "ecosystem",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "",
|
||
"title": "Ecosystem"
|
||
}
|
||
},
|
||
{
|
||
"name": "package_manager",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "",
|
||
"title": "Package Manager"
|
||
}
|
||
},
|
||
{
|
||
"name": "task_id",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
}
|
||
},
|
||
{
|
||
"name": "component_id",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Component Id"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/internal/scan": {
|
||
"post": {
|
||
"tags": [
|
||
"internal"
|
||
],
|
||
"summary": "Scan Component",
|
||
"operationId": "scan_component_api_internal_scan_post",
|
||
"parameters": [
|
||
{
|
||
"name": "component_id",
|
||
"in": "query",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer",
|
||
"title": "Component Id"
|
||
}
|
||
},
|
||
{
|
||
"name": "file_path",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "",
|
||
"title": "File Path"
|
||
}
|
||
},
|
||
{
|
||
"name": "file_type",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "jar",
|
||
"title": "File Type"
|
||
}
|
||
},
|
||
{
|
||
"name": "recommended_tools",
|
||
"in": "query",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "",
|
||
"title": "Recommended Tools"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/internal/save-result": {
|
||
"post": {
|
||
"tags": [
|
||
"internal"
|
||
],
|
||
"summary": "Save Result",
|
||
"description": "Dify 传 JSON body:{component_id, sbom_json, vulnerabilities_json, fix_suggestions_json, tools_used_str, status}",
|
||
"operationId": "save_result_api_internal_save_result_post",
|
||
"requestBody": {
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"additionalProperties": true,
|
||
"type": "object",
|
||
"title": "Payload"
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Successful Response",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {}
|
||
}
|
||
}
|
||
},
|
||
"422": {
|
||
"description": "Validation Error",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/HTTPValidationError"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"components": {
|
||
"schemas": {
|
||
"AIConfigRequest": {
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string",
|
||
"title": "Api Key",
|
||
"description": "OpenAI-compatible API key"
|
||
},
|
||
"base_url": {
|
||
"type": "string",
|
||
"title": "Base Url",
|
||
"description": "API base URL",
|
||
"default": "http://192.168.215.148:8000/v1"
|
||
},
|
||
"model": {
|
||
"type": "string",
|
||
"title": "Model",
|
||
"description": "Model name",
|
||
"default": "Qwen3-Next-80B-A3B-Instruct"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"api_key"
|
||
],
|
||
"title": "AIConfigRequest"
|
||
},
|
||
"AIConfigResponse": {
|
||
"properties": {
|
||
"base_url": {
|
||
"type": "string",
|
||
"title": "Base Url"
|
||
},
|
||
"model": {
|
||
"type": "string",
|
||
"title": "Model"
|
||
},
|
||
"has_api_key": {
|
||
"type": "boolean",
|
||
"title": "Has Api Key",
|
||
"default": false
|
||
},
|
||
"configured": {
|
||
"type": "boolean",
|
||
"title": "Configured",
|
||
"default": false
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"base_url",
|
||
"model"
|
||
],
|
||
"title": "AIConfigResponse"
|
||
},
|
||
"Body_create_task_api_tasks_post": {
|
||
"properties": {
|
||
"file": {
|
||
"type": "string",
|
||
"contentMediaType": "application/octet-stream",
|
||
"title": "File"
|
||
},
|
||
"project_name": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Project Name"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"file"
|
||
],
|
||
"title": "Body_create_task_api_tasks_post"
|
||
},
|
||
"ComponentResponse": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"task_id": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"title": "Name"
|
||
},
|
||
"version": {
|
||
"type": "string",
|
||
"title": "Version"
|
||
},
|
||
"ecosystem": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Ecosystem"
|
||
},
|
||
"package_manager": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Package Manager"
|
||
},
|
||
"download_url": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Download Url"
|
||
},
|
||
"download_status": {
|
||
"type": "string",
|
||
"title": "Download Status"
|
||
},
|
||
"local_file_path": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Local File Path"
|
||
},
|
||
"file_type": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "File Type"
|
||
},
|
||
"matched_tools": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Matched Tools"
|
||
},
|
||
"sbom_content": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Sbom Content"
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"title": "Status"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"title": "Created At"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"task_id",
|
||
"name",
|
||
"version",
|
||
"download_status",
|
||
"status",
|
||
"created_at"
|
||
],
|
||
"title": "ComponentResponse"
|
||
},
|
||
"ConfigStatusResponse": {
|
||
"properties": {
|
||
"nexus": {
|
||
"$ref": "#/components/schemas/NexusConfigResponse"
|
||
},
|
||
"ai": {
|
||
"$ref": "#/components/schemas/AIConfigResponse"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"nexus",
|
||
"ai"
|
||
],
|
||
"title": "ConfigStatusResponse"
|
||
},
|
||
"ExecutiveSummary": {
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "integer",
|
||
"title": "Task Id"
|
||
},
|
||
"project_name": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Project Name"
|
||
},
|
||
"total_components": {
|
||
"type": "integer",
|
||
"title": "Total Components"
|
||
},
|
||
"downloaded_count": {
|
||
"type": "integer",
|
||
"title": "Downloaded Count"
|
||
},
|
||
"failed_download_count": {
|
||
"type": "integer",
|
||
"title": "Failed Download Count"
|
||
},
|
||
"total_vulnerabilities": {
|
||
"type": "integer",
|
||
"title": "Total Vulnerabilities"
|
||
},
|
||
"critical_count": {
|
||
"type": "integer",
|
||
"title": "Critical Count"
|
||
},
|
||
"high_count": {
|
||
"type": "integer",
|
||
"title": "High Count"
|
||
},
|
||
"medium_count": {
|
||
"type": "integer",
|
||
"title": "Medium Count"
|
||
},
|
||
"low_count": {
|
||
"type": "integer",
|
||
"title": "Low Count"
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"title": "Status"
|
||
},
|
||
"created_at": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Created At"
|
||
},
|
||
"completed_at": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Completed At"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"task_id",
|
||
"total_components",
|
||
"downloaded_count",
|
||
"failed_download_count",
|
||
"total_vulnerabilities",
|
||
"critical_count",
|
||
"high_count",
|
||
"medium_count",
|
||
"low_count",
|
||
"status"
|
||
],
|
||
"title": "ExecutiveSummary"
|
||
},
|
||
"FixSuggestionResponse": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"vuln_id": {
|
||
"type": "integer",
|
||
"title": "Vuln Id"
|
||
},
|
||
"upgrade_version": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Upgrade Version"
|
||
},
|
||
"alternative_component": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Alternative Component"
|
||
},
|
||
"patch_url": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Patch Url"
|
||
},
|
||
"complexity": {
|
||
"type": "string",
|
||
"title": "Complexity"
|
||
},
|
||
"suggestion_text": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Suggestion Text"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"vuln_id",
|
||
"complexity"
|
||
],
|
||
"title": "FixSuggestionResponse"
|
||
},
|
||
"HTTPValidationError": {
|
||
"properties": {
|
||
"detail": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/ValidationError"
|
||
},
|
||
"type": "array",
|
||
"title": "Detail"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"title": "HTTPValidationError"
|
||
},
|
||
"NexusConfigRequest": {
|
||
"properties": {
|
||
"url": {
|
||
"type": "string",
|
||
"title": "Url",
|
||
"description": "Nexus Repository URL"
|
||
},
|
||
"username": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Username",
|
||
"description": "Nexus username"
|
||
},
|
||
"password": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Password",
|
||
"description": "Nexus password"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"url"
|
||
],
|
||
"title": "NexusConfigRequest"
|
||
},
|
||
"NexusConfigResponse": {
|
||
"properties": {
|
||
"url": {
|
||
"type": "string",
|
||
"title": "Url"
|
||
},
|
||
"username": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Username"
|
||
},
|
||
"has_password": {
|
||
"type": "boolean",
|
||
"title": "Has Password",
|
||
"default": false
|
||
},
|
||
"configured": {
|
||
"type": "boolean",
|
||
"title": "Configured",
|
||
"default": false
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"url"
|
||
],
|
||
"title": "NexusConfigResponse"
|
||
},
|
||
"ReportResponse": {
|
||
"properties": {
|
||
"executive_summary": {
|
||
"$ref": "#/components/schemas/ExecutiveSummary"
|
||
},
|
||
"components": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/ComponentResponse"
|
||
},
|
||
"type": "array",
|
||
"title": "Components",
|
||
"default": []
|
||
},
|
||
"tool_usage": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/ToolUsage"
|
||
},
|
||
"type": "array",
|
||
"title": "Tool Usage",
|
||
"default": []
|
||
},
|
||
"vulnerabilities": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/VulnerabilityDetail"
|
||
},
|
||
"type": "array",
|
||
"title": "Vulnerabilities",
|
||
"default": []
|
||
},
|
||
"fix_suggestions": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/FixSuggestionResponse"
|
||
},
|
||
"type": "array",
|
||
"title": "Fix Suggestions",
|
||
"default": []
|
||
},
|
||
"severity_distribution": {
|
||
"$ref": "#/components/schemas/SeverityDistribution"
|
||
},
|
||
"tool_detection_stats": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/ToolDetectionStats"
|
||
},
|
||
"type": "array",
|
||
"title": "Tool Detection Stats",
|
||
"default": []
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"executive_summary"
|
||
],
|
||
"title": "ReportResponse"
|
||
},
|
||
"RetryRequest": {
|
||
"properties": {
|
||
"step_name": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Step Name",
|
||
"description": "Step name to retry from. If None, retry from failed step."
|
||
}
|
||
},
|
||
"type": "object",
|
||
"title": "RetryRequest"
|
||
},
|
||
"SbomRecordResponse": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"component_id": {
|
||
"type": "integer",
|
||
"title": "Component Id"
|
||
},
|
||
"tool_name": {
|
||
"type": "string",
|
||
"title": "Tool Name"
|
||
},
|
||
"format": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Format"
|
||
},
|
||
"status": {
|
||
"type": "string",
|
||
"title": "Status"
|
||
},
|
||
"error_message": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Error Message"
|
||
},
|
||
"generated_at": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Generated At"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"component_id",
|
||
"tool_name",
|
||
"status"
|
||
],
|
||
"title": "SbomRecordResponse"
|
||
},
|
||
"SeverityDistribution": {
|
||
"properties": {
|
||
"critical": {
|
||
"type": "integer",
|
||
"title": "Critical",
|
||
"default": 0
|
||
},
|
||
"high": {
|
||
"type": "integer",
|
||
"title": "High",
|
||
"default": 0
|
||
},
|
||
"medium": {
|
||
"type": "integer",
|
||
"title": "Medium",
|
||
"default": 0
|
||
},
|
||
"low": {
|
||
"type": "integer",
|
||
"title": "Low",
|
||
"default": 0
|
||
}
|
||
},
|
||
"type": "object",
|
||
"title": "SeverityDistribution"
|
||
},
|
||
"StepStatusEnum": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"running",
|
||
"completed",
|
||
"failed"
|
||
],
|
||
"title": "StepStatusEnum"
|
||
},
|
||
"TaskCreateResponse": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"project_name": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Project Name"
|
||
},
|
||
"status": {
|
||
"$ref": "#/components/schemas/TaskStatusEnum"
|
||
},
|
||
"total_components": {
|
||
"type": "integer",
|
||
"title": "Total Components"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"title": "Created At"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"status",
|
||
"total_components",
|
||
"created_at"
|
||
],
|
||
"title": "TaskCreateResponse"
|
||
},
|
||
"TaskListItem": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"project_name": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Project Name"
|
||
},
|
||
"status": {
|
||
"$ref": "#/components/schemas/TaskStatusEnum"
|
||
},
|
||
"total_components": {
|
||
"type": "integer",
|
||
"title": "Total Components"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"title": "Created At"
|
||
},
|
||
"updated_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"title": "Updated At"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"status",
|
||
"total_components",
|
||
"created_at",
|
||
"updated_at"
|
||
],
|
||
"title": "TaskListItem"
|
||
},
|
||
"TaskListResponse": {
|
||
"properties": {
|
||
"tasks": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/TaskListItem"
|
||
},
|
||
"type": "array",
|
||
"title": "Tasks"
|
||
},
|
||
"total": {
|
||
"type": "integer",
|
||
"title": "Total"
|
||
},
|
||
"page": {
|
||
"type": "integer",
|
||
"title": "Page"
|
||
},
|
||
"page_size": {
|
||
"type": "integer",
|
||
"title": "Page Size"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"tasks",
|
||
"total",
|
||
"page",
|
||
"page_size"
|
||
],
|
||
"title": "TaskListResponse"
|
||
},
|
||
"TaskStatusEnum": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"running",
|
||
"completed",
|
||
"failed"
|
||
],
|
||
"title": "TaskStatusEnum"
|
||
},
|
||
"TaskStatusResponse": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"project_name": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Project Name"
|
||
},
|
||
"status": {
|
||
"$ref": "#/components/schemas/TaskStatusEnum"
|
||
},
|
||
"current_step": {
|
||
"type": "integer",
|
||
"title": "Current Step"
|
||
},
|
||
"total_components": {
|
||
"type": "integer",
|
||
"title": "Total Components"
|
||
},
|
||
"downloaded_count": {
|
||
"type": "integer",
|
||
"title": "Downloaded Count"
|
||
},
|
||
"failed_download_count": {
|
||
"type": "integer",
|
||
"title": "Failed Download Count"
|
||
},
|
||
"error_message": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Error Message"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"title": "Created At"
|
||
},
|
||
"updated_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"title": "Updated At"
|
||
},
|
||
"steps": {
|
||
"items": {
|
||
"$ref": "#/components/schemas/WorkflowStepResponse"
|
||
},
|
||
"type": "array",
|
||
"title": "Steps",
|
||
"default": []
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"status",
|
||
"current_step",
|
||
"total_components",
|
||
"downloaded_count",
|
||
"failed_download_count",
|
||
"created_at",
|
||
"updated_at"
|
||
],
|
||
"title": "TaskStatusResponse"
|
||
},
|
||
"ToolDetectionStats": {
|
||
"properties": {
|
||
"tool_name": {
|
||
"type": "string",
|
||
"title": "Tool Name"
|
||
},
|
||
"detected_count": {
|
||
"type": "integer",
|
||
"title": "Detected Count"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"tool_name",
|
||
"detected_count"
|
||
],
|
||
"title": "ToolDetectionStats"
|
||
},
|
||
"ToolUsage": {
|
||
"properties": {
|
||
"tool_name": {
|
||
"type": "string",
|
||
"title": "Tool Name"
|
||
},
|
||
"total_runs": {
|
||
"type": "integer",
|
||
"title": "Total Runs"
|
||
},
|
||
"successful": {
|
||
"type": "integer",
|
||
"title": "Successful"
|
||
},
|
||
"failed": {
|
||
"type": "integer",
|
||
"title": "Failed"
|
||
},
|
||
"components": {
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"type": "array",
|
||
"title": "Components",
|
||
"default": []
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"tool_name",
|
||
"total_runs",
|
||
"successful",
|
||
"failed"
|
||
],
|
||
"title": "ToolUsage"
|
||
},
|
||
"ValidationError": {
|
||
"properties": {
|
||
"loc": {
|
||
"items": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "integer"
|
||
}
|
||
]
|
||
},
|
||
"type": "array",
|
||
"title": "Location"
|
||
},
|
||
"msg": {
|
||
"type": "string",
|
||
"title": "Message"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"title": "Error Type"
|
||
},
|
||
"input": {
|
||
"title": "Input"
|
||
},
|
||
"ctx": {
|
||
"type": "object",
|
||
"title": "Context"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"loc",
|
||
"msg",
|
||
"type"
|
||
],
|
||
"title": "ValidationError"
|
||
},
|
||
"VulnerabilityDetail": {
|
||
"properties": {
|
||
"cve_id": {
|
||
"type": "string",
|
||
"title": "Cve Id"
|
||
},
|
||
"title": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Title"
|
||
},
|
||
"description": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Description"
|
||
},
|
||
"severity": {
|
||
"type": "string",
|
||
"title": "Severity"
|
||
},
|
||
"cvss_score": {
|
||
"anyOf": [
|
||
{
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Cvss Score"
|
||
},
|
||
"detected_tools": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Detected Tools"
|
||
},
|
||
"published_date": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Published Date"
|
||
},
|
||
"component_name": {
|
||
"type": "string",
|
||
"title": "Component Name"
|
||
},
|
||
"component_version": {
|
||
"type": "string",
|
||
"title": "Component Version"
|
||
},
|
||
"fix_suggestion": {
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/components/schemas/FixSuggestionResponse"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"cve_id",
|
||
"severity",
|
||
"component_name",
|
||
"component_version"
|
||
],
|
||
"title": "VulnerabilityDetail"
|
||
},
|
||
"WorkflowStepResponse": {
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"title": "Id"
|
||
},
|
||
"step_name": {
|
||
"type": "string",
|
||
"title": "Step Name"
|
||
},
|
||
"status": {
|
||
"$ref": "#/components/schemas/StepStatusEnum"
|
||
},
|
||
"started_at": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Started At"
|
||
},
|
||
"completed_at": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Completed At"
|
||
},
|
||
"error_message": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Error Message"
|
||
},
|
||
"step_metadata": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"title": "Step Metadata"
|
||
}
|
||
},
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"step_name",
|
||
"status"
|
||
],
|
||
"title": "WorkflowStepResponse"
|
||
}
|
||
}
|
||
}
|
||
} |