feat: add backend for jfrog xray support (#11829)

This commit is contained in:
Jon Ayers
2024-01-29 19:30:02 -06:00
committed by GitHub
parent 46d92dac57
commit 4f5a2f0a9b
25 changed files with 944 additions and 2 deletions
+103
View File
@@ -1182,6 +1182,84 @@ const docTemplate = `{
}
}
},
"/integrations/jfrog/xray-scan": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Enterprise"
],
"summary": "Get JFrog XRay scan by workspace agent ID.",
"operationId": "get-jfrog-xray-scan-by-workspace-agent-id",
"parameters": [
{
"type": "string",
"description": "Workspace ID",
"name": "workspace_id",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Agent ID",
"name": "agent_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.JFrogXrayScan"
}
}
}
},
"post": {
"security": [
{
"CoderSessionToken": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Enterprise"
],
"summary": "Post JFrog XRay scan by workspace agent ID.",
"operationId": "post-jfrog-xray-scan-by-workspace-agent-id",
"parameters": [
{
"description": "Post JFrog XRay scan request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/codersdk.JFrogXrayScan"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.Response"
}
}
}
}
},
"/licenses": {
"get": {
"security": [
@@ -9581,6 +9659,31 @@ const docTemplate = `{
}
}
},
"codersdk.JFrogXrayScan": {
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"format": "uuid"
},
"critical": {
"type": "integer"
},
"high": {
"type": "integer"
},
"medium": {
"type": "integer"
},
"results_url": {
"type": "string"
},
"workspace_id": {
"type": "string",
"format": "uuid"
}
}
},
"codersdk.JobErrorCode": {
"type": "string",
"enum": [