From fe92f09233e66a382406862d1bcc077899060c6c Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Fri, 13 Sep 2024 15:20:53 +0530 Subject: [PATCH 1/9] added: changes for spot security public rest api's --- .../security/v1/parameters/assetId_query.yaml | 10 +++ .../v1/parameters/assetType_query.yaml | 11 +++ .../security/v1/parameters/cloud_query.yaml | 5 ++ .../v1/parameters/complianceName_path.yaml | 9 +++ .../v1/parameters/complianceName_query.yaml | 11 +++ .../v1/parameters/controlId_path.yaml | 9 +++ .../v1/parameters/controlId_query.yaml | 11 +++ .../v1/parameters/excludeAccounts_query.yaml | 12 +++ .../v1/parameters/includeAccounts_query.yaml | 12 +++ .../v1/parameters/pageSize_query.yaml | 11 +++ .../v1/parameters/pageToken_query.yaml | 9 +++ .../security/v1/parameters/region_query.yaml | 11 +++ .../security/v1/parameters/ruleName_path.yaml | 8 ++ .../v1/parameters/ruleName_query.yaml | 10 +++ .../v1/parameters/services_query.yaml | 11 +++ .../security/v1/paths/complianceName.yaml | 27 +++++++ .../security/v1/paths/compliances.yaml | 33 ++++++++ api/services/security/v1/paths/controlId.yaml | 28 +++++++ api/services/security/v1/paths/controls.yaml | 35 ++++++++ .../security/v1/paths/controls_count.yaml | 27 +++++++ api/services/security/v1/paths/count.yaml | 20 +++++ .../security/v1/paths/misconfigurations.yaml | 36 +++++++++ .../v1/paths/misconfigurations_count.yaml | 34 ++++++++ api/services/security/v1/paths/ruleName.yaml | 31 +++++++ api/services/security/v1/paths/rules.yaml | 38 +++++++++ .../security/v1/paths/rules_count.yaml | 36 +++++++++ .../BaseResponse_ComplianceModel_.yaml | 17 ++++ .../schemas/BaseResponse_ControlModel_.yaml | 17 ++++ .../v1/schemas/BaseResponse_CountModel_.yaml | 17 ++++ .../v1/schemas/BaseResponse_RulesModel_.yaml | 17 ++++ .../security/v1/schemas/CloudProvider.yaml | 6 ++ .../security/v1/schemas/ComplianceModel.yaml | 11 +++ .../security/v1/schemas/ControlModel.yaml | 16 ++++ .../security/v1/schemas/CountModel.yaml | 9 +++ api/services/security/v1/schemas/Effort.yaml | 7 ++ .../v1/schemas/HTTPValidationError.yaml | 8 ++ .../v1/schemas/MisconfigurationModel.yaml | 18 +++++ .../v1/schemas/MisconfigurationWhatModel.yaml | 44 ++++++++++ .../v1/schemas/MisconfigurationWhenModel.yaml | 9 +++ .../schemas/MisconfigurationWhereModel.yaml | 62 ++++++++++++++ .../PaginatedResponse_ComplianceModel_.yaml | 44 ++++++++++ .../PaginatedResponse_ControlModel_.yaml | 44 ++++++++++ ...inatedResponse_MisconfigurationModel_.yaml | 44 ++++++++++ .../PaginatedResponse_RulesModel_.yaml | 44 ++++++++++ .../security/v1/schemas/RulesModel.yaml | 80 +++++++++++++++++++ .../security/v1/schemas/Severity.yaml | 7 ++ .../security/v1/schemas/ValidationError.yaml | 20 +++++ api/spot.yaml | 26 ++++++ 48 files changed, 1062 insertions(+) create mode 100644 api/services/security/v1/parameters/assetId_query.yaml create mode 100644 api/services/security/v1/parameters/assetType_query.yaml create mode 100644 api/services/security/v1/parameters/cloud_query.yaml create mode 100644 api/services/security/v1/parameters/complianceName_path.yaml create mode 100644 api/services/security/v1/parameters/complianceName_query.yaml create mode 100644 api/services/security/v1/parameters/controlId_path.yaml create mode 100644 api/services/security/v1/parameters/controlId_query.yaml create mode 100644 api/services/security/v1/parameters/excludeAccounts_query.yaml create mode 100644 api/services/security/v1/parameters/includeAccounts_query.yaml create mode 100644 api/services/security/v1/parameters/pageSize_query.yaml create mode 100644 api/services/security/v1/parameters/pageToken_query.yaml create mode 100644 api/services/security/v1/parameters/region_query.yaml create mode 100644 api/services/security/v1/parameters/ruleName_path.yaml create mode 100644 api/services/security/v1/parameters/ruleName_query.yaml create mode 100644 api/services/security/v1/parameters/services_query.yaml create mode 100644 api/services/security/v1/paths/complianceName.yaml create mode 100644 api/services/security/v1/paths/compliances.yaml create mode 100644 api/services/security/v1/paths/controlId.yaml create mode 100644 api/services/security/v1/paths/controls.yaml create mode 100644 api/services/security/v1/paths/controls_count.yaml create mode 100644 api/services/security/v1/paths/count.yaml create mode 100644 api/services/security/v1/paths/misconfigurations.yaml create mode 100644 api/services/security/v1/paths/misconfigurations_count.yaml create mode 100644 api/services/security/v1/paths/ruleName.yaml create mode 100644 api/services/security/v1/paths/rules.yaml create mode 100644 api/services/security/v1/paths/rules_count.yaml create mode 100644 api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml create mode 100644 api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml create mode 100644 api/services/security/v1/schemas/BaseResponse_CountModel_.yaml create mode 100644 api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml create mode 100644 api/services/security/v1/schemas/CloudProvider.yaml create mode 100644 api/services/security/v1/schemas/ComplianceModel.yaml create mode 100644 api/services/security/v1/schemas/ControlModel.yaml create mode 100644 api/services/security/v1/schemas/CountModel.yaml create mode 100644 api/services/security/v1/schemas/Effort.yaml create mode 100644 api/services/security/v1/schemas/HTTPValidationError.yaml create mode 100644 api/services/security/v1/schemas/MisconfigurationModel.yaml create mode 100644 api/services/security/v1/schemas/MisconfigurationWhatModel.yaml create mode 100644 api/services/security/v1/schemas/MisconfigurationWhenModel.yaml create mode 100644 api/services/security/v1/schemas/MisconfigurationWhereModel.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml create mode 100644 api/services/security/v1/schemas/RulesModel.yaml create mode 100644 api/services/security/v1/schemas/Severity.yaml create mode 100644 api/services/security/v1/schemas/ValidationError.yaml diff --git a/api/services/security/v1/parameters/assetId_query.yaml b/api/services/security/v1/parameters/assetId_query.yaml new file mode 100644 index 000000000..2aebf4ee5 --- /dev/null +++ b/api/services/security/v1/parameters/assetId_query.yaml @@ -0,0 +1,10 @@ +description: An id to identify the asset. It represents a cloud resource. +in: query +name: assetId +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: An id to identify the asset. It represents a cloud resource. + title: Assetid diff --git a/api/services/security/v1/parameters/assetType_query.yaml b/api/services/security/v1/parameters/assetType_query.yaml new file mode 100644 index 000000000..0f00176f6 --- /dev/null +++ b/api/services/security/v1/parameters/assetType_query.yaml @@ -0,0 +1,11 @@ +description: The type of cloud resource for the service. +example: security_groups +in: query +name: assetType +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: The type of cloud resource for the service. + title: Assettype diff --git a/api/services/security/v1/parameters/cloud_query.yaml b/api/services/security/v1/parameters/cloud_query.yaml new file mode 100644 index 000000000..67f1f324a --- /dev/null +++ b/api/services/security/v1/parameters/cloud_query.yaml @@ -0,0 +1,5 @@ +in: query +name: cloud +required: true +schema: + $ref: "../schemas/CloudProvider.yaml" diff --git a/api/services/security/v1/parameters/complianceName_path.yaml b/api/services/security/v1/parameters/complianceName_path.yaml new file mode 100644 index 000000000..d89491246 --- /dev/null +++ b/api/services/security/v1/parameters/complianceName_path.yaml @@ -0,0 +1,9 @@ +description: The name of the cyber security compliance. +example: SOC_2 +in: path +name: complianceName +required: true +schema: + description: The name of the cyber security compliance. + title: Compliancename + type: string diff --git a/api/services/security/v1/parameters/complianceName_query.yaml b/api/services/security/v1/parameters/complianceName_query.yaml new file mode 100644 index 000000000..c85fdcc1f --- /dev/null +++ b/api/services/security/v1/parameters/complianceName_query.yaml @@ -0,0 +1,11 @@ +description: The name of the cyber security compliance. +example: SOC_2 +in: query +name: complianceName +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: The name of the cyber security compliance. + title: Compliancename diff --git a/api/services/security/v1/parameters/controlId_path.yaml b/api/services/security/v1/parameters/controlId_path.yaml new file mode 100644 index 000000000..857d33f9b --- /dev/null +++ b/api/services/security/v1/parameters/controlId_path.yaml @@ -0,0 +1,9 @@ +description: The id of the control defined in the compliance. +example: A1.2 +in: path +name: controlId +required: true +schema: + description: The id of the control defined in the compliance. + title: Controlid + type: string diff --git a/api/services/security/v1/parameters/controlId_query.yaml b/api/services/security/v1/parameters/controlId_query.yaml new file mode 100644 index 000000000..53930efea --- /dev/null +++ b/api/services/security/v1/parameters/controlId_query.yaml @@ -0,0 +1,11 @@ +description: The id of the control defined in the compliance. +example: A1.2 +in: query +name: controlId +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: The id of the control defined in the compliance. + title: Controlid diff --git a/api/services/security/v1/parameters/excludeAccounts_query.yaml b/api/services/security/v1/parameters/excludeAccounts_query.yaml new file mode 100644 index 000000000..ce04d9725 --- /dev/null +++ b/api/services/security/v1/parameters/excludeAccounts_query.yaml @@ -0,0 +1,12 @@ +description: Comma separated AWS account ids or Azure subscription ids to exclude. + Upto a max of 10 values. +in: query +name: excludeAccounts +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: Comma separated AWS account ids or Azure subscription ids to exclude. + Upto a max of 10 values. + title: Excludeaccounts diff --git a/api/services/security/v1/parameters/includeAccounts_query.yaml b/api/services/security/v1/parameters/includeAccounts_query.yaml new file mode 100644 index 000000000..c4b86b27c --- /dev/null +++ b/api/services/security/v1/parameters/includeAccounts_query.yaml @@ -0,0 +1,12 @@ +description: Comma separated AWS account ids or Azure subscription ids to include. + Upto a max of 10 values. +in: query +name: includeAccounts +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: Comma separated AWS account ids or Azure subscription ids to include. + Upto a max of 10 values. + title: Includeaccounts diff --git a/api/services/security/v1/parameters/pageSize_query.yaml b/api/services/security/v1/parameters/pageSize_query.yaml new file mode 100644 index 000000000..626eb07a7 --- /dev/null +++ b/api/services/security/v1/parameters/pageSize_query.yaml @@ -0,0 +1,11 @@ +description: Number of items to return per page. +in: query +name: pageSize +required: false +schema: + default: 100 + description: Number of items to return per page. + maximum: 100 + minimum: 1 + title: Pagesize + type: integer diff --git a/api/services/security/v1/parameters/pageToken_query.yaml b/api/services/security/v1/parameters/pageToken_query.yaml new file mode 100644 index 000000000..e83e4ec9d --- /dev/null +++ b/api/services/security/v1/parameters/pageToken_query.yaml @@ -0,0 +1,9 @@ +description: Token of the page to return. +in: query +name: pageToken +required: false +schema: + default: '1' + description: Token of the page to return. + title: Pagetoken + type: string diff --git a/api/services/security/v1/parameters/region_query.yaml b/api/services/security/v1/parameters/region_query.yaml new file mode 100644 index 000000000..1463478ea --- /dev/null +++ b/api/services/security/v1/parameters/region_query.yaml @@ -0,0 +1,11 @@ +description: The cloud region. +example: us-east-1 +in: query +name: region +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: The cloud region. + title: Region diff --git a/api/services/security/v1/parameters/ruleName_path.yaml b/api/services/security/v1/parameters/ruleName_path.yaml new file mode 100644 index 000000000..4dc9b4989 --- /dev/null +++ b/api/services/security/v1/parameters/ruleName_path.yaml @@ -0,0 +1,8 @@ +description: An unique name of the rule. +in: path +name: ruleName +required: true +schema: + description: An unique name of the rule. + title: Rulename + type: string diff --git a/api/services/security/v1/parameters/ruleName_query.yaml b/api/services/security/v1/parameters/ruleName_query.yaml new file mode 100644 index 000000000..1e409b7c3 --- /dev/null +++ b/api/services/security/v1/parameters/ruleName_query.yaml @@ -0,0 +1,10 @@ +description: An unique name of the rule. +in: query +name: ruleName +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: An unique name of the rule. + title: Rulename diff --git a/api/services/security/v1/parameters/services_query.yaml b/api/services/security/v1/parameters/services_query.yaml new file mode 100644 index 000000000..9a6212a71 --- /dev/null +++ b/api/services/security/v1/parameters/services_query.yaml @@ -0,0 +1,11 @@ +description: A comma separated list of cloud services. +example: ec2,s3,rds +in: query +name: services +required: false +schema: + anyOf: + - type: string + - type: 'null' + description: A comma separated list of cloud services. + title: Services diff --git a/api/services/security/v1/paths/complianceName.yaml b/api/services/security/v1/paths/complianceName.yaml new file mode 100644 index 000000000..b3dfc3bda --- /dev/null +++ b/api/services/security/v1/paths/complianceName.yaml @@ -0,0 +1,27 @@ +get: + description: Get details about a specific compliance. + operationId: get_compliance_v1_compliances__complianceName__get + parameters: + - $ref: "../parameters/complianceName_path.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_ComplianceModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliance + tags: + - Compliance +parameters: [] diff --git a/api/services/security/v1/paths/compliances.yaml b/api/services/security/v1/paths/compliances.yaml new file mode 100644 index 000000000..e50b5eaaa --- /dev/null +++ b/api/services/security/v1/paths/compliances.yaml @@ -0,0 +1,33 @@ +get: + description: 'A cyber security compliance determines how compliant each asset is, + against specific security standards. + + This API returns list of all compliances supported in the product. + + A compliance consists of one or more controls.' + operationId: get_compliances_v1_compliances_get + parameters: + - $ref: "../parameters/pageToken_query.yaml" + - $ref: "../parameters/pageSize_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/PaginatedResponse_ComplianceModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliances + tags: + - Compliance +parameters: [] diff --git a/api/services/security/v1/paths/controlId.yaml b/api/services/security/v1/paths/controlId.yaml new file mode 100644 index 000000000..11ced564a --- /dev/null +++ b/api/services/security/v1/paths/controlId.yaml @@ -0,0 +1,28 @@ +get: + description: Get details about a specific control. + operationId: get_compliance_control_v1_compliances__complianceName__controls__controlId__get + parameters: + - $ref: "../parameters/complianceName_path.yaml" + - $ref: "../parameters/controlId_path.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_ControlModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliance Control + tags: + - Compliance +parameters: [] diff --git a/api/services/security/v1/paths/controls.yaml b/api/services/security/v1/paths/controls.yaml new file mode 100644 index 000000000..e65e2e063 --- /dev/null +++ b/api/services/security/v1/paths/controls.yaml @@ -0,0 +1,35 @@ +get: + description: 'A control represents countermeasures to avoid, detect, counteract, + or minimize security risks of cloud assets. + + A control may be part of one or more compliance. A control is verified in through + one or more rules. + + This API returns the list of controls mapped to a specific compliance.' + operationId: get_compliance_controls_v1_compliances__complianceName__controls_get + parameters: + - $ref: "../parameters/complianceName_path.yaml" + - $ref: "../parameters/pageToken_query.yaml" + - $ref: "../parameters/pageSize_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/PaginatedResponse_ControlModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliance Controls + tags: + - Compliance +parameters: [] diff --git a/api/services/security/v1/paths/controls_count.yaml b/api/services/security/v1/paths/controls_count.yaml new file mode 100644 index 000000000..c007d7897 --- /dev/null +++ b/api/services/security/v1/paths/controls_count.yaml @@ -0,0 +1,27 @@ +get: + description: Get the total number of controls for the given compliance. + operationId: get_compliance_controls_count_v1_compliances__complianceName__controls_count_get + parameters: + - $ref: "../parameters/complianceName_path.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_CountModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliance Controls Count + tags: + - Compliance +parameters: [] diff --git a/api/services/security/v1/paths/count.yaml b/api/services/security/v1/paths/count.yaml new file mode 100644 index 000000000..cb17597a6 --- /dev/null +++ b/api/services/security/v1/paths/count.yaml @@ -0,0 +1,20 @@ +get: + description: Get the total number of compliances. + operationId: get_compliance_count_v1_compliances_count_get + parameters: [] + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_CountModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + summary: Get Compliance Count + tags: + - Compliance +parameters: [] diff --git a/api/services/security/v1/paths/misconfigurations.yaml b/api/services/security/v1/paths/misconfigurations.yaml new file mode 100644 index 000000000..a7656138b --- /dev/null +++ b/api/services/security/v1/paths/misconfigurations.yaml @@ -0,0 +1,36 @@ +get: + description: This API returns the list of assets that have one or more misconfiguration. + operationId: get_misconfigurations_v1_misconfigurations_get + parameters: + - $ref: "../parameters/cloud_query.yaml" + - $ref: "../parameters/ruleName_query.yaml" + - $ref: "../parameters/includeAccounts_query.yaml" + - $ref: "../parameters/excludeAccounts_query.yaml" + - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/region_query.yaml" + - $ref: "../parameters/assetType_query.yaml" + - $ref: "../parameters/assetId_query.yaml" + - $ref: "../parameters/pageToken_query.yaml" + - $ref: "../parameters/pageSize_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/PaginatedResponse_MisconfigurationModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Misconfigurations + tags: + - Misconfiguration +parameters: [] diff --git a/api/services/security/v1/paths/misconfigurations_count.yaml b/api/services/security/v1/paths/misconfigurations_count.yaml new file mode 100644 index 000000000..63221dc22 --- /dev/null +++ b/api/services/security/v1/paths/misconfigurations_count.yaml @@ -0,0 +1,34 @@ +get: + description: This API returns the list of count assets that are misconfigured. + operationId: get_misconfigurations_count_v1_misconfigurations_count_get + parameters: + - $ref: "../parameters/cloud_query.yaml" + - $ref: "../parameters/ruleName_query.yaml" + - $ref: "../parameters/includeAccounts_query.yaml" + - $ref: "../parameters/excludeAccounts_query.yaml" + - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/region_query.yaml" + - $ref: "../parameters/assetType_query.yaml" + - $ref: "../parameters/assetId_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_CountModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Misconfigurations Count + tags: + - Misconfiguration +parameters: [] diff --git a/api/services/security/v1/paths/ruleName.yaml b/api/services/security/v1/paths/ruleName.yaml new file mode 100644 index 000000000..10562e6ba --- /dev/null +++ b/api/services/security/v1/paths/ruleName.yaml @@ -0,0 +1,31 @@ +get: + description: Get details about a specific rule. + operationId: get_compliance_controls_rule_v1_misconfigurations_rules__ruleName__get + parameters: + - $ref: "../parameters/ruleName_path.yaml" + - $ref: "../parameters/cloud_query.yaml" + - $ref: "../parameters/complianceName_query.yaml" + - $ref: "../parameters/controlId_query.yaml" + - $ref: "../parameters/services_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_RulesModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliance Controls Rule + tags: + - Misconfiguration +parameters: [] diff --git a/api/services/security/v1/paths/rules.yaml b/api/services/security/v1/paths/rules.yaml new file mode 100644 index 000000000..74d4e0d6c --- /dev/null +++ b/api/services/security/v1/paths/rules.yaml @@ -0,0 +1,38 @@ +get: + description: 'Rules represent configuration checks that detect misconfiguration + in your cloud environment. + + Rules are cloud vendor specific. A rule is mapped to one or more controls. + + This API returns the list of rules that can determine the state of a specific + control.' + operationId: get_rules_v1_misconfigurations_rules_get + parameters: + - $ref: "../parameters/cloud_query.yaml" + - $ref: "../parameters/complianceName_query.yaml" + - $ref: "../parameters/controlId_query.yaml" + - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/pageToken_query.yaml" + - $ref: "../parameters/pageSize_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/PaginatedResponse_RulesModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Rules + tags: + - Misconfiguration +parameters: [] diff --git a/api/services/security/v1/paths/rules_count.yaml b/api/services/security/v1/paths/rules_count.yaml new file mode 100644 index 000000000..ed09fd9f1 --- /dev/null +++ b/api/services/security/v1/paths/rules_count.yaml @@ -0,0 +1,36 @@ +get: + description: 'Rules represent configuration checks that detect misconfiguration + in your cloud environment. + + Rules are cloud vendor specific. A rule is mapped to one or more controls. + + This API returns the list of rules that can determine the state of a specific + control.' + operationId: get_compliance_controls_rules_count_v1_misconfigurations_rules_count_get + parameters: + - $ref: "../parameters/cloud_query.yaml" + - $ref: "../parameters/complianceName_query.yaml" + - $ref: "../parameters/controlId_query.yaml" + - $ref: "../parameters/services_query.yaml" + responses: + '200': + content: + application/json: + schema: + $ref: "../schemas/BaseResponse_CountModel_.yaml" + description: Successful Response + '400': + content: {} + description: Bad Request + '404': + description: Not found + '422': + content: + application/json: + schema: + $ref: "../schemas/HTTPValidationError.yaml" + description: Validation Error + summary: Get Compliance Controls Rules Count + tags: + - Misconfiguration +parameters: [] diff --git a/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml b/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml new file mode 100644 index 000000000..082f5ed72 --- /dev/null +++ b/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml @@ -0,0 +1,17 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./ComplianceModel.yaml + title: Items + type: array +required: +- items +title: BaseResponse[ComplianceModel] +type: object diff --git a/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml b/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml new file mode 100644 index 000000000..ff1b06771 --- /dev/null +++ b/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml @@ -0,0 +1,17 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./ControlModel.yaml + title: Items + type: array +required: +- items +title: BaseResponse[ControlModel] +type: object diff --git a/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml b/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml new file mode 100644 index 000000000..e577b47ef --- /dev/null +++ b/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml @@ -0,0 +1,17 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./CountModel.yaml + title: Items + type: array +required: +- items +title: BaseResponse[CountModel] +type: object diff --git a/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml b/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml new file mode 100644 index 000000000..9fbc75adf --- /dev/null +++ b/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml @@ -0,0 +1,17 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./RulesModel.yaml + title: Items + type: array +required: +- items +title: BaseResponse[RulesModel] +type: object diff --git a/api/services/security/v1/schemas/CloudProvider.yaml b/api/services/security/v1/schemas/CloudProvider.yaml new file mode 100644 index 000000000..187e1baa3 --- /dev/null +++ b/api/services/security/v1/schemas/CloudProvider.yaml @@ -0,0 +1,6 @@ +description: Enumeration of supported cloud providers. +enum: +- aws +- azure +title: CloudProvider +type: string diff --git a/api/services/security/v1/schemas/ComplianceModel.yaml b/api/services/security/v1/schemas/ComplianceModel.yaml new file mode 100644 index 000000000..752d643c1 --- /dev/null +++ b/api/services/security/v1/schemas/ComplianceModel.yaml @@ -0,0 +1,11 @@ +properties: + complianceName: + description: The name of the cyber security compliance. + examples: + - SOC_2 + title: Compliancename + type: string +required: +- complianceName +title: ComplianceModel +type: object diff --git a/api/services/security/v1/schemas/ControlModel.yaml b/api/services/security/v1/schemas/ControlModel.yaml new file mode 100644 index 000000000..52bb66a96 --- /dev/null +++ b/api/services/security/v1/schemas/ControlModel.yaml @@ -0,0 +1,16 @@ +properties: + controlId: + description: The id of the control defined in the compliance. + examples: + - A1.2 + title: Controlid + type: string + description: + description: An explanation of the object being referenced. + title: Description + type: string +required: +- controlId +- description +title: ControlModel +type: object diff --git a/api/services/security/v1/schemas/CountModel.yaml b/api/services/security/v1/schemas/CountModel.yaml new file mode 100644 index 000000000..3cba435db --- /dev/null +++ b/api/services/security/v1/schemas/CountModel.yaml @@ -0,0 +1,9 @@ +properties: + value: + description: The number of items. + title: Value + type: integer +required: +- value +title: CountModel +type: object diff --git a/api/services/security/v1/schemas/Effort.yaml b/api/services/security/v1/schemas/Effort.yaml new file mode 100644 index 000000000..862936d22 --- /dev/null +++ b/api/services/security/v1/schemas/Effort.yaml @@ -0,0 +1,7 @@ +enum: +- High +- Medium +- Low +- '' +title: Effort +type: string diff --git a/api/services/security/v1/schemas/HTTPValidationError.yaml b/api/services/security/v1/schemas/HTTPValidationError.yaml new file mode 100644 index 000000000..c788cb617 --- /dev/null +++ b/api/services/security/v1/schemas/HTTPValidationError.yaml @@ -0,0 +1,8 @@ +properties: + detail: + items: + $ref: ./ValidationError.yaml + title: Detail + type: array +title: HTTPValidationError +type: object diff --git a/api/services/security/v1/schemas/MisconfigurationModel.yaml b/api/services/security/v1/schemas/MisconfigurationModel.yaml new file mode 100644 index 000000000..3359a8bd9 --- /dev/null +++ b/api/services/security/v1/schemas/MisconfigurationModel.yaml @@ -0,0 +1,18 @@ +properties: + organizationId: + description: The Spot Organization Id. + title: Organizationid + type: string + what: + $ref: ./MisconfigurationWhatModel.yaml + when: + $ref: ./MisconfigurationWhenModel.yaml + where: + $ref: ./MisconfigurationWhereModel.yaml +required: +- organizationId +- when +- what +- where +title: MisconfigurationModel +type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml new file mode 100644 index 000000000..39d569d6e --- /dev/null +++ b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml @@ -0,0 +1,44 @@ +properties: + args: + anyOf: + - items: + type: string + type: array + - type: 'null' + description: 'Certain misconfiguration rules have arguments. This field contains + the arguments in the form of an comma separated array. Example: ["MongoDB", + "TCP", "27017"]' + title: Args + ruleDescription: + description: Describes the rule. + title: Ruledescription + type: string + ruleName: + description: An unique name of the rule. + title: Rulename + type: string + ruleTitle: + description: A user friendly representation of the rule name + title: Ruletitle + type: string + severity: + description: The severity of the rule. + examples: + - High + title: Severity + type: string + state: + description: The state of the misconfiguration. It is either open or closed. + examples: + - open + title: State + type: string +required: +- ruleName +- ruleTitle +- ruleDescription +- args +- severity +- state +title: MisconfigurationWhatModel +type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml new file mode 100644 index 000000000..06fe37b24 --- /dev/null +++ b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml @@ -0,0 +1,9 @@ +properties: + lastSeen: + description: The date when the finding was last seen. + title: Lastseen + type: string +required: +- lastSeen +title: MisconfigurationWhenModel +type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml new file mode 100644 index 000000000..17d90821e --- /dev/null +++ b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml @@ -0,0 +1,62 @@ +properties: + accountId: + description: The cloud account id. For AWS this is the account id. For Azure, + this is the subscription id. + title: Accountid + type: string + assetId: + anyOf: + - type: string + - type: 'null' + description: An id to identify the asset. It represents a cloud resource. + title: Assetid + assetName: + anyOf: + - type: string + - type: 'null' + description: A user friendly representation of the asset id. + title: Assetname + assetType: + anyOf: + - type: string + - type: 'null' + description: The type of cloud resource for the service. + examples: + - security_groups + title: Assettype + item: + anyOf: + - type: string + - type: 'null' + description: 'Identifies an entity of the asset. Example: An asset of type security_groups + may have more than one rule. Each such rule is an item.' + title: Item + itemName: + anyOf: + - type: string + - type: 'null' + description: A user friendly representation of the item. + title: Itemname + region: + description: The cloud region. + examples: + - us-east-1 + title: Region + type: string + service: + description: The cloud service. + examples: + - EC2 + title: Service + type: string +required: +- accountId +- service +- assetId +- assetName +- assetType +- region +- item +- itemName +title: MisconfigurationWhereModel +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml new file mode 100644 index 000000000..730152d02 --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml @@ -0,0 +1,44 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + currentToken: + anyOf: + - type: string + - type: 'null' + description: 'The current page token. Note: this is an opaque string field. Do + not increment/decrement it arithmetically.' + title: Currenttoken + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./ComplianceModel.yaml + title: Items + type: array + nextToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the next page of results. Note: this is an opaque string + field. Do not increment/decrement it arithmetically.' + title: Nexttoken + pageSize: + description: The maximum number of items in the page. The attribute 'item' indicates + the actual number of items in the page. + title: Pagesize + type: integer + previousToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the previous page of results. Note: this is an opaque + string field. Do not increment/decrement it arithmetically.' + title: Previoustoken +required: +- items +- pageSize +title: PaginatedResponse[ComplianceModel] +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml new file mode 100644 index 000000000..00d8c9d37 --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml @@ -0,0 +1,44 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + currentToken: + anyOf: + - type: string + - type: 'null' + description: 'The current page token. Note: this is an opaque string field. Do + not increment/decrement it arithmetically.' + title: Currenttoken + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./ControlModel.yaml + title: Items + type: array + nextToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the next page of results. Note: this is an opaque string + field. Do not increment/decrement it arithmetically.' + title: Nexttoken + pageSize: + description: The maximum number of items in the page. The attribute 'item' indicates + the actual number of items in the page. + title: Pagesize + type: integer + previousToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the previous page of results. Note: this is an opaque + string field. Do not increment/decrement it arithmetically.' + title: Previoustoken +required: +- items +- pageSize +title: PaginatedResponse[ControlModel] +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml new file mode 100644 index 000000000..93fa7fceb --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml @@ -0,0 +1,44 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + currentToken: + anyOf: + - type: string + - type: 'null' + description: 'The current page token. Note: this is an opaque string field. Do + not increment/decrement it arithmetically.' + title: Currenttoken + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./MisconfigurationModel.yaml + title: Items + type: array + nextToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the next page of results. Note: this is an opaque string + field. Do not increment/decrement it arithmetically.' + title: Nexttoken + pageSize: + description: The maximum number of items in the page. The attribute 'item' indicates + the actual number of items in the page. + title: Pagesize + type: integer + previousToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the previous page of results. Note: this is an opaque + string field. Do not increment/decrement it arithmetically.' + title: Previoustoken +required: +- items +- pageSize +title: PaginatedResponse[MisconfigurationModel] +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml new file mode 100644 index 000000000..c3789e7d1 --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml @@ -0,0 +1,44 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + currentToken: + anyOf: + - type: string + - type: 'null' + description: 'The current page token. Note: this is an opaque string field. Do + not increment/decrement it arithmetically.' + title: Currenttoken + items: + description: An array of objects in this response, the length of which is defined + by the attribute named 'count' + items: + $ref: ./RulesModel.yaml + title: Items + type: array + nextToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the next page of results. Note: this is an opaque string + field. Do not increment/decrement it arithmetically.' + title: Nexttoken + pageSize: + description: The maximum number of items in the page. The attribute 'item' indicates + the actual number of items in the page. + title: Pagesize + type: integer + previousToken: + anyOf: + - type: string + - type: 'null' + description: 'Token for the previous page of results. Note: this is an opaque + string field. Do not increment/decrement it arithmetically.' + title: Previoustoken +required: +- items +- pageSize +title: PaginatedResponse[RulesModel] +type: object diff --git a/api/services/security/v1/schemas/RulesModel.yaml b/api/services/security/v1/schemas/RulesModel.yaml new file mode 100644 index 000000000..57d16d7f6 --- /dev/null +++ b/api/services/security/v1/schemas/RulesModel.yaml @@ -0,0 +1,80 @@ +properties: + args: + anyOf: + - items: + type: string + type: array + - type: 'null' + description: 'Certain misconfiguration rules have arguments. This field contains + the arguments in the form of an comma separated array. Example: ["MongoDB", + "TCP", "27017"]' + title: Args + cloud: + description: The name of the cloud. + examples: + - aws + title: Cloud + type: string + complianceName: + anyOf: + - items: + type: string + type: array + - type: 'null' + description: The name of the cyber security compliance. + title: Compliancename + controls: + anyOf: + - items: + additionalProperties: + type: string + type: object + type: array + - type: 'null' + description: The id of the control defined in the compliance. + title: Controls + description: + description: Describes the rule. + title: Description + type: string + effort: + anyOf: + - $ref: ./Effort.yaml + - type: 'null' + description: The effort required to fix the finding. + examples: + - Low + ruleName: + description: An unique name of the rule. + title: Rulename + type: string + ruleTitle: + description: A user friendly representation of the rule name + title: Ruletitle + type: string + service: + description: The cloud service. + examples: + - EC2 + title: Service + type: string + severity: + anyOf: + - $ref: ./Severity.yaml + - type: 'null' + description: The severity of the rule. + examples: + - High +required: +- ruleName +- ruleTitle +- description +- cloud +- service +- args +- severity +- effort +- complianceName +- controls +title: RulesModel +type: object diff --git a/api/services/security/v1/schemas/Severity.yaml b/api/services/security/v1/schemas/Severity.yaml new file mode 100644 index 000000000..0cfdbf87f --- /dev/null +++ b/api/services/security/v1/schemas/Severity.yaml @@ -0,0 +1,7 @@ +enum: +- Critical +- High +- Medium +- Low +title: Severity +type: string diff --git a/api/services/security/v1/schemas/ValidationError.yaml b/api/services/security/v1/schemas/ValidationError.yaml new file mode 100644 index 000000000..bb8db41b6 --- /dev/null +++ b/api/services/security/v1/schemas/ValidationError.yaml @@ -0,0 +1,20 @@ +properties: + loc: + items: + anyOf: + - type: string + - type: integer + title: Location + type: array + msg: + title: Message + type: string + type: + title: Error Type + type: string +required: +- loc +- msg +- type +title: ValidationError +type: object diff --git a/api/spot.yaml b/api/spot.yaml index ccd294636..c9e897d1f 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -220,6 +220,10 @@ x-tagGroups: - Connect Targets - Connect Workflows - Connect Workspaces + - name: Spot Security + tags: + - Compliance + - Misconfiguration paths: /aws/ec2/group: @@ -921,3 +925,25 @@ paths: $ref: services/ocean/rightsizing/paths/oceanRightsizingRuleDetachment.yaml /ocean/{oceanId}/rightSizing/recommendations: $ref: services/ocean/rightsizing/paths/oceanRightsizingRecommendations.yaml + /security/v1/compliances: + $ref: services/security/v1/paths/compliances.yaml + /security/v1/compliances/count: + $ref: services/security/v1/paths/count.yaml + /security/v1/compliances/{complianceName}: + $ref: services/security/v1/paths/complianceName.yaml + /security/v1/compliances/{complianceName}/controls: + $ref: services/security/v1/paths/controls.yaml + /security/v1/compliances/{complianceName}/controls/count: + $ref: services/security/v1/paths/controls_count.yaml + /security/v1/compliances/{complianceName}/controls/{controlId}: + $ref: services/security/v1/paths/controlId.yaml + /security/v1/misconfigurations: + $ref: services/security/v1/paths/misconfigurations.yaml + /security/v1/misconfigurations/count: + $ref: services/security/v1/paths/misconfigurations_count.yaml + /security/v1/misconfigurations/rules: + $ref: services/security/v1/paths/rules.yaml + /security/v1/misconfigurations/rules/count: + $ref: services/security/v1/paths/rules_count.yaml + /security/v1/misconfigurations/rules/{ruleName}: + $ref: services/security/v1/paths/ruleName.yaml From 1d8779e51e2e1a5fb259a0ff20dd6ce0d563e4a8 Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Fri, 25 Oct 2024 16:20:50 +0530 Subject: [PATCH 2/9] added: fix for breaking PR validations --- .../security/v1/parameters/assetId_query.yaml | 4 +-- .../v1/parameters/controlId_path.yaml | 4 +-- .../v1/parameters/controlId_query.yaml | 4 +-- .../v1/parameters/excludeAccounts_query.yaml | 8 ++--- .../v1/parameters/includeAccounts_query.yaml | 8 ++--- .../v1/parameters/isAutomated_query.yaml | 8 +++++ .../v1/parameters/pageToken_query.yaml | 2 +- .../security/v1/parameters/ruleName_path.yaml | 4 +-- .../v1/parameters/ruleName_query.yaml | 4 +-- .../v1/parameters/services_query.yaml | 4 +-- .../security/v1/paths/complianceName.yaml | 2 +- .../security/v1/paths/compliances.yaml | 8 ++--- api/services/security/v1/paths/controlId.yaml | 2 +- api/services/security/v1/paths/controls.yaml | 11 +++---- .../security/v1/paths/controls_count.yaml | 5 ++-- api/services/security/v1/paths/count.yaml | 2 +- .../security/v1/paths/misconfigurations.yaml | 4 +-- .../v1/paths/misconfigurations_count.yaml | 4 +-- api/services/security/v1/paths/ruleName.yaml | 2 +- api/services/security/v1/paths/rules.yaml | 8 ++--- .../security/v1/paths/rules_count.yaml | 8 ++--- .../BaseResponse_ComplianceModel_.yaml | 4 +-- .../schemas/BaseResponse_ControlModel_.yaml | 4 +-- .../v1/schemas/BaseResponse_CountModel_.yaml | 4 +-- .../v1/schemas/BaseResponse_RulesModel_.yaml | 4 +-- .../security/v1/schemas/CloudProvider.yaml | 2 +- .../security/v1/schemas/ComplianceModel.yaml | 5 ---- .../security/v1/schemas/ControlModel.yaml | 10 ++----- .../v1/schemas/MisconfigurationModel.yaml | 5 +++- .../v1/schemas/MisconfigurationWhatModel.yaml | 17 ++++++----- .../v1/schemas/MisconfigurationWhenModel.yaml | 10 ++++++- .../schemas/MisconfigurationWhereModel.yaml | 29 +++---------------- .../v1/schemas/MisconfigurationWhoModel.yaml | 11 +++++++ .../PaginatedResponse_ComplianceModel_.yaml | 16 +++++----- .../PaginatedResponse_ControlModel_.yaml | 16 +++++----- ...inatedResponse_MisconfigurationModel_.yaml | 16 +++++----- .../PaginatedResponse_RulesModel_.yaml | 16 +++++----- .../security/v1/schemas/RulesModel.yaml | 16 +++------- 38 files changed, 144 insertions(+), 147 deletions(-) create mode 100644 api/services/security/v1/parameters/isAutomated_query.yaml create mode 100644 api/services/security/v1/schemas/MisconfigurationWhoModel.yaml diff --git a/api/services/security/v1/parameters/assetId_query.yaml b/api/services/security/v1/parameters/assetId_query.yaml index 2aebf4ee5..542cd0abc 100644 --- a/api/services/security/v1/parameters/assetId_query.yaml +++ b/api/services/security/v1/parameters/assetId_query.yaml @@ -1,4 +1,4 @@ -description: An id to identify the asset. It represents a cloud resource. +description: The asset's ID (a cloud resource). in: query name: assetId required: false @@ -6,5 +6,5 @@ schema: anyOf: - type: string - type: 'null' - description: An id to identify the asset. It represents a cloud resource. + description: The asset's ID (a cloud resource). title: Assetid diff --git a/api/services/security/v1/parameters/controlId_path.yaml b/api/services/security/v1/parameters/controlId_path.yaml index 857d33f9b..a410cdb3b 100644 --- a/api/services/security/v1/parameters/controlId_path.yaml +++ b/api/services/security/v1/parameters/controlId_path.yaml @@ -1,9 +1,9 @@ -description: The id of the control defined in the compliance. +description: The ID of the control defined in the compliance. example: A1.2 in: path name: controlId required: true schema: - description: The id of the control defined in the compliance. + description: The ID of the control defined in the compliance. title: Controlid type: string diff --git a/api/services/security/v1/parameters/controlId_query.yaml b/api/services/security/v1/parameters/controlId_query.yaml index 53930efea..26117bb01 100644 --- a/api/services/security/v1/parameters/controlId_query.yaml +++ b/api/services/security/v1/parameters/controlId_query.yaml @@ -1,4 +1,4 @@ -description: The id of the control defined in the compliance. +description: The ID of the control defined in the compliance. example: A1.2 in: query name: controlId @@ -7,5 +7,5 @@ schema: anyOf: - type: string - type: 'null' - description: The id of the control defined in the compliance. + description: The ID of the control defined in the compliance. title: Controlid diff --git a/api/services/security/v1/parameters/excludeAccounts_query.yaml b/api/services/security/v1/parameters/excludeAccounts_query.yaml index ce04d9725..1e9bef1b6 100644 --- a/api/services/security/v1/parameters/excludeAccounts_query.yaml +++ b/api/services/security/v1/parameters/excludeAccounts_query.yaml @@ -1,5 +1,5 @@ -description: Comma separated AWS account ids or Azure subscription ids to exclude. - Upto a max of 10 values. +description: Comma-separated AWS account IDs or Azure subscription IDs to exclude. + You can have up to 10 IDs. in: query name: excludeAccounts required: false @@ -7,6 +7,6 @@ schema: anyOf: - type: string - type: 'null' - description: Comma separated AWS account ids or Azure subscription ids to exclude. - Upto a max of 10 values. + description: Comma-separated AWS account IDs or Azure subscription IDs to exclude. + You can have up to 10 IDs. title: Excludeaccounts diff --git a/api/services/security/v1/parameters/includeAccounts_query.yaml b/api/services/security/v1/parameters/includeAccounts_query.yaml index c4b86b27c..908c650e3 100644 --- a/api/services/security/v1/parameters/includeAccounts_query.yaml +++ b/api/services/security/v1/parameters/includeAccounts_query.yaml @@ -1,5 +1,5 @@ -description: Comma separated AWS account ids or Azure subscription ids to include. - Upto a max of 10 values. +description: Comma-separated AWS account IDs or Azure subscription IDs to include. + You can have up to 10 IDs. in: query name: includeAccounts required: false @@ -7,6 +7,6 @@ schema: anyOf: - type: string - type: 'null' - description: Comma separated AWS account ids or Azure subscription ids to include. - Upto a max of 10 values. + description: Comma-separated AWS account IDs or Azure subscription IDs to include. + You can have up to 10 IDs. title: Includeaccounts diff --git a/api/services/security/v1/parameters/isAutomated_query.yaml b/api/services/security/v1/parameters/isAutomated_query.yaml new file mode 100644 index 000000000..9bee385b1 --- /dev/null +++ b/api/services/security/v1/parameters/isAutomated_query.yaml @@ -0,0 +1,8 @@ +description: If this is not a manual control, the value is True. +in: query +name: isAutomated +required: false +schema: + description: If this is not a manual control, the value is True. + title: Isautomated + type: boolean diff --git a/api/services/security/v1/parameters/pageToken_query.yaml b/api/services/security/v1/parameters/pageToken_query.yaml index e83e4ec9d..2ad86a89f 100644 --- a/api/services/security/v1/parameters/pageToken_query.yaml +++ b/api/services/security/v1/parameters/pageToken_query.yaml @@ -3,7 +3,7 @@ in: query name: pageToken required: false schema: - default: '1' + default: '' description: Token of the page to return. title: Pagetoken type: string diff --git a/api/services/security/v1/parameters/ruleName_path.yaml b/api/services/security/v1/parameters/ruleName_path.yaml index 4dc9b4989..11e64175e 100644 --- a/api/services/security/v1/parameters/ruleName_path.yaml +++ b/api/services/security/v1/parameters/ruleName_path.yaml @@ -1,8 +1,8 @@ -description: An unique name of the rule. +description: The unique name of the rule. in: path name: ruleName required: true schema: - description: An unique name of the rule. + description: The unique name of the rule. title: Rulename type: string diff --git a/api/services/security/v1/parameters/ruleName_query.yaml b/api/services/security/v1/parameters/ruleName_query.yaml index 1e409b7c3..5b28e6280 100644 --- a/api/services/security/v1/parameters/ruleName_query.yaml +++ b/api/services/security/v1/parameters/ruleName_query.yaml @@ -1,4 +1,4 @@ -description: An unique name of the rule. +description: The unique name of the rule. in: query name: ruleName required: false @@ -6,5 +6,5 @@ schema: anyOf: - type: string - type: 'null' - description: An unique name of the rule. + description: The unique name of the rule. title: Rulename diff --git a/api/services/security/v1/parameters/services_query.yaml b/api/services/security/v1/parameters/services_query.yaml index 9a6212a71..aae3babb6 100644 --- a/api/services/security/v1/parameters/services_query.yaml +++ b/api/services/security/v1/parameters/services_query.yaml @@ -1,4 +1,4 @@ -description: A comma separated list of cloud services. +description: A comma-separated list of cloud services. example: ec2,s3,rds in: query name: services @@ -7,5 +7,5 @@ schema: anyOf: - type: string - type: 'null' - description: A comma separated list of cloud services. + description: A comma-separated list of cloud services. title: Services diff --git a/api/services/security/v1/paths/complianceName.yaml b/api/services/security/v1/paths/complianceName.yaml index b3dfc3bda..489c567c1 100644 --- a/api/services/security/v1/paths/complianceName.yaml +++ b/api/services/security/v1/paths/complianceName.yaml @@ -14,7 +14,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/compliances.yaml b/api/services/security/v1/paths/compliances.yaml index e50b5eaaa..a44e4c346 100644 --- a/api/services/security/v1/paths/compliances.yaml +++ b/api/services/security/v1/paths/compliances.yaml @@ -1,8 +1,8 @@ get: - description: 'A cyber security compliance determines how compliant each asset is, - against specific security standards. + description: 'A cyber security compliance determines how compliant an asset is. + It checks against specific security standards. - This API returns list of all compliances supported in the product. + This API returns list of all compliances supported in Spot. A compliance consists of one or more controls.' operationId: get_compliances_v1_compliances_get @@ -20,7 +20,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/controlId.yaml b/api/services/security/v1/paths/controlId.yaml index 11ced564a..0d4b89335 100644 --- a/api/services/security/v1/paths/controlId.yaml +++ b/api/services/security/v1/paths/controlId.yaml @@ -15,7 +15,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/controls.yaml b/api/services/security/v1/paths/controls.yaml index e65e2e063..fe4087ca2 100644 --- a/api/services/security/v1/paths/controls.yaml +++ b/api/services/security/v1/paths/controls.yaml @@ -1,14 +1,15 @@ get: - description: 'A control represents countermeasures to avoid, detect, counteract, - or minimize security risks of cloud assets. + description: 'A control is countermeasures to avoid, detect, counteract, or minimize + security risks of cloud assets. - A control may be part of one or more compliance. A control is verified in through - one or more rules. + A control may be part of one or more compliances. A control is verified in one + or more rules. This API returns the list of controls mapped to a specific compliance.' operationId: get_compliance_controls_v1_compliances__complianceName__controls_get parameters: - $ref: "../parameters/complianceName_path.yaml" + - $ref: "../parameters/isAutomated_query.yaml" - $ref: "../parameters/pageToken_query.yaml" - $ref: "../parameters/pageSize_query.yaml" responses: @@ -22,7 +23,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/controls_count.yaml b/api/services/security/v1/paths/controls_count.yaml index c007d7897..1ac2a008b 100644 --- a/api/services/security/v1/paths/controls_count.yaml +++ b/api/services/security/v1/paths/controls_count.yaml @@ -1,8 +1,9 @@ get: - description: Get the total number of controls for the given compliance. + description: Get the total number of controls for the selected compliance. operationId: get_compliance_controls_count_v1_compliances__complianceName__controls_count_get parameters: - $ref: "../parameters/complianceName_path.yaml" + - $ref: "../parameters/isAutomated_query.yaml" responses: '200': content: @@ -14,7 +15,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/count.yaml b/api/services/security/v1/paths/count.yaml index cb17597a6..614df43b4 100644 --- a/api/services/security/v1/paths/count.yaml +++ b/api/services/security/v1/paths/count.yaml @@ -13,7 +13,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found summary: Get Compliance Count tags: - Compliance diff --git a/api/services/security/v1/paths/misconfigurations.yaml b/api/services/security/v1/paths/misconfigurations.yaml index a7656138b..8a072bf1e 100644 --- a/api/services/security/v1/paths/misconfigurations.yaml +++ b/api/services/security/v1/paths/misconfigurations.yaml @@ -1,5 +1,5 @@ get: - description: This API returns the list of assets that have one or more misconfiguration. + description: This API returns the list of assets that have misconfigurations. operationId: get_misconfigurations_v1_misconfigurations_get parameters: - $ref: "../parameters/cloud_query.yaml" @@ -23,7 +23,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/misconfigurations_count.yaml b/api/services/security/v1/paths/misconfigurations_count.yaml index 63221dc22..259c0dcdc 100644 --- a/api/services/security/v1/paths/misconfigurations_count.yaml +++ b/api/services/security/v1/paths/misconfigurations_count.yaml @@ -1,5 +1,5 @@ get: - description: This API returns the list of count assets that are misconfigured. + description: This API returns a count of assets that have misconfigurations. operationId: get_misconfigurations_count_v1_misconfigurations_count_get parameters: - $ref: "../parameters/cloud_query.yaml" @@ -21,7 +21,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/ruleName.yaml b/api/services/security/v1/paths/ruleName.yaml index 10562e6ba..cdd4eb446 100644 --- a/api/services/security/v1/paths/ruleName.yaml +++ b/api/services/security/v1/paths/ruleName.yaml @@ -18,7 +18,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/rules.yaml b/api/services/security/v1/paths/rules.yaml index 74d4e0d6c..57a7a115a 100644 --- a/api/services/security/v1/paths/rules.yaml +++ b/api/services/security/v1/paths/rules.yaml @@ -1,8 +1,8 @@ get: - description: 'Rules represent configuration checks that detect misconfiguration - in your cloud environment. + description: 'Rules are configuration checks that detect misconfigurations in your + cloud environment. - Rules are cloud vendor specific. A rule is mapped to one or more controls. + Rules are cloud service provider specific. A rule is mapped to one or more controls. This API returns the list of rules that can determine the state of a specific control.' @@ -25,7 +25,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/paths/rules_count.yaml b/api/services/security/v1/paths/rules_count.yaml index ed09fd9f1..826535b43 100644 --- a/api/services/security/v1/paths/rules_count.yaml +++ b/api/services/security/v1/paths/rules_count.yaml @@ -1,8 +1,8 @@ get: - description: 'Rules represent configuration checks that detect misconfiguration - in your cloud environment. + description: 'Rules are configuration checks that detect misconfigurations in your + cloud environment. - Rules are cloud vendor specific. A rule is mapped to one or more controls. + Rules are cloud service provider specific. A rule is mapped to one or more controls. This API returns the list of rules that can determine the state of a specific control.' @@ -23,7 +23,7 @@ get: content: {} description: Bad Request '404': - description: Not found + description: Not Found '422': content: application/json: diff --git a/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml b/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml index 082f5ed72..b7d62bd1b 100644 --- a/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml +++ b/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml @@ -5,8 +5,8 @@ properties: title: Count type: integer items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./ComplianceModel.yaml title: Items diff --git a/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml b/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml index ff1b06771..76040b838 100644 --- a/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml +++ b/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml @@ -5,8 +5,8 @@ properties: title: Count type: integer items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./ControlModel.yaml title: Items diff --git a/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml b/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml index e577b47ef..c40f99e78 100644 --- a/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml +++ b/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml @@ -5,8 +5,8 @@ properties: title: Count type: integer items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./CountModel.yaml title: Items diff --git a/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml b/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml index 9fbc75adf..720297d7a 100644 --- a/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml +++ b/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml @@ -5,8 +5,8 @@ properties: title: Count type: integer items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./RulesModel.yaml title: Items diff --git a/api/services/security/v1/schemas/CloudProvider.yaml b/api/services/security/v1/schemas/CloudProvider.yaml index 187e1baa3..ebb62a5a2 100644 --- a/api/services/security/v1/schemas/CloudProvider.yaml +++ b/api/services/security/v1/schemas/CloudProvider.yaml @@ -1,4 +1,4 @@ -description: Enumeration of supported cloud providers. +description: Supported cloud providers. enum: - aws - azure diff --git a/api/services/security/v1/schemas/ComplianceModel.yaml b/api/services/security/v1/schemas/ComplianceModel.yaml index 752d643c1..7e647b06e 100644 --- a/api/services/security/v1/schemas/ComplianceModel.yaml +++ b/api/services/security/v1/schemas/ComplianceModel.yaml @@ -1,11 +1,6 @@ properties: complianceName: - description: The name of the cyber security compliance. - examples: - - SOC_2 title: Compliancename type: string -required: -- complianceName title: ComplianceModel type: object diff --git a/api/services/security/v1/schemas/ControlModel.yaml b/api/services/security/v1/schemas/ControlModel.yaml index 52bb66a96..3d69a5db9 100644 --- a/api/services/security/v1/schemas/ControlModel.yaml +++ b/api/services/security/v1/schemas/ControlModel.yaml @@ -1,16 +1,12 @@ properties: controlId: - description: The id of the control defined in the compliance. - examples: - - A1.2 title: Controlid type: string description: - description: An explanation of the object being referenced. title: Description type: string -required: -- controlId -- description + isAutomated: + title: Isautomated + type: boolean title: ControlModel type: object diff --git a/api/services/security/v1/schemas/MisconfigurationModel.yaml b/api/services/security/v1/schemas/MisconfigurationModel.yaml index 3359a8bd9..c650dcb8b 100644 --- a/api/services/security/v1/schemas/MisconfigurationModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationModel.yaml @@ -1,6 +1,6 @@ properties: organizationId: - description: The Spot Organization Id. + description: The Spot Organization ID. title: Organizationid type: string what: @@ -9,10 +9,13 @@ properties: $ref: ./MisconfigurationWhenModel.yaml where: $ref: ./MisconfigurationWhereModel.yaml + who: + $ref: ./MisconfigurationWhoModel.yaml required: - organizationId - when - what - where +- who title: MisconfigurationModel type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml index 39d569d6e..2993a59a2 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml @@ -9,28 +9,30 @@ properties: the arguments in the form of an comma separated array. Example: ["MongoDB", "TCP", "27017"]' title: Args + isSuppressed: + anyOf: + - type: boolean + - type: 'null' + description: If this finding is suppressed, the value is True. + title: Issuppressed ruleDescription: - description: Describes the rule. + description: Description of the rule. title: Ruledescription type: string ruleName: - description: An unique name of the rule. + description: The unique name of the rule. title: Rulename type: string ruleTitle: - description: A user friendly representation of the rule name + description: The name of the rule. title: Ruletitle type: string severity: description: The severity of the rule. - examples: - - High title: Severity type: string state: description: The state of the misconfiguration. It is either open or closed. - examples: - - open title: State type: string required: @@ -40,5 +42,6 @@ required: - args - severity - state +- isSuppressed title: MisconfigurationWhatModel type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml index 06fe37b24..a4b8b0a22 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml @@ -1,9 +1,17 @@ properties: lastSeen: - description: The date when the finding was last seen. + description: The date the finding happened last in YYYY-MM-DD format title: Lastseen type: string + suppressedAt: + anyOf: + - format: date-time + type: string + - type: 'null' + description: When the finding was suppressed. + title: Suppressedat required: - lastSeen +- suppressedAt title: MisconfigurationWhenModel type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml index 17d90821e..d2f522a97 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml @@ -1,52 +1,33 @@ properties: accountId: - description: The cloud account id. For AWS this is the account id. For Azure, - this is the subscription id. + description: The cloud account ID. For AWS this is the account ID. For Azure, + this is the subscription ID. title: Accountid type: string assetId: anyOf: - type: string - type: 'null' - description: An id to identify the asset. It represents a cloud resource. + description: The asset's ID (a cloud resource). title: Assetid assetName: anyOf: - type: string - type: 'null' - description: A user friendly representation of the asset id. + description: The name of the asset ID. title: Assetname assetType: anyOf: - type: string - type: 'null' description: The type of cloud resource for the service. - examples: - - security_groups title: Assettype - item: - anyOf: - - type: string - - type: 'null' - description: 'Identifies an entity of the asset. Example: An asset of type security_groups - may have more than one rule. Each such rule is an item.' - title: Item - itemName: - anyOf: - - type: string - - type: 'null' - description: A user friendly representation of the item. - title: Itemname region: description: The cloud region. - examples: - - us-east-1 title: Region type: string service: description: The cloud service. - examples: - - EC2 title: Service type: string required: @@ -56,7 +37,5 @@ required: - assetName - assetType - region -- item -- itemName title: MisconfigurationWhereModel type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml new file mode 100644 index 000000000..ca91c3c1b --- /dev/null +++ b/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml @@ -0,0 +1,11 @@ +properties: + suppressedBy: + anyOf: + - type: string + - type: 'null' + description: The user who suppressed the finding. + title: Suppressedby +required: +- suppressedBy +title: MisconfigurationWhoModel +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml index 730152d02..69eb1b8f7 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml @@ -8,12 +8,12 @@ properties: anyOf: - type: string - type: 'null' - description: 'The current page token. Note: this is an opaque string field. Do - not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the current + page of results. title: Currenttoken items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./ComplianceModel.yaml title: Items @@ -22,8 +22,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the next page of results. Note: this is an opaque string - field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the next + page of results. title: Nexttoken pageSize: description: The maximum number of items in the page. The attribute 'item' indicates @@ -34,8 +34,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the previous page of results. Note: this is an opaque - string field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the previous + page of results. title: Previoustoken required: - items diff --git a/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml index 00d8c9d37..f5f0ab622 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml @@ -8,12 +8,12 @@ properties: anyOf: - type: string - type: 'null' - description: 'The current page token. Note: this is an opaque string field. Do - not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the current + page of results. title: Currenttoken items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./ControlModel.yaml title: Items @@ -22,8 +22,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the next page of results. Note: this is an opaque string - field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the next + page of results. title: Nexttoken pageSize: description: The maximum number of items in the page. The attribute 'item' indicates @@ -34,8 +34,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the previous page of results. Note: this is an opaque - string field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the previous + page of results. title: Previoustoken required: - items diff --git a/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml index 93fa7fceb..42305bce7 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml @@ -8,12 +8,12 @@ properties: anyOf: - type: string - type: 'null' - description: 'The current page token. Note: this is an opaque string field. Do - not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the current + page of results. title: Currenttoken items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./MisconfigurationModel.yaml title: Items @@ -22,8 +22,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the next page of results. Note: this is an opaque string - field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the next + page of results. title: Nexttoken pageSize: description: The maximum number of items in the page. The attribute 'item' indicates @@ -34,8 +34,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the previous page of results. Note: this is an opaque - string field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the previous + page of results. title: Previoustoken required: - items diff --git a/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml index c3789e7d1..7112eedd3 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml @@ -8,12 +8,12 @@ properties: anyOf: - type: string - type: 'null' - description: 'The current page token. Note: this is an opaque string field. Do - not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the current + page of results. title: Currenttoken items: - description: An array of objects in this response, the length of which is defined - by the attribute named 'count' + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. items: $ref: ./RulesModel.yaml title: Items @@ -22,8 +22,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the next page of results. Note: this is an opaque string - field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the next + page of results. title: Nexttoken pageSize: description: The maximum number of items in the page. The attribute 'item' indicates @@ -34,8 +34,8 @@ properties: anyOf: - type: string - type: 'null' - description: 'Token for the previous page of results. Note: this is an opaque - string field. Do not increment/decrement it arithmetically.' + description: Each API call has a unique token. This is the token for the previous + page of results. title: Previoustoken required: - items diff --git a/api/services/security/v1/schemas/RulesModel.yaml b/api/services/security/v1/schemas/RulesModel.yaml index 57d16d7f6..621d86099 100644 --- a/api/services/security/v1/schemas/RulesModel.yaml +++ b/api/services/security/v1/schemas/RulesModel.yaml @@ -11,8 +11,6 @@ properties: title: Args cloud: description: The name of the cloud. - examples: - - aws title: Cloud type: string complianceName: @@ -31,10 +29,10 @@ properties: type: object type: array - type: 'null' - description: The id of the control defined in the compliance. + description: The ID of the control defined in the compliance. title: Controls description: - description: Describes the rule. + description: Description of the rule. title: Description type: string effort: @@ -42,20 +40,16 @@ properties: - $ref: ./Effort.yaml - type: 'null' description: The effort required to fix the finding. - examples: - - Low ruleName: - description: An unique name of the rule. + description: The unique name of the rule. title: Rulename type: string ruleTitle: - description: A user friendly representation of the rule name + description: The name of the rule. title: Ruletitle type: string service: description: The cloud service. - examples: - - EC2 title: Service type: string severity: @@ -63,8 +57,6 @@ properties: - $ref: ./Severity.yaml - type: 'null' description: The severity of the rule. - examples: - - High required: - ruleName - ruleTitle From 8ee92ceba66f501b80c2af329354ac53fa13ea09 Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Mon, 28 Oct 2024 14:11:49 +0530 Subject: [PATCH 3/9] updated: docs as per feedback --- .../v1/parameters/controlId_path.yaml | 9 ------ .../security/v1/parameters/ruleName_path.yaml | 8 ----- .../v1/parameters/services_query.yaml | 2 +- .../security/v1/paths/complianceName.yaml | 27 ---------------- api/services/security/v1/paths/controlId.yaml | 28 ----------------- api/services/security/v1/paths/ruleName.yaml | 31 ------------------- .../security/v1/paths/rules_count.yaml | 4 +-- .../BaseResponse_ComplianceModel_.yaml | 17 ---------- .../schemas/BaseResponse_ControlModel_.yaml | 17 ---------- .../v1/schemas/BaseResponse_RulesModel_.yaml | 17 ---------- .../v1/schemas/MisconfigurationWhenModel.yaml | 2 +- .../schemas/MisconfigurationWhereModel.yaml | 5 +++ api/spot.yaml | 8 +---- 13 files changed, 10 insertions(+), 165 deletions(-) delete mode 100644 api/services/security/v1/parameters/controlId_path.yaml delete mode 100644 api/services/security/v1/parameters/ruleName_path.yaml delete mode 100644 api/services/security/v1/paths/complianceName.yaml delete mode 100644 api/services/security/v1/paths/controlId.yaml delete mode 100644 api/services/security/v1/paths/ruleName.yaml delete mode 100644 api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml delete mode 100644 api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml delete mode 100644 api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml diff --git a/api/services/security/v1/parameters/controlId_path.yaml b/api/services/security/v1/parameters/controlId_path.yaml deleted file mode 100644 index a410cdb3b..000000000 --- a/api/services/security/v1/parameters/controlId_path.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: The ID of the control defined in the compliance. -example: A1.2 -in: path -name: controlId -required: true -schema: - description: The ID of the control defined in the compliance. - title: Controlid - type: string diff --git a/api/services/security/v1/parameters/ruleName_path.yaml b/api/services/security/v1/parameters/ruleName_path.yaml deleted file mode 100644 index 11e64175e..000000000 --- a/api/services/security/v1/parameters/ruleName_path.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: The unique name of the rule. -in: path -name: ruleName -required: true -schema: - description: The unique name of the rule. - title: Rulename - type: string diff --git a/api/services/security/v1/parameters/services_query.yaml b/api/services/security/v1/parameters/services_query.yaml index aae3babb6..f81535477 100644 --- a/api/services/security/v1/parameters/services_query.yaml +++ b/api/services/security/v1/parameters/services_query.yaml @@ -1,5 +1,5 @@ description: A comma-separated list of cloud services. -example: ec2,s3,rds +example: ec2 in: query name: services required: false diff --git a/api/services/security/v1/paths/complianceName.yaml b/api/services/security/v1/paths/complianceName.yaml deleted file mode 100644 index 489c567c1..000000000 --- a/api/services/security/v1/paths/complianceName.yaml +++ /dev/null @@ -1,27 +0,0 @@ -get: - description: Get details about a specific compliance. - operationId: get_compliance_v1_compliances__complianceName__get - parameters: - - $ref: "../parameters/complianceName_path.yaml" - responses: - '200': - content: - application/json: - schema: - $ref: "../schemas/BaseResponse_ComplianceModel_.yaml" - description: Successful Response - '400': - content: {} - description: Bad Request - '404': - description: Not Found - '422': - content: - application/json: - schema: - $ref: "../schemas/HTTPValidationError.yaml" - description: Validation Error - summary: Get Compliance - tags: - - Compliance -parameters: [] diff --git a/api/services/security/v1/paths/controlId.yaml b/api/services/security/v1/paths/controlId.yaml deleted file mode 100644 index 0d4b89335..000000000 --- a/api/services/security/v1/paths/controlId.yaml +++ /dev/null @@ -1,28 +0,0 @@ -get: - description: Get details about a specific control. - operationId: get_compliance_control_v1_compliances__complianceName__controls__controlId__get - parameters: - - $ref: "../parameters/complianceName_path.yaml" - - $ref: "../parameters/controlId_path.yaml" - responses: - '200': - content: - application/json: - schema: - $ref: "../schemas/BaseResponse_ControlModel_.yaml" - description: Successful Response - '400': - content: {} - description: Bad Request - '404': - description: Not Found - '422': - content: - application/json: - schema: - $ref: "../schemas/HTTPValidationError.yaml" - description: Validation Error - summary: Get Compliance Control - tags: - - Compliance -parameters: [] diff --git a/api/services/security/v1/paths/ruleName.yaml b/api/services/security/v1/paths/ruleName.yaml deleted file mode 100644 index cdd4eb446..000000000 --- a/api/services/security/v1/paths/ruleName.yaml +++ /dev/null @@ -1,31 +0,0 @@ -get: - description: Get details about a specific rule. - operationId: get_compliance_controls_rule_v1_misconfigurations_rules__ruleName__get - parameters: - - $ref: "../parameters/ruleName_path.yaml" - - $ref: "../parameters/cloud_query.yaml" - - $ref: "../parameters/complianceName_query.yaml" - - $ref: "../parameters/controlId_query.yaml" - - $ref: "../parameters/services_query.yaml" - responses: - '200': - content: - application/json: - schema: - $ref: "../schemas/BaseResponse_RulesModel_.yaml" - description: Successful Response - '400': - content: {} - description: Bad Request - '404': - description: Not Found - '422': - content: - application/json: - schema: - $ref: "../schemas/HTTPValidationError.yaml" - description: Validation Error - summary: Get Compliance Controls Rule - tags: - - Misconfiguration -parameters: [] diff --git a/api/services/security/v1/paths/rules_count.yaml b/api/services/security/v1/paths/rules_count.yaml index 826535b43..42b9909e9 100644 --- a/api/services/security/v1/paths/rules_count.yaml +++ b/api/services/security/v1/paths/rules_count.yaml @@ -6,7 +6,7 @@ get: This API returns the list of rules that can determine the state of a specific control.' - operationId: get_compliance_controls_rules_count_v1_misconfigurations_rules_count_get + operationId: get_rules_count_v1_misconfigurations_rules_count_get parameters: - $ref: "../parameters/cloud_query.yaml" - $ref: "../parameters/complianceName_query.yaml" @@ -30,7 +30,7 @@ get: schema: $ref: "../schemas/HTTPValidationError.yaml" description: Validation Error - summary: Get Compliance Controls Rules Count + summary: Get Rules Count tags: - Misconfiguration parameters: [] diff --git a/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml b/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml deleted file mode 100644 index b7d62bd1b..000000000 --- a/api/services/security/v1/schemas/BaseResponse_ComplianceModel_.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./ComplianceModel.yaml - title: Items - type: array -required: -- items -title: BaseResponse[ComplianceModel] -type: object diff --git a/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml b/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml deleted file mode 100644 index 76040b838..000000000 --- a/api/services/security/v1/schemas/BaseResponse_ControlModel_.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./ControlModel.yaml - title: Items - type: array -required: -- items -title: BaseResponse[ControlModel] -type: object diff --git a/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml b/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml deleted file mode 100644 index 720297d7a..000000000 --- a/api/services/security/v1/schemas/BaseResponse_RulesModel_.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./RulesModel.yaml - title: Items - type: array -required: -- items -title: BaseResponse[RulesModel] -type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml index a4b8b0a22..8a393048f 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml @@ -1,6 +1,6 @@ properties: lastSeen: - description: The date the finding happened last in YYYY-MM-DD format + description: The date the finding was most recently found (YYYY-MM-DD). title: Lastseen type: string suppressedAt: diff --git a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml index d2f522a97..de64ae8a2 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml @@ -22,6 +22,10 @@ properties: - type: 'null' description: The type of cloud resource for the service. title: Assettype + fullPath: + description: Specifies the complete path where one can find the exact misconfiguration. + title: Fullpath + type: string region: description: The cloud region. title: Region @@ -37,5 +41,6 @@ required: - assetName - assetType - region +- fullPath title: MisconfigurationWhereModel type: object diff --git a/api/spot.yaml b/api/spot.yaml index 47e71efeb..4f69f869d 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -926,19 +926,15 @@ paths: /ocean/{oceanId}/rightSizing/rule/{ruleName}/detachment: $ref: services/ocean/rightsizing/paths/oceanRightsizingRuleDetachment.yaml /ocean/{oceanId}/rightSizing/recommendations: - $ref: services/ocean/rightsizing/paths/oceanRightsizingRecommendations.yaml + $ref: services/ocean/rightsizing/paths/oceanRightsizingRecommendations.yaml /security/v1/compliances: $ref: services/security/v1/paths/compliances.yaml /security/v1/compliances/count: $ref: services/security/v1/paths/count.yaml - /security/v1/compliances/{complianceName}: - $ref: services/security/v1/paths/complianceName.yaml /security/v1/compliances/{complianceName}/controls: $ref: services/security/v1/paths/controls.yaml /security/v1/compliances/{complianceName}/controls/count: $ref: services/security/v1/paths/controls_count.yaml - /security/v1/compliances/{complianceName}/controls/{controlId}: - $ref: services/security/v1/paths/controlId.yaml /security/v1/misconfigurations: $ref: services/security/v1/paths/misconfigurations.yaml /security/v1/misconfigurations/count: @@ -947,5 +943,3 @@ paths: $ref: services/security/v1/paths/rules.yaml /security/v1/misconfigurations/rules/count: $ref: services/security/v1/paths/rules_count.yaml - /security/v1/misconfigurations/rules/{ruleName}: - $ref: services/security/v1/paths/ruleName.yaml From 515f99a178633d32aa3662b800cd47829eb6645a Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Tue, 19 Nov 2024 09:57:31 +0530 Subject: [PATCH 4/9] fix: updated schema to match with finops standards --- .../security/v1/parameters/cloud_query.yaml | 2 +- .../v1/parameters/pageSize_query.yaml | 11 - .../v1/parameters/pageToken_query.yaml | 9 - .../v1/parameters/paginationKey_query.yaml | 8 + .../v1/parameters/paginationSize_query.yaml | 11 + .../security/v1/paths/compliances.yaml | 6 +- api/services/security/v1/paths/controls.yaml | 6 +- .../security/v1/paths/controls_count.yaml | 2 +- api/services/security/v1/paths/count.yaml | 2 +- .../security/v1/paths/misconfigurations.yaml | 6 +- .../v1/paths/misconfigurations_count.yaml | 2 +- api/services/security/v1/paths/rules.yaml | 6 +- .../security/v1/paths/rules_count.yaml | 2 +- .../security/v1/schemas/AssetFilters.yaml | 10 + .../v1/schemas/AssetResponseModel.yaml | 544 ++++++++++++++++++ .../v1/schemas/AssetSimFilterModel.yaml | 9 + .../security/v1/schemas/AssetTrendItem.yaml | 376 ++++++++++++ .../schemas/BaseResponse_AssetTrendItem_.yaml | 20 + .../v1/schemas/BaseResponse_CountModel_.yaml | 3 + .../security/v1/schemas/ErrorModel.yaml | 12 + .../v1/schemas/MisconfigurationWhatModel.yaml | 2 +- .../schemas/MisconfigurationWhereModel.yaml | 10 +- api/services/security/v1/schemas/OrderBy.yaml | 32 ++ ...PaginatedResponse_AssetResponseModel_.yaml | 23 + ...aginatedResponse_AssetSimFilterModel_.yaml | 23 + .../PaginatedResponse_ComplianceModel_.yaml | 33 +- .../PaginatedResponse_ControlModel_.yaml | 33 +- ...inatedResponse_MisconfigurationModel_.yaml | 33 +- .../PaginatedResponse_ReportModel_.yaml | 23 + .../PaginatedResponse_RulesModel_.yaml | 33 +- .../security/v1/schemas/PaginationModel.yaml | 22 + .../security/v1/schemas/ReportModel.yaml | 53 ++ .../security/v1/schemas/ReportStatus.yaml | 6 + .../security/v1/schemas/RequestModel.yaml | 32 ++ .../security/v1/schemas/RulesModel.yaml | 2 +- ...esponse_BaseResponse_AssetTrendItem__.yaml | 17 + ...potResponse_BaseResponse_CountModel__.yaml | 17 + ...aginatedResponse_AssetResponseModel__.yaml | 17 + ...ginatedResponse_AssetSimFilterModel__.yaml | 17 + ...e_PaginatedResponse_ComplianceModel__.yaml | 17 + ...onse_PaginatedResponse_ControlModel__.yaml | 17 + ...natedResponse_MisconfigurationModel__.yaml | 17 + ...ponse_PaginatedResponse_ReportModel__.yaml | 17 + ...sponse_PaginatedResponse_RulesModel__.yaml | 17 + .../security/v1/schemas/StatusModel.yaml | 12 + .../cloud__constant__base__CloudProvider.yaml | 6 + ...> databases__constant__CloudProvider.yaml} | 0 47 files changed, 1427 insertions(+), 151 deletions(-) delete mode 100644 api/services/security/v1/parameters/pageSize_query.yaml delete mode 100644 api/services/security/v1/parameters/pageToken_query.yaml create mode 100644 api/services/security/v1/parameters/paginationKey_query.yaml create mode 100644 api/services/security/v1/parameters/paginationSize_query.yaml create mode 100644 api/services/security/v1/schemas/AssetFilters.yaml create mode 100644 api/services/security/v1/schemas/AssetResponseModel.yaml create mode 100644 api/services/security/v1/schemas/AssetSimFilterModel.yaml create mode 100644 api/services/security/v1/schemas/AssetTrendItem.yaml create mode 100644 api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml create mode 100644 api/services/security/v1/schemas/ErrorModel.yaml create mode 100644 api/services/security/v1/schemas/OrderBy.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml create mode 100644 api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml create mode 100644 api/services/security/v1/schemas/PaginationModel.yaml create mode 100644 api/services/security/v1/schemas/ReportModel.yaml create mode 100644 api/services/security/v1/schemas/ReportStatus.yaml create mode 100644 api/services/security/v1/schemas/RequestModel.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml create mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml create mode 100644 api/services/security/v1/schemas/StatusModel.yaml create mode 100644 api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml rename api/services/security/v1/schemas/{CloudProvider.yaml => databases__constant__CloudProvider.yaml} (100%) diff --git a/api/services/security/v1/parameters/cloud_query.yaml b/api/services/security/v1/parameters/cloud_query.yaml index 67f1f324a..94130bb45 100644 --- a/api/services/security/v1/parameters/cloud_query.yaml +++ b/api/services/security/v1/parameters/cloud_query.yaml @@ -2,4 +2,4 @@ in: query name: cloud required: true schema: - $ref: "../schemas/CloudProvider.yaml" + $ref: "../schemas/databases__constant__CloudProvider.yaml" diff --git a/api/services/security/v1/parameters/pageSize_query.yaml b/api/services/security/v1/parameters/pageSize_query.yaml deleted file mode 100644 index 626eb07a7..000000000 --- a/api/services/security/v1/parameters/pageSize_query.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Number of items to return per page. -in: query -name: pageSize -required: false -schema: - default: 100 - description: Number of items to return per page. - maximum: 100 - minimum: 1 - title: Pagesize - type: integer diff --git a/api/services/security/v1/parameters/pageToken_query.yaml b/api/services/security/v1/parameters/pageToken_query.yaml deleted file mode 100644 index 2ad86a89f..000000000 --- a/api/services/security/v1/parameters/pageToken_query.yaml +++ /dev/null @@ -1,9 +0,0 @@ -description: Token of the page to return. -in: query -name: pageToken -required: false -schema: - default: '' - description: Token of the page to return. - title: Pagetoken - type: string diff --git a/api/services/security/v1/parameters/paginationKey_query.yaml b/api/services/security/v1/parameters/paginationKey_query.yaml new file mode 100644 index 000000000..2f0aa91ae --- /dev/null +++ b/api/services/security/v1/parameters/paginationKey_query.yaml @@ -0,0 +1,8 @@ +in: query +name: paginationKey +required: false +schema: + anyOf: + - type: string + - type: 'null' + title: Paginationkey diff --git a/api/services/security/v1/parameters/paginationSize_query.yaml b/api/services/security/v1/parameters/paginationSize_query.yaml new file mode 100644 index 000000000..02c7aaca6 --- /dev/null +++ b/api/services/security/v1/parameters/paginationSize_query.yaml @@ -0,0 +1,11 @@ +in: query +name: paginationSize +required: false +schema: + anyOf: + - maximum: 100 + minimum: 1 + type: integer + - type: 'null' + default: 100 + title: Paginationsize diff --git a/api/services/security/v1/paths/compliances.yaml b/api/services/security/v1/paths/compliances.yaml index a44e4c346..dc46c272f 100644 --- a/api/services/security/v1/paths/compliances.yaml +++ b/api/services/security/v1/paths/compliances.yaml @@ -7,14 +7,14 @@ get: A compliance consists of one or more controls.' operationId: get_compliances_v1_compliances_get parameters: - - $ref: "../parameters/pageToken_query.yaml" - - $ref: "../parameters/pageSize_query.yaml" + - $ref: "../parameters/paginationKey_query.yaml" + - $ref: "../parameters/paginationSize_query.yaml" responses: '200': content: application/json: schema: - $ref: "../schemas/PaginatedResponse_ComplianceModel_.yaml" + $ref: "../schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/controls.yaml b/api/services/security/v1/paths/controls.yaml index fe4087ca2..be01a8ebc 100644 --- a/api/services/security/v1/paths/controls.yaml +++ b/api/services/security/v1/paths/controls.yaml @@ -10,14 +10,14 @@ get: parameters: - $ref: "../parameters/complianceName_path.yaml" - $ref: "../parameters/isAutomated_query.yaml" - - $ref: "../parameters/pageToken_query.yaml" - - $ref: "../parameters/pageSize_query.yaml" + - $ref: "../parameters/paginationKey_query.yaml" + - $ref: "../parameters/paginationSize_query.yaml" responses: '200': content: application/json: schema: - $ref: "../schemas/PaginatedResponse_ControlModel_.yaml" + $ref: "../schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/controls_count.yaml b/api/services/security/v1/paths/controls_count.yaml index 1ac2a008b..49596589f 100644 --- a/api/services/security/v1/paths/controls_count.yaml +++ b/api/services/security/v1/paths/controls_count.yaml @@ -9,7 +9,7 @@ get: content: application/json: schema: - $ref: "../schemas/BaseResponse_CountModel_.yaml" + $ref: "../schemas/SpotResponse_BaseResponse_CountModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/count.yaml b/api/services/security/v1/paths/count.yaml index 614df43b4..e86d21cdd 100644 --- a/api/services/security/v1/paths/count.yaml +++ b/api/services/security/v1/paths/count.yaml @@ -7,7 +7,7 @@ get: content: application/json: schema: - $ref: "../schemas/BaseResponse_CountModel_.yaml" + $ref: "../schemas/SpotResponse_BaseResponse_CountModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/misconfigurations.yaml b/api/services/security/v1/paths/misconfigurations.yaml index 8a072bf1e..531fe3b65 100644 --- a/api/services/security/v1/paths/misconfigurations.yaml +++ b/api/services/security/v1/paths/misconfigurations.yaml @@ -10,14 +10,14 @@ get: - $ref: "../parameters/region_query.yaml" - $ref: "../parameters/assetType_query.yaml" - $ref: "../parameters/assetId_query.yaml" - - $ref: "../parameters/pageToken_query.yaml" - - $ref: "../parameters/pageSize_query.yaml" + - $ref: "../parameters/paginationKey_query.yaml" + - $ref: "../parameters/paginationSize_query.yaml" responses: '200': content: application/json: schema: - $ref: "../schemas/PaginatedResponse_MisconfigurationModel_.yaml" + $ref: "../schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/misconfigurations_count.yaml b/api/services/security/v1/paths/misconfigurations_count.yaml index 259c0dcdc..0ef350d17 100644 --- a/api/services/security/v1/paths/misconfigurations_count.yaml +++ b/api/services/security/v1/paths/misconfigurations_count.yaml @@ -15,7 +15,7 @@ get: content: application/json: schema: - $ref: "../schemas/BaseResponse_CountModel_.yaml" + $ref: "../schemas/SpotResponse_BaseResponse_CountModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/rules.yaml b/api/services/security/v1/paths/rules.yaml index 57a7a115a..2aaa1b480 100644 --- a/api/services/security/v1/paths/rules.yaml +++ b/api/services/security/v1/paths/rules.yaml @@ -12,14 +12,14 @@ get: - $ref: "../parameters/complianceName_query.yaml" - $ref: "../parameters/controlId_query.yaml" - $ref: "../parameters/services_query.yaml" - - $ref: "../parameters/pageToken_query.yaml" - - $ref: "../parameters/pageSize_query.yaml" + - $ref: "../parameters/paginationKey_query.yaml" + - $ref: "../parameters/paginationSize_query.yaml" responses: '200': content: application/json: schema: - $ref: "../schemas/PaginatedResponse_RulesModel_.yaml" + $ref: "../schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/paths/rules_count.yaml b/api/services/security/v1/paths/rules_count.yaml index 42b9909e9..64f0d15fd 100644 --- a/api/services/security/v1/paths/rules_count.yaml +++ b/api/services/security/v1/paths/rules_count.yaml @@ -17,7 +17,7 @@ get: content: application/json: schema: - $ref: "../schemas/BaseResponse_CountModel_.yaml" + $ref: "../schemas/SpotResponse_BaseResponse_CountModel__.yaml" description: Successful Response '400': content: {} diff --git a/api/services/security/v1/schemas/AssetFilters.yaml b/api/services/security/v1/schemas/AssetFilters.yaml new file mode 100644 index 000000000..cfc54e14b --- /dev/null +++ b/api/services/security/v1/schemas/AssetFilters.yaml @@ -0,0 +1,10 @@ +enum: +- accountId +- accountName +- region +- assetId +- assetName +- service +- assetType +title: AssetFilters +type: string diff --git a/api/services/security/v1/schemas/AssetResponseModel.yaml b/api/services/security/v1/schemas/AssetResponseModel.yaml new file mode 100644 index 000000000..c7bdb1b6d --- /dev/null +++ b/api/services/security/v1/schemas/AssetResponseModel.yaml @@ -0,0 +1,544 @@ +properties: + accountId: + description: The cloud account ID. For AWS this is the account ID. For Azure, + this is the subscription ID. + title: Accountid + type: string + accountName: + anyOf: + - type: string + - type: 'null' + description: The name of the cloud account. + title: Accountname + affectedAssetsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of neighboring assets affected by the finding.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Affectedassetscount + affectedAssetsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Affectedassetscountdeviation + allAnomaliesCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of anomalies found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allanomaliescount + allAnomaliesCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Allanomaliescountdeviation + allEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Alleventscount + allEventsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Alleventscountdeviation + allFindingsCount: + anyOf: + - type: integer + - type: 'null' + description: Sum of vulnerabilities, misconfigurations, threats and anomalies + title: Allfindingscount + allFindingsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Allfindingscountdeviation + allMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allmisconfigcount + allMisconfigCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Allmisconfigcountdeviation + allThreatsCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of threats found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allthreatscount + allThreatsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Allthreatscountdeviation + allVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allvulncount + allVulnCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Allvulncountdeviation + assetId: + description: The asset's ID (a cloud resource). + title: Assetid + type: string + assetName: + description: The name of the asset ID. + title: Assetname + type: string + assetType: + description: The type of cloud resource for the service. + title: Assettype + type: string + cloud: + description: The name of the cloud. + title: Cloud + type: string + collectionDate: + description: The date the finding was most recently found (YYYY-MM-DD). + format: date + title: Collectiondate + type: string + configEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of configuration events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Configeventscount + configEventsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Configeventscountdeviation + criticalEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of critical events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Criticaleventscount + criticalEventsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Criticaleventscountdeviation + criticalVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of critical vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Criticalvulncount + criticalVulnCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Criticalvulncountdeviation + dataChangeEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of data change events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Datachangeeventscount + dataChangeEventsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Datachangeeventscountdeviation + highMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of high misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Highmisconfigcount + highMisconfigCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Highmisconfigcountdeviation + highVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of high vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Highvulncount + highVulnCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Highvulncountdeviation + iamChangeEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of IAM change events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Iamchangeeventscount + iamChangeEventsCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Iamchangeeventscountdeviation + infoVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of informational vulnerabilities found for the asset.\n + \
\n Enter either a number or prefix it with one of the following + operators.\n \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Infovulncount + infoVulnCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Infovulncountdeviation + isRisky: + anyOf: + - type: boolean + - type: 'null' + description: True if there are findings discovered for the asset + title: Isrisky + lowMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of low misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Lowmisconfigcount + lowMisconfigCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Lowmisconfigcountdeviation + lowVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of low vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Lowvulncount + lowVulnCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Lowvulncountdeviation + mediumMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of medium misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Mediummisconfigcount + mediumMisconfigCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Mediummisconfigcountdeviation + mediumVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of medium vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Mediumvulncount + mediumVulnCountDeviation: + anyOf: + - type: integer + - type: 'null' + description: Indicates how much the count deviated from historic average in percentage. + title: Mediumvulncountdeviation + organizationId: + description: The Spot Organization ID. + title: Organizationid + type: string + region: + description: The cloud region. + title: Region + type: string + service: + description: The cloud service. + title: Service + type: string + updatedAt: + description: The last updated time stamp + format: date-time + title: Updatedat + type: string +required: +- organizationId +- accountId +- assetId +- assetName +- collectionDate +title: AssetResponseModel +type: object diff --git a/api/services/security/v1/schemas/AssetSimFilterModel.yaml b/api/services/security/v1/schemas/AssetSimFilterModel.yaml new file mode 100644 index 000000000..3d67df112 --- /dev/null +++ b/api/services/security/v1/schemas/AssetSimFilterModel.yaml @@ -0,0 +1,9 @@ +properties: + value: + anyOf: + - type: string + - type: 'null' + description: The result of the request + title: Value +title: AssetSimFilterModel +type: object diff --git a/api/services/security/v1/schemas/AssetTrendItem.yaml b/api/services/security/v1/schemas/AssetTrendItem.yaml new file mode 100644 index 000000000..54b85e8c5 --- /dev/null +++ b/api/services/security/v1/schemas/AssetTrendItem.yaml @@ -0,0 +1,376 @@ +properties: + affectedAssetsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of neighboring assets affected by the finding.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Affectedassetscount + allAnomaliesCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of anomalies found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allanomaliescount + allEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Alleventscount + allFindingsCount: + anyOf: + - type: integer + - type: 'null' + description: Sum of vulnerabilities, misconfigurations, threats and anomalies + title: Allfindingscount + allMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allmisconfigcount + allThreatsCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of threats found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allthreatscount + allVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The total number of vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Allvulncount + configEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of configuration events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Configeventscount + criticalEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of critical events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Criticaleventscount + criticalVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of critical vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Criticalvulncount + dataChangeEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of data change events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Datachangeeventscount + date: + description: The date the finding was most recently found (YYYY-MM-DD). + format: date + title: Date + type: string + highMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of high misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Highmisconfigcount + highVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of high vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Highvulncount + iamChangeEventsCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of IAM change events found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Iamchangeeventscount + infoVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of informational vulnerabilities found for the asset.\n + \
\n Enter either a number or prefix it with one of the following + operators.\n \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Infovulncount + lowMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of low misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Lowmisconfigcount + lowVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of low vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Lowvulncount + mediumMisconfigCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of medium misconfigurations found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Mediummisconfigcount + mediumVulnCount: + anyOf: + - type: integer + - type: 'null' + description: "The number of medium vulnerabilities found for the asset.\n
\n + \ Enter either a number or prefix it with one of the following operators.\n + \ \n \n \n \n + \ \n \n \n \n + \ \n \n + \ \n \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n \n + \ \n \n \n + \ \n \n \n \n \n \n + \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater + than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less + than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between + two ranges\\~bt\\~\\~bt\\~10,20
\n " + title: Mediumvulncount +required: +- date +title: AssetTrendItem +type: object diff --git a/api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml b/api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml new file mode 100644 index 000000000..57e97cbce --- /dev/null +++ b/api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml @@ -0,0 +1,20 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. + items: + $ref: ./AssetTrendItem.yaml + title: Items + type: array + status: + $ref: ./StatusModel.yaml +required: +- status +- items +title: BaseResponse[AssetTrendItem] +type: object diff --git a/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml b/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml index c40f99e78..0f5824751 100644 --- a/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml +++ b/api/services/security/v1/schemas/BaseResponse_CountModel_.yaml @@ -11,7 +11,10 @@ properties: $ref: ./CountModel.yaml title: Items type: array + status: + $ref: ./StatusModel.yaml required: +- status - items title: BaseResponse[CountModel] type: object diff --git a/api/services/security/v1/schemas/ErrorModel.yaml b/api/services/security/v1/schemas/ErrorModel.yaml new file mode 100644 index 000000000..4ae656126 --- /dev/null +++ b/api/services/security/v1/schemas/ErrorModel.yaml @@ -0,0 +1,12 @@ +properties: + code: + title: Code + type: string + message: + title: Message + type: string +required: +- code +- message +title: ErrorModel +type: object diff --git a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml index 2993a59a2..d3f875c9c 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml @@ -6,7 +6,7 @@ properties: type: array - type: 'null' description: 'Certain misconfiguration rules have arguments. This field contains - the arguments in the form of an comma separated array. Example: ["MongoDB", + the arguments in the form of an comma separated array. Example: ["MongoDB", "TCP", "27017"]' title: Args isSuppressed: diff --git a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml index de64ae8a2..84cd56535 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml @@ -22,9 +22,11 @@ properties: - type: 'null' description: The type of cloud resource for the service. title: Assettype - fullPath: - description: Specifies the complete path where one can find the exact misconfiguration. - title: Fullpath + findingLocation: + description: 'For a misconfiguration: the cloud resource or a subelement of the + cloud resource. For a vulnerability: the cloud resource, + an OS image, or a filename.' + title: Findinglocation type: string region: description: The cloud region. @@ -41,6 +43,6 @@ required: - assetName - assetType - region -- fullPath +- findingLocation title: MisconfigurationWhereModel type: object diff --git a/api/services/security/v1/schemas/OrderBy.yaml b/api/services/security/v1/schemas/OrderBy.yaml new file mode 100644 index 000000000..367123d26 --- /dev/null +++ b/api/services/security/v1/schemas/OrderBy.yaml @@ -0,0 +1,32 @@ +description: 'See https://fastapi-utils.davidmontague.xyz/user-guide/basics/enums/ + + for understanding why we are using CamelStrEnum and auto()' +enum: +- item +- accId +- service +- assetType +- isRisky +- colDate +- region +- allFindingsCount +- allVulnCount +- criticalVulnCount +- highVulnCount +- mediumVulnCount +- lowVulnCount +- infoVulnCount +- allMisconfigCount +- highMisconfigCount +- mediumMisconfigCount +- lowMisconfigCount +- allEventsCount +- configEventsCount +- criticalEventsCount +- dataChangeEventsCount +- iamChangeEventsCount +- affectedAssetsCount +- allAnomaliesCount +- allThreatsCount +title: OrderBy +type: string diff --git a/api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml new file mode 100644 index 000000000..a1cc84942 --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml @@ -0,0 +1,23 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. + items: + $ref: ./AssetResponseModel.yaml + title: Items + type: array + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml +required: +- status +- items +- paginationInfo +title: PaginatedResponse[AssetResponseModel] +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml new file mode 100644 index 000000000..dcbf66b52 --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml @@ -0,0 +1,23 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. + items: + $ref: ./AssetSimFilterModel.yaml + title: Items + type: array + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml +required: +- status +- items +- paginationInfo +title: PaginatedResponse[AssetSimFilterModel] +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml index 69eb1b8f7..d43d8d19a 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_ComplianceModel_.yaml @@ -4,13 +4,6 @@ properties: description: The number of items. title: Count type: integer - currentToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the current - page of results. - title: Currenttoken items: description: The array of objects in this response. The length of the array is according to the 'count' attribute. @@ -18,27 +11,13 @@ properties: $ref: ./ComplianceModel.yaml title: Items type: array - nextToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the next - page of results. - title: Nexttoken - pageSize: - description: The maximum number of items in the page. The attribute 'item' indicates - the actual number of items in the page. - title: Pagesize - type: integer - previousToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the previous - page of results. - title: Previoustoken + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml required: +- status - items -- pageSize +- paginationInfo title: PaginatedResponse[ComplianceModel] type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml index f5f0ab622..04b280b25 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_ControlModel_.yaml @@ -4,13 +4,6 @@ properties: description: The number of items. title: Count type: integer - currentToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the current - page of results. - title: Currenttoken items: description: The array of objects in this response. The length of the array is according to the 'count' attribute. @@ -18,27 +11,13 @@ properties: $ref: ./ControlModel.yaml title: Items type: array - nextToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the next - page of results. - title: Nexttoken - pageSize: - description: The maximum number of items in the page. The attribute 'item' indicates - the actual number of items in the page. - title: Pagesize - type: integer - previousToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the previous - page of results. - title: Previoustoken + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml required: +- status - items -- pageSize +- paginationInfo title: PaginatedResponse[ControlModel] type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml index 42305bce7..9abdd2a7b 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_MisconfigurationModel_.yaml @@ -4,13 +4,6 @@ properties: description: The number of items. title: Count type: integer - currentToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the current - page of results. - title: Currenttoken items: description: The array of objects in this response. The length of the array is according to the 'count' attribute. @@ -18,27 +11,13 @@ properties: $ref: ./MisconfigurationModel.yaml title: Items type: array - nextToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the next - page of results. - title: Nexttoken - pageSize: - description: The maximum number of items in the page. The attribute 'item' indicates - the actual number of items in the page. - title: Pagesize - type: integer - previousToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the previous - page of results. - title: Previoustoken + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml required: +- status - items -- pageSize +- paginationInfo title: PaginatedResponse[MisconfigurationModel] type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml new file mode 100644 index 000000000..326d9cabb --- /dev/null +++ b/api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml @@ -0,0 +1,23 @@ +properties: + count: + default: 0 + description: The number of items. + title: Count + type: integer + items: + description: The array of objects in this response. The length of the array is + according to the 'count' attribute. + items: + $ref: ./ReportModel.yaml + title: Items + type: array + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml +required: +- status +- items +- paginationInfo +title: PaginatedResponse[ReportModel] +type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml index 7112eedd3..e60007f26 100644 --- a/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml +++ b/api/services/security/v1/schemas/PaginatedResponse_RulesModel_.yaml @@ -4,13 +4,6 @@ properties: description: The number of items. title: Count type: integer - currentToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the current - page of results. - title: Currenttoken items: description: The array of objects in this response. The length of the array is according to the 'count' attribute. @@ -18,27 +11,13 @@ properties: $ref: ./RulesModel.yaml title: Items type: array - nextToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the next - page of results. - title: Nexttoken - pageSize: - description: The maximum number of items in the page. The attribute 'item' indicates - the actual number of items in the page. - title: Pagesize - type: integer - previousToken: - anyOf: - - type: string - - type: 'null' - description: Each API call has a unique token. This is the token for the previous - page of results. - title: Previoustoken + paginationInfo: + $ref: ./PaginationModel.yaml + status: + $ref: ./StatusModel.yaml required: +- status - items -- pageSize +- paginationInfo title: PaginatedResponse[RulesModel] type: object diff --git a/api/services/security/v1/schemas/PaginationModel.yaml b/api/services/security/v1/schemas/PaginationModel.yaml new file mode 100644 index 000000000..5d4d24beb --- /dev/null +++ b/api/services/security/v1/schemas/PaginationModel.yaml @@ -0,0 +1,22 @@ +properties: + nextKey: + anyOf: + - type: string + - type: 'null' + description: Each API call has a unique token. This is the token for the next + page of results. + title: Nextkey + paginationSize: + description: The maximum number of items in the page. The attribute 'item' indicates + the actual number of items in the page. + title: Paginationsize + type: integer + previousKey: + anyOf: + - type: string + - type: 'null' + description: Each API call has a unique token. This is the token for the previous + page of results. + title: Previouskey +title: PaginationModel +type: object diff --git a/api/services/security/v1/schemas/ReportModel.yaml b/api/services/security/v1/schemas/ReportModel.yaml new file mode 100644 index 000000000..34e708ab6 --- /dev/null +++ b/api/services/security/v1/schemas/ReportModel.yaml @@ -0,0 +1,53 @@ +properties: + createdAt: + description: The creation time stamp + format: date-time + title: Createdat + type: string + createdBy: + description: The user who created the object + title: Createdby + type: string + id: + description: The unique identifier of the report + title: Id + type: integer + name: + description: The name of the report + title: Name + type: string + organizationId: + description: The Spot Organization ID. + title: Organizationid + type: string + s3Url: + anyOf: + - type: string + - type: 'null' + description: The S3 URL where the report is stored. + title: S3Url + status: + allOf: + - $ref: ./ReportStatus.yaml + description: The status of the report + updatedAt: + description: The last updated time stamp + format: date-time + title: Updatedat + type: string + userEmail: + description: The email of the user who triggered the operation for reporting, + notification or any other purpose. + title: Useremail + type: string +required: +- id +- organizationId +- name +- createdAt +- updatedAt +- createdBy +- userEmail +- status +title: ReportModel +type: object diff --git a/api/services/security/v1/schemas/ReportStatus.yaml b/api/services/security/v1/schemas/ReportStatus.yaml new file mode 100644 index 000000000..6f1473962 --- /dev/null +++ b/api/services/security/v1/schemas/ReportStatus.yaml @@ -0,0 +1,6 @@ +enum: +- SUCCESS +- FAILED +- IN_PROGRESS +title: ReportStatus +type: string diff --git a/api/services/security/v1/schemas/RequestModel.yaml b/api/services/security/v1/schemas/RequestModel.yaml new file mode 100644 index 000000000..1d22cd848 --- /dev/null +++ b/api/services/security/v1/schemas/RequestModel.yaml @@ -0,0 +1,32 @@ +properties: + body: + anyOf: + - type: object + - type: 'null' + title: Body + id: + anyOf: + - type: string + - type: 'null' + title: Id + method: + title: Method + type: string + queryParameters: + title: Queryparameters + type: object + timestamp: + title: Timestamp + type: string + url: + title: Url + type: string +required: +- id +- url +- method +- queryParameters +- body +- timestamp +title: RequestModel +type: object diff --git a/api/services/security/v1/schemas/RulesModel.yaml b/api/services/security/v1/schemas/RulesModel.yaml index 621d86099..244ce0b09 100644 --- a/api/services/security/v1/schemas/RulesModel.yaml +++ b/api/services/security/v1/schemas/RulesModel.yaml @@ -6,7 +6,7 @@ properties: type: array - type: 'null' description: 'Certain misconfiguration rules have arguments. This field contains - the arguments in the form of an comma separated array. Example: ["MongoDB", + the arguments in the form of an comma separated array. Example: ["MongoDB", "TCP", "27017"]' title: Args cloud: diff --git a/api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml b/api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml new file mode 100644 index 000000000..6fc061e65 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./BaseResponse_AssetTrendItem_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[BaseResponse[AssetTrendItem]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml b/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml new file mode 100644 index 000000000..326362180 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./BaseResponse_CountModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[BaseResponse[CountModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml new file mode 100644 index 000000000..e639c2892 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_AssetResponseModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[AssetResponseModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml new file mode 100644 index 000000000..14ada69f3 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_AssetSimFilterModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[AssetSimFilterModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml new file mode 100644 index 000000000..2e841ff26 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_ComplianceModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[ComplianceModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml new file mode 100644 index 000000000..d36e17c33 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_ControlModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[ControlModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml new file mode 100644 index 000000000..bcdf1a753 --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_MisconfigurationModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[MisconfigurationModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml new file mode 100644 index 000000000..41bc8896e --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_ReportModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[ReportModel]] +type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml new file mode 100644 index 000000000..38015faac --- /dev/null +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml @@ -0,0 +1,17 @@ +properties: + error: + anyOf: + - $ref: ./ErrorModel.yaml + - type: 'null' + request: + $ref: ./RequestModel.yaml + response: + allOf: + - $ref: ./PaginatedResponse_RulesModel_.yaml + responseTime: + title: Responsetime + type: number +required: +- request +title: SpotResponse[PaginatedResponse[RulesModel]] +type: object diff --git a/api/services/security/v1/schemas/StatusModel.yaml b/api/services/security/v1/schemas/StatusModel.yaml new file mode 100644 index 000000000..1e82dac79 --- /dev/null +++ b/api/services/security/v1/schemas/StatusModel.yaml @@ -0,0 +1,12 @@ +properties: + code: + title: Code + type: integer + message: + title: Message + type: string +required: +- code +- message +title: StatusModel +type: object diff --git a/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml b/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml new file mode 100644 index 000000000..187e1baa3 --- /dev/null +++ b/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml @@ -0,0 +1,6 @@ +description: Enumeration of supported cloud providers. +enum: +- aws +- azure +title: CloudProvider +type: string diff --git a/api/services/security/v1/schemas/CloudProvider.yaml b/api/services/security/v1/schemas/databases__constant__CloudProvider.yaml similarity index 100% rename from api/services/security/v1/schemas/CloudProvider.yaml rename to api/services/security/v1/schemas/databases__constant__CloudProvider.yaml From c4f7ccb40b073f79e76bc508cb1e7678f2399c2c Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Tue, 26 Nov 2024 13:25:00 +0530 Subject: [PATCH 5/9] updated: removed some of the unused files --- .../security/v1/parameters/cloud_query.yaml | 2 +- .../security/v1/schemas/AssetFilters.yaml | 10 - .../v1/schemas/AssetResponseModel.yaml | 544 ------------------ .../v1/schemas/AssetSimFilterModel.yaml | 9 - .../security/v1/schemas/AssetTrendItem.yaml | 376 ------------ .../schemas/BaseResponse_AssetTrendItem_.yaml | 20 - ..._CloudProvider.yaml => CloudProvider.yaml} | 0 api/services/security/v1/schemas/OrderBy.yaml | 32 -- ...PaginatedResponse_AssetResponseModel_.yaml | 23 - ...aginatedResponse_AssetSimFilterModel_.yaml | 23 - .../PaginatedResponse_ReportModel_.yaml | 23 - .../security/v1/schemas/ReportModel.yaml | 53 -- .../security/v1/schemas/ReportStatus.yaml | 6 - ...esponse_BaseResponse_AssetTrendItem__.yaml | 17 - ...aginatedResponse_AssetResponseModel__.yaml | 17 - ...ginatedResponse_AssetSimFilterModel__.yaml | 17 - ...ponse_PaginatedResponse_ReportModel__.yaml | 17 - .../cloud__constant__base__CloudProvider.yaml | 6 - 18 files changed, 1 insertion(+), 1194 deletions(-) delete mode 100644 api/services/security/v1/schemas/AssetFilters.yaml delete mode 100644 api/services/security/v1/schemas/AssetResponseModel.yaml delete mode 100644 api/services/security/v1/schemas/AssetSimFilterModel.yaml delete mode 100644 api/services/security/v1/schemas/AssetTrendItem.yaml delete mode 100644 api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml rename api/services/security/v1/schemas/{databases__constant__CloudProvider.yaml => CloudProvider.yaml} (100%) delete mode 100644 api/services/security/v1/schemas/OrderBy.yaml delete mode 100644 api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml delete mode 100644 api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml delete mode 100644 api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml delete mode 100644 api/services/security/v1/schemas/ReportModel.yaml delete mode 100644 api/services/security/v1/schemas/ReportStatus.yaml delete mode 100644 api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml delete mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml delete mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml delete mode 100644 api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml delete mode 100644 api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml diff --git a/api/services/security/v1/parameters/cloud_query.yaml b/api/services/security/v1/parameters/cloud_query.yaml index 94130bb45..67f1f324a 100644 --- a/api/services/security/v1/parameters/cloud_query.yaml +++ b/api/services/security/v1/parameters/cloud_query.yaml @@ -2,4 +2,4 @@ in: query name: cloud required: true schema: - $ref: "../schemas/databases__constant__CloudProvider.yaml" + $ref: "../schemas/CloudProvider.yaml" diff --git a/api/services/security/v1/schemas/AssetFilters.yaml b/api/services/security/v1/schemas/AssetFilters.yaml deleted file mode 100644 index cfc54e14b..000000000 --- a/api/services/security/v1/schemas/AssetFilters.yaml +++ /dev/null @@ -1,10 +0,0 @@ -enum: -- accountId -- accountName -- region -- assetId -- assetName -- service -- assetType -title: AssetFilters -type: string diff --git a/api/services/security/v1/schemas/AssetResponseModel.yaml b/api/services/security/v1/schemas/AssetResponseModel.yaml deleted file mode 100644 index c7bdb1b6d..000000000 --- a/api/services/security/v1/schemas/AssetResponseModel.yaml +++ /dev/null @@ -1,544 +0,0 @@ -properties: - accountId: - description: The cloud account ID. For AWS this is the account ID. For Azure, - this is the subscription ID. - title: Accountid - type: string - accountName: - anyOf: - - type: string - - type: 'null' - description: The name of the cloud account. - title: Accountname - affectedAssetsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of neighboring assets affected by the finding.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Affectedassetscount - affectedAssetsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Affectedassetscountdeviation - allAnomaliesCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of anomalies found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allanomaliescount - allAnomaliesCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Allanomaliescountdeviation - allEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Alleventscount - allEventsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Alleventscountdeviation - allFindingsCount: - anyOf: - - type: integer - - type: 'null' - description: Sum of vulnerabilities, misconfigurations, threats and anomalies - title: Allfindingscount - allFindingsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Allfindingscountdeviation - allMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allmisconfigcount - allMisconfigCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Allmisconfigcountdeviation - allThreatsCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of threats found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allthreatscount - allThreatsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Allthreatscountdeviation - allVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allvulncount - allVulnCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Allvulncountdeviation - assetId: - description: The asset's ID (a cloud resource). - title: Assetid - type: string - assetName: - description: The name of the asset ID. - title: Assetname - type: string - assetType: - description: The type of cloud resource for the service. - title: Assettype - type: string - cloud: - description: The name of the cloud. - title: Cloud - type: string - collectionDate: - description: The date the finding was most recently found (YYYY-MM-DD). - format: date - title: Collectiondate - type: string - configEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of configuration events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Configeventscount - configEventsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Configeventscountdeviation - criticalEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of critical events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Criticaleventscount - criticalEventsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Criticaleventscountdeviation - criticalVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of critical vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Criticalvulncount - criticalVulnCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Criticalvulncountdeviation - dataChangeEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of data change events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Datachangeeventscount - dataChangeEventsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Datachangeeventscountdeviation - highMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of high misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Highmisconfigcount - highMisconfigCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Highmisconfigcountdeviation - highVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of high vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Highvulncount - highVulnCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Highvulncountdeviation - iamChangeEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of IAM change events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Iamchangeeventscount - iamChangeEventsCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Iamchangeeventscountdeviation - infoVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of informational vulnerabilities found for the asset.\n - \
\n Enter either a number or prefix it with one of the following - operators.\n \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Infovulncount - infoVulnCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Infovulncountdeviation - isRisky: - anyOf: - - type: boolean - - type: 'null' - description: True if there are findings discovered for the asset - title: Isrisky - lowMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of low misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Lowmisconfigcount - lowMisconfigCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Lowmisconfigcountdeviation - lowVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of low vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Lowvulncount - lowVulnCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Lowvulncountdeviation - mediumMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of medium misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Mediummisconfigcount - mediumMisconfigCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Mediummisconfigcountdeviation - mediumVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of medium vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Mediumvulncount - mediumVulnCountDeviation: - anyOf: - - type: integer - - type: 'null' - description: Indicates how much the count deviated from historic average in percentage. - title: Mediumvulncountdeviation - organizationId: - description: The Spot Organization ID. - title: Organizationid - type: string - region: - description: The cloud region. - title: Region - type: string - service: - description: The cloud service. - title: Service - type: string - updatedAt: - description: The last updated time stamp - format: date-time - title: Updatedat - type: string -required: -- organizationId -- accountId -- assetId -- assetName -- collectionDate -title: AssetResponseModel -type: object diff --git a/api/services/security/v1/schemas/AssetSimFilterModel.yaml b/api/services/security/v1/schemas/AssetSimFilterModel.yaml deleted file mode 100644 index 3d67df112..000000000 --- a/api/services/security/v1/schemas/AssetSimFilterModel.yaml +++ /dev/null @@ -1,9 +0,0 @@ -properties: - value: - anyOf: - - type: string - - type: 'null' - description: The result of the request - title: Value -title: AssetSimFilterModel -type: object diff --git a/api/services/security/v1/schemas/AssetTrendItem.yaml b/api/services/security/v1/schemas/AssetTrendItem.yaml deleted file mode 100644 index 54b85e8c5..000000000 --- a/api/services/security/v1/schemas/AssetTrendItem.yaml +++ /dev/null @@ -1,376 +0,0 @@ -properties: - affectedAssetsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of neighboring assets affected by the finding.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Affectedassetscount - allAnomaliesCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of anomalies found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allanomaliescount - allEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Alleventscount - allFindingsCount: - anyOf: - - type: integer - - type: 'null' - description: Sum of vulnerabilities, misconfigurations, threats and anomalies - title: Allfindingscount - allMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allmisconfigcount - allThreatsCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of threats found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allthreatscount - allVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The total number of vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Allvulncount - configEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of configuration events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Configeventscount - criticalEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of critical events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Criticaleventscount - criticalVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of critical vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Criticalvulncount - dataChangeEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of data change events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Datachangeeventscount - date: - description: The date the finding was most recently found (YYYY-MM-DD). - format: date - title: Date - type: string - highMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of high misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Highmisconfigcount - highVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of high vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Highvulncount - iamChangeEventsCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of IAM change events found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Iamchangeeventscount - infoVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of informational vulnerabilities found for the asset.\n - \
\n Enter either a number or prefix it with one of the following - operators.\n \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Infovulncount - lowMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of low misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Lowmisconfigcount - lowVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of low vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Lowvulncount - mediumMisconfigCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of medium misconfigurations found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Mediummisconfigcount - mediumVulnCount: - anyOf: - - type: integer - - type: 'null' - description: "The number of medium vulnerabilities found for the asset.\n
\n - \ Enter either a number or prefix it with one of the following operators.\n - \ \n \n \n \n - \ \n \n \n \n - \ \n \n - \ \n \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n \n - \ \n \n \n - \ \n \n \n \n \n \n - \ \n
OperatorNotationExample
EqualsNo prefix or optionally \\~eq\\~10 or \\~eq\\~10
Not equals\\~neq\\~\\~neq\\~10
Greater - than\\~gt\\~\\~gt\\~10
Greater than equals\\~gte\\~\\~gte\\~10
Less - than\\~lt\\~\\~lt\\~10
Less than equals\\~lte\\~\\~lte\\~10
Between - two ranges\\~bt\\~\\~bt\\~10,20
\n " - title: Mediumvulncount -required: -- date -title: AssetTrendItem -type: object diff --git a/api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml b/api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml deleted file mode 100644 index 57e97cbce..000000000 --- a/api/services/security/v1/schemas/BaseResponse_AssetTrendItem_.yaml +++ /dev/null @@ -1,20 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./AssetTrendItem.yaml - title: Items - type: array - status: - $ref: ./StatusModel.yaml -required: -- status -- items -title: BaseResponse[AssetTrendItem] -type: object diff --git a/api/services/security/v1/schemas/databases__constant__CloudProvider.yaml b/api/services/security/v1/schemas/CloudProvider.yaml similarity index 100% rename from api/services/security/v1/schemas/databases__constant__CloudProvider.yaml rename to api/services/security/v1/schemas/CloudProvider.yaml diff --git a/api/services/security/v1/schemas/OrderBy.yaml b/api/services/security/v1/schemas/OrderBy.yaml deleted file mode 100644 index 367123d26..000000000 --- a/api/services/security/v1/schemas/OrderBy.yaml +++ /dev/null @@ -1,32 +0,0 @@ -description: 'See https://fastapi-utils.davidmontague.xyz/user-guide/basics/enums/ - - for understanding why we are using CamelStrEnum and auto()' -enum: -- item -- accId -- service -- assetType -- isRisky -- colDate -- region -- allFindingsCount -- allVulnCount -- criticalVulnCount -- highVulnCount -- mediumVulnCount -- lowVulnCount -- infoVulnCount -- allMisconfigCount -- highMisconfigCount -- mediumMisconfigCount -- lowMisconfigCount -- allEventsCount -- configEventsCount -- criticalEventsCount -- dataChangeEventsCount -- iamChangeEventsCount -- affectedAssetsCount -- allAnomaliesCount -- allThreatsCount -title: OrderBy -type: string diff --git a/api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml deleted file mode 100644 index a1cc84942..000000000 --- a/api/services/security/v1/schemas/PaginatedResponse_AssetResponseModel_.yaml +++ /dev/null @@ -1,23 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./AssetResponseModel.yaml - title: Items - type: array - paginationInfo: - $ref: ./PaginationModel.yaml - status: - $ref: ./StatusModel.yaml -required: -- status -- items -- paginationInfo -title: PaginatedResponse[AssetResponseModel] -type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml deleted file mode 100644 index dcbf66b52..000000000 --- a/api/services/security/v1/schemas/PaginatedResponse_AssetSimFilterModel_.yaml +++ /dev/null @@ -1,23 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./AssetSimFilterModel.yaml - title: Items - type: array - paginationInfo: - $ref: ./PaginationModel.yaml - status: - $ref: ./StatusModel.yaml -required: -- status -- items -- paginationInfo -title: PaginatedResponse[AssetSimFilterModel] -type: object diff --git a/api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml b/api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml deleted file mode 100644 index 326d9cabb..000000000 --- a/api/services/security/v1/schemas/PaginatedResponse_ReportModel_.yaml +++ /dev/null @@ -1,23 +0,0 @@ -properties: - count: - default: 0 - description: The number of items. - title: Count - type: integer - items: - description: The array of objects in this response. The length of the array is - according to the 'count' attribute. - items: - $ref: ./ReportModel.yaml - title: Items - type: array - paginationInfo: - $ref: ./PaginationModel.yaml - status: - $ref: ./StatusModel.yaml -required: -- status -- items -- paginationInfo -title: PaginatedResponse[ReportModel] -type: object diff --git a/api/services/security/v1/schemas/ReportModel.yaml b/api/services/security/v1/schemas/ReportModel.yaml deleted file mode 100644 index 34e708ab6..000000000 --- a/api/services/security/v1/schemas/ReportModel.yaml +++ /dev/null @@ -1,53 +0,0 @@ -properties: - createdAt: - description: The creation time stamp - format: date-time - title: Createdat - type: string - createdBy: - description: The user who created the object - title: Createdby - type: string - id: - description: The unique identifier of the report - title: Id - type: integer - name: - description: The name of the report - title: Name - type: string - organizationId: - description: The Spot Organization ID. - title: Organizationid - type: string - s3Url: - anyOf: - - type: string - - type: 'null' - description: The S3 URL where the report is stored. - title: S3Url - status: - allOf: - - $ref: ./ReportStatus.yaml - description: The status of the report - updatedAt: - description: The last updated time stamp - format: date-time - title: Updatedat - type: string - userEmail: - description: The email of the user who triggered the operation for reporting, - notification or any other purpose. - title: Useremail - type: string -required: -- id -- organizationId -- name -- createdAt -- updatedAt -- createdBy -- userEmail -- status -title: ReportModel -type: object diff --git a/api/services/security/v1/schemas/ReportStatus.yaml b/api/services/security/v1/schemas/ReportStatus.yaml deleted file mode 100644 index 6f1473962..000000000 --- a/api/services/security/v1/schemas/ReportStatus.yaml +++ /dev/null @@ -1,6 +0,0 @@ -enum: -- SUCCESS -- FAILED -- IN_PROGRESS -title: ReportStatus -type: string diff --git a/api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml b/api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml deleted file mode 100644 index 6fc061e65..000000000 --- a/api/services/security/v1/schemas/SpotResponse_BaseResponse_AssetTrendItem__.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - error: - anyOf: - - $ref: ./ErrorModel.yaml - - type: 'null' - request: - $ref: ./RequestModel.yaml - response: - allOf: - - $ref: ./BaseResponse_AssetTrendItem_.yaml - responseTime: - title: Responsetime - type: number -required: -- request -title: SpotResponse[BaseResponse[AssetTrendItem]] -type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml deleted file mode 100644 index e639c2892..000000000 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetResponseModel__.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - error: - anyOf: - - $ref: ./ErrorModel.yaml - - type: 'null' - request: - $ref: ./RequestModel.yaml - response: - allOf: - - $ref: ./PaginatedResponse_AssetResponseModel_.yaml - responseTime: - title: Responsetime - type: number -required: -- request -title: SpotResponse[PaginatedResponse[AssetResponseModel]] -type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml deleted file mode 100644 index 14ada69f3..000000000 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_AssetSimFilterModel__.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - error: - anyOf: - - $ref: ./ErrorModel.yaml - - type: 'null' - request: - $ref: ./RequestModel.yaml - response: - allOf: - - $ref: ./PaginatedResponse_AssetSimFilterModel_.yaml - responseTime: - title: Responsetime - type: number -required: -- request -title: SpotResponse[PaginatedResponse[AssetSimFilterModel]] -type: object diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml deleted file mode 100644 index 41bc8896e..000000000 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ReportModel__.yaml +++ /dev/null @@ -1,17 +0,0 @@ -properties: - error: - anyOf: - - $ref: ./ErrorModel.yaml - - type: 'null' - request: - $ref: ./RequestModel.yaml - response: - allOf: - - $ref: ./PaginatedResponse_ReportModel_.yaml - responseTime: - title: Responsetime - type: number -required: -- request -title: SpotResponse[PaginatedResponse[ReportModel]] -type: object diff --git a/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml b/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml deleted file mode 100644 index 187e1baa3..000000000 --- a/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml +++ /dev/null @@ -1,6 +0,0 @@ -description: Enumeration of supported cloud providers. -enum: -- aws -- azure -title: CloudProvider -type: string From 06b9a61532506163c539d3d0cc94764b6464d73b Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Tue, 26 Nov 2024 13:57:06 +0530 Subject: [PATCH 6/9] fix --- api/services/security/v1/parameters/paginationKey_query.yaml | 2 ++ api/services/security/v1/parameters/paginationSize_query.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/services/security/v1/parameters/paginationKey_query.yaml b/api/services/security/v1/parameters/paginationKey_query.yaml index 2f0aa91ae..285851343 100644 --- a/api/services/security/v1/parameters/paginationKey_query.yaml +++ b/api/services/security/v1/parameters/paginationKey_query.yaml @@ -1,3 +1,4 @@ +description: Token of the page to return. in: query name: paginationKey required: false @@ -5,4 +6,5 @@ schema: anyOf: - type: string - type: 'null' + description: Token of the page to return. title: Paginationkey diff --git a/api/services/security/v1/parameters/paginationSize_query.yaml b/api/services/security/v1/parameters/paginationSize_query.yaml index 02c7aaca6..81f629373 100644 --- a/api/services/security/v1/parameters/paginationSize_query.yaml +++ b/api/services/security/v1/parameters/paginationSize_query.yaml @@ -1,3 +1,4 @@ +description: Number of items to return per page. in: query name: paginationSize required: false @@ -8,4 +9,5 @@ schema: type: integer - type: 'null' default: 100 + description: Number of items to return per page. title: Paginationsize From 2a42d667bfaf098799b4f1701555004a1b27eec3 Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Thu, 5 Dec 2024 19:15:07 +0530 Subject: [PATCH 7/9] updated: schema for null removal --- .../v1/parameters/accountId_query.yaml | 10 ++++++ .../v1/parameters/accountName_query.yaml | 8 +++++ .../security/v1/parameters/assetId_query.yaml | 4 +-- .../v1/parameters/assetType_query.yaml | 9 ++--- .../security/v1/parameters/cloud_query.yaml | 2 +- .../v1/parameters/complianceName_query.yaml | 4 +-- .../v1/parameters/controlId_query.yaml | 4 +-- .../security/v1/parameters/date_query.yaml | 10 ++++++ .../v1/parameters/excludeAccounts_query.yaml | 12 ------- .../v1/parameters/includeAccounts_query.yaml | 12 ------- .../v1/parameters/notAccountId_query.yaml | 10 ++++++ .../v1/parameters/notAccountName_query.yaml | 8 +++++ .../v1/parameters/notAssetType_query.yaml | 8 +++++ .../v1/parameters/notRegion_query.yaml | 9 +++++ .../v1/parameters/notService_query.yaml | 8 +++++ .../v1/parameters/paginationKey_query.yaml | 6 +--- .../v1/parameters/paginationSize_query.yaml | 10 ++---- .../security/v1/parameters/region_query.yaml | 8 ++--- .../v1/parameters/ruleName_query.yaml | 4 +-- ...services_query.yaml => service_query.yaml} | 9 ++--- .../security/v1/paths/misconfigurations.yaml | 14 +++++--- .../v1/paths/misconfigurations_count.yaml | 14 +++++--- api/services/security/v1/paths/rules.yaml | 2 +- .../security/v1/paths/rules_count.yaml | 2 +- .../v1/schemas/MisconfigurationWhatModel.yaml | 12 +++---- .../v1/schemas/MisconfigurationWhenModel.yaml | 6 ++-- .../schemas/MisconfigurationWhereModel.yaml | 20 ++++------- .../v1/schemas/MisconfigurationWhoModel.yaml | 4 +-- .../security/v1/schemas/PaginationModel.yaml | 8 ++--- .../security/v1/schemas/RequestModel.yaml | 8 ++--- .../security/v1/schemas/RulesModel.yaml | 34 +++++++------------ ...potResponse_BaseResponse_CountModel__.yaml | 4 +-- ...e_PaginatedResponse_ComplianceModel__.yaml | 4 +-- ...onse_PaginatedResponse_ControlModel__.yaml | 4 +-- ...natedResponse_MisconfigurationModel__.yaml | 4 +-- ...sponse_PaginatedResponse_RulesModel__.yaml | 4 +-- .../cloud__constant__base__CloudProvider.yaml | 6 ++++ ...> databases__constant__CloudProvider.yaml} | 0 38 files changed, 158 insertions(+), 147 deletions(-) create mode 100644 api/services/security/v1/parameters/accountId_query.yaml create mode 100644 api/services/security/v1/parameters/accountName_query.yaml create mode 100644 api/services/security/v1/parameters/date_query.yaml delete mode 100644 api/services/security/v1/parameters/excludeAccounts_query.yaml delete mode 100644 api/services/security/v1/parameters/includeAccounts_query.yaml create mode 100644 api/services/security/v1/parameters/notAccountId_query.yaml create mode 100644 api/services/security/v1/parameters/notAccountName_query.yaml create mode 100644 api/services/security/v1/parameters/notAssetType_query.yaml create mode 100644 api/services/security/v1/parameters/notRegion_query.yaml create mode 100644 api/services/security/v1/parameters/notService_query.yaml rename api/services/security/v1/parameters/{services_query.yaml => service_query.yaml} (62%) create mode 100644 api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml rename api/services/security/v1/schemas/{CloudProvider.yaml => databases__constant__CloudProvider.yaml} (100%) diff --git a/api/services/security/v1/parameters/accountId_query.yaml b/api/services/security/v1/parameters/accountId_query.yaml new file mode 100644 index 000000000..95c6d945b --- /dev/null +++ b/api/services/security/v1/parameters/accountId_query.yaml @@ -0,0 +1,10 @@ +description: A comma-separated list of cloud account IDs. For AWS this is the account + ID. For Azure, this is the subscription ID. +in: query +name: accountId +required: false +schema: + description: A comma-separated list of cloud account IDs. For AWS this is the account + ID. For Azure, this is the subscription ID. + title: Accountid + type: string diff --git a/api/services/security/v1/parameters/accountName_query.yaml b/api/services/security/v1/parameters/accountName_query.yaml new file mode 100644 index 000000000..6543f7b10 --- /dev/null +++ b/api/services/security/v1/parameters/accountName_query.yaml @@ -0,0 +1,8 @@ +description: A comma-separated list of cloud account names. +in: query +name: accountName +required: false +schema: + description: A comma-separated list of cloud account names. + title: Accountname + type: string diff --git a/api/services/security/v1/parameters/assetId_query.yaml b/api/services/security/v1/parameters/assetId_query.yaml index 542cd0abc..d705a0dea 100644 --- a/api/services/security/v1/parameters/assetId_query.yaml +++ b/api/services/security/v1/parameters/assetId_query.yaml @@ -3,8 +3,6 @@ in: query name: assetId required: false schema: - anyOf: - - type: string - - type: 'null' description: The asset's ID (a cloud resource). title: Assetid + type: string diff --git a/api/services/security/v1/parameters/assetType_query.yaml b/api/services/security/v1/parameters/assetType_query.yaml index 0f00176f6..3927c7444 100644 --- a/api/services/security/v1/parameters/assetType_query.yaml +++ b/api/services/security/v1/parameters/assetType_query.yaml @@ -1,11 +1,8 @@ -description: The type of cloud resource for the service. -example: security_groups +description: A comma-separated list of cloud resource for the service. in: query name: assetType required: false schema: - anyOf: - - type: string - - type: 'null' - description: The type of cloud resource for the service. + description: A comma-separated list of cloud resource for the service. title: Assettype + type: string diff --git a/api/services/security/v1/parameters/cloud_query.yaml b/api/services/security/v1/parameters/cloud_query.yaml index 67f1f324a..b6c27b7ca 100644 --- a/api/services/security/v1/parameters/cloud_query.yaml +++ b/api/services/security/v1/parameters/cloud_query.yaml @@ -2,4 +2,4 @@ in: query name: cloud required: true schema: - $ref: "../schemas/CloudProvider.yaml" + $ref: "../schemas/cloud__constant__base__CloudProvider.yaml" diff --git a/api/services/security/v1/parameters/complianceName_query.yaml b/api/services/security/v1/parameters/complianceName_query.yaml index c85fdcc1f..ac8c6c4db 100644 --- a/api/services/security/v1/parameters/complianceName_query.yaml +++ b/api/services/security/v1/parameters/complianceName_query.yaml @@ -4,8 +4,6 @@ in: query name: complianceName required: false schema: - anyOf: - - type: string - - type: 'null' description: The name of the cyber security compliance. title: Compliancename + type: string diff --git a/api/services/security/v1/parameters/controlId_query.yaml b/api/services/security/v1/parameters/controlId_query.yaml index 26117bb01..f48461404 100644 --- a/api/services/security/v1/parameters/controlId_query.yaml +++ b/api/services/security/v1/parameters/controlId_query.yaml @@ -4,8 +4,6 @@ in: query name: controlId required: false schema: - anyOf: - - type: string - - type: 'null' description: The ID of the control defined in the compliance. title: Controlid + type: string diff --git a/api/services/security/v1/parameters/date_query.yaml b/api/services/security/v1/parameters/date_query.yaml new file mode 100644 index 000000000..26b8c74c7 --- /dev/null +++ b/api/services/security/v1/parameters/date_query.yaml @@ -0,0 +1,10 @@ +description: The date the finding was most recently found (YYYY-MM-DD). +example: '1997-11-11' +in: query +name: date +required: false +schema: + description: The date the finding was most recently found (YYYY-MM-DD). + format: date + title: Date + type: string diff --git a/api/services/security/v1/parameters/excludeAccounts_query.yaml b/api/services/security/v1/parameters/excludeAccounts_query.yaml deleted file mode 100644 index 1e9bef1b6..000000000 --- a/api/services/security/v1/parameters/excludeAccounts_query.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Comma-separated AWS account IDs or Azure subscription IDs to exclude. - You can have up to 10 IDs. -in: query -name: excludeAccounts -required: false -schema: - anyOf: - - type: string - - type: 'null' - description: Comma-separated AWS account IDs or Azure subscription IDs to exclude. - You can have up to 10 IDs. - title: Excludeaccounts diff --git a/api/services/security/v1/parameters/includeAccounts_query.yaml b/api/services/security/v1/parameters/includeAccounts_query.yaml deleted file mode 100644 index 908c650e3..000000000 --- a/api/services/security/v1/parameters/includeAccounts_query.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Comma-separated AWS account IDs or Azure subscription IDs to include. - You can have up to 10 IDs. -in: query -name: includeAccounts -required: false -schema: - anyOf: - - type: string - - type: 'null' - description: Comma-separated AWS account IDs or Azure subscription IDs to include. - You can have up to 10 IDs. - title: Includeaccounts diff --git a/api/services/security/v1/parameters/notAccountId_query.yaml b/api/services/security/v1/parameters/notAccountId_query.yaml new file mode 100644 index 000000000..abaef797e --- /dev/null +++ b/api/services/security/v1/parameters/notAccountId_query.yaml @@ -0,0 +1,10 @@ +description: A comma-separated list of cloud account IDs to exclude. For AWS this + is the account ID. For Azure, this is the subscription ID. +in: query +name: notAccountId +required: false +schema: + description: A comma-separated list of cloud account IDs to exclude. For AWS this + is the account ID. For Azure, this is the subscription ID. + title: Notaccountid + type: string diff --git a/api/services/security/v1/parameters/notAccountName_query.yaml b/api/services/security/v1/parameters/notAccountName_query.yaml new file mode 100644 index 000000000..2add4be0c --- /dev/null +++ b/api/services/security/v1/parameters/notAccountName_query.yaml @@ -0,0 +1,8 @@ +description: A comma-separated list of cloud account names to exclude +in: query +name: notAccountName +required: false +schema: + description: A comma-separated list of cloud account names to exclude + title: Notaccountname + type: string diff --git a/api/services/security/v1/parameters/notAssetType_query.yaml b/api/services/security/v1/parameters/notAssetType_query.yaml new file mode 100644 index 000000000..ad5caeabe --- /dev/null +++ b/api/services/security/v1/parameters/notAssetType_query.yaml @@ -0,0 +1,8 @@ +description: A comma-separated list of cloud resource for the service to exclude. +in: query +name: notAssetType +required: false +schema: + description: A comma-separated list of cloud resource for the service to exclude. + title: Notassettype + type: string diff --git a/api/services/security/v1/parameters/notRegion_query.yaml b/api/services/security/v1/parameters/notRegion_query.yaml new file mode 100644 index 000000000..8834aa51c --- /dev/null +++ b/api/services/security/v1/parameters/notRegion_query.yaml @@ -0,0 +1,9 @@ +description: A comma-separated list of cloud regions to exclude. +example: us-east-1 +in: query +name: notRegion +required: false +schema: + description: A comma-separated list of cloud regions to exclude. + title: Notregion + type: string diff --git a/api/services/security/v1/parameters/notService_query.yaml b/api/services/security/v1/parameters/notService_query.yaml new file mode 100644 index 000000000..4523f2ee5 --- /dev/null +++ b/api/services/security/v1/parameters/notService_query.yaml @@ -0,0 +1,8 @@ +description: A comma-separated list of cloud services to exclude. +in: query +name: notService +required: false +schema: + description: A comma-separated list of cloud services to exclude. + title: Notservice + type: string diff --git a/api/services/security/v1/parameters/paginationKey_query.yaml b/api/services/security/v1/parameters/paginationKey_query.yaml index 285851343..badec02ce 100644 --- a/api/services/security/v1/parameters/paginationKey_query.yaml +++ b/api/services/security/v1/parameters/paginationKey_query.yaml @@ -1,10 +1,6 @@ -description: Token of the page to return. in: query name: paginationKey required: false schema: - anyOf: - - type: string - - type: 'null' - description: Token of the page to return. title: Paginationkey + type: string diff --git a/api/services/security/v1/parameters/paginationSize_query.yaml b/api/services/security/v1/parameters/paginationSize_query.yaml index 81f629373..cb226b124 100644 --- a/api/services/security/v1/parameters/paginationSize_query.yaml +++ b/api/services/security/v1/parameters/paginationSize_query.yaml @@ -1,13 +1,9 @@ -description: Number of items to return per page. in: query name: paginationSize required: false schema: - anyOf: - - maximum: 100 - minimum: 1 - type: integer - - type: 'null' default: 100 - description: Number of items to return per page. + maximum: 100 + minimum: 1 title: Paginationsize + type: integer diff --git a/api/services/security/v1/parameters/region_query.yaml b/api/services/security/v1/parameters/region_query.yaml index 1463478ea..0178cd687 100644 --- a/api/services/security/v1/parameters/region_query.yaml +++ b/api/services/security/v1/parameters/region_query.yaml @@ -1,11 +1,9 @@ -description: The cloud region. +description: A comma-separated list of cloud regions. example: us-east-1 in: query name: region required: false schema: - anyOf: - - type: string - - type: 'null' - description: The cloud region. + description: A comma-separated list of cloud regions. title: Region + type: string diff --git a/api/services/security/v1/parameters/ruleName_query.yaml b/api/services/security/v1/parameters/ruleName_query.yaml index 5b28e6280..22b3a4ec5 100644 --- a/api/services/security/v1/parameters/ruleName_query.yaml +++ b/api/services/security/v1/parameters/ruleName_query.yaml @@ -3,8 +3,6 @@ in: query name: ruleName required: false schema: - anyOf: - - type: string - - type: 'null' description: The unique name of the rule. title: Rulename + type: string diff --git a/api/services/security/v1/parameters/services_query.yaml b/api/services/security/v1/parameters/service_query.yaml similarity index 62% rename from api/services/security/v1/parameters/services_query.yaml rename to api/services/security/v1/parameters/service_query.yaml index f81535477..1c67e9cc4 100644 --- a/api/services/security/v1/parameters/services_query.yaml +++ b/api/services/security/v1/parameters/service_query.yaml @@ -1,11 +1,8 @@ description: A comma-separated list of cloud services. -example: ec2 in: query -name: services +name: service required: false schema: - anyOf: - - type: string - - type: 'null' description: A comma-separated list of cloud services. - title: Services + title: Service + type: string diff --git a/api/services/security/v1/paths/misconfigurations.yaml b/api/services/security/v1/paths/misconfigurations.yaml index 531fe3b65..cb2f88ad4 100644 --- a/api/services/security/v1/paths/misconfigurations.yaml +++ b/api/services/security/v1/paths/misconfigurations.yaml @@ -3,12 +3,18 @@ get: operationId: get_misconfigurations_v1_misconfigurations_get parameters: - $ref: "../parameters/cloud_query.yaml" - - $ref: "../parameters/ruleName_query.yaml" - - $ref: "../parameters/includeAccounts_query.yaml" - - $ref: "../parameters/excludeAccounts_query.yaml" - - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/accountId_query.yaml" + - $ref: "../parameters/notAccountId_query.yaml" + - $ref: "../parameters/accountName_query.yaml" + - $ref: "../parameters/notAccountName_query.yaml" - $ref: "../parameters/region_query.yaml" + - $ref: "../parameters/notRegion_query.yaml" + - $ref: "../parameters/date_query.yaml" + - $ref: "../parameters/service_query.yaml" + - $ref: "../parameters/notService_query.yaml" - $ref: "../parameters/assetType_query.yaml" + - $ref: "../parameters/notAssetType_query.yaml" + - $ref: "../parameters/ruleName_query.yaml" - $ref: "../parameters/assetId_query.yaml" - $ref: "../parameters/paginationKey_query.yaml" - $ref: "../parameters/paginationSize_query.yaml" diff --git a/api/services/security/v1/paths/misconfigurations_count.yaml b/api/services/security/v1/paths/misconfigurations_count.yaml index 0ef350d17..2ab651c62 100644 --- a/api/services/security/v1/paths/misconfigurations_count.yaml +++ b/api/services/security/v1/paths/misconfigurations_count.yaml @@ -3,12 +3,18 @@ get: operationId: get_misconfigurations_count_v1_misconfigurations_count_get parameters: - $ref: "../parameters/cloud_query.yaml" - - $ref: "../parameters/ruleName_query.yaml" - - $ref: "../parameters/includeAccounts_query.yaml" - - $ref: "../parameters/excludeAccounts_query.yaml" - - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/accountId_query.yaml" + - $ref: "../parameters/notAccountId_query.yaml" + - $ref: "../parameters/accountName_query.yaml" + - $ref: "../parameters/notAccountName_query.yaml" - $ref: "../parameters/region_query.yaml" + - $ref: "../parameters/notRegion_query.yaml" + - $ref: "../parameters/date_query.yaml" + - $ref: "../parameters/service_query.yaml" + - $ref: "../parameters/notService_query.yaml" - $ref: "../parameters/assetType_query.yaml" + - $ref: "../parameters/notAssetType_query.yaml" + - $ref: "../parameters/ruleName_query.yaml" - $ref: "../parameters/assetId_query.yaml" responses: '200': diff --git a/api/services/security/v1/paths/rules.yaml b/api/services/security/v1/paths/rules.yaml index 2aaa1b480..691b28f10 100644 --- a/api/services/security/v1/paths/rules.yaml +++ b/api/services/security/v1/paths/rules.yaml @@ -11,7 +11,7 @@ get: - $ref: "../parameters/cloud_query.yaml" - $ref: "../parameters/complianceName_query.yaml" - $ref: "../parameters/controlId_query.yaml" - - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/service_query.yaml" - $ref: "../parameters/paginationKey_query.yaml" - $ref: "../parameters/paginationSize_query.yaml" responses: diff --git a/api/services/security/v1/paths/rules_count.yaml b/api/services/security/v1/paths/rules_count.yaml index 64f0d15fd..6f0802a1b 100644 --- a/api/services/security/v1/paths/rules_count.yaml +++ b/api/services/security/v1/paths/rules_count.yaml @@ -11,7 +11,7 @@ get: - $ref: "../parameters/cloud_query.yaml" - $ref: "../parameters/complianceName_query.yaml" - $ref: "../parameters/controlId_query.yaml" - - $ref: "../parameters/services_query.yaml" + - $ref: "../parameters/service_query.yaml" responses: '200': content: diff --git a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml index d3f875c9c..6e450b785 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhatModel.yaml @@ -1,20 +1,16 @@ properties: args: - anyOf: - - items: - type: string - type: array - - type: 'null' description: 'Certain misconfiguration rules have arguments. This field contains the arguments in the form of an comma separated array. Example: ["MongoDB", "TCP", "27017"]' + items: + type: string title: Args + type: array isSuppressed: - anyOf: - - type: boolean - - type: 'null' description: If this finding is suppressed, the value is True. title: Issuppressed + type: boolean ruleDescription: description: Description of the rule. title: Ruledescription diff --git a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml index 8a393048f..d16373d8a 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhenModel.yaml @@ -4,12 +4,10 @@ properties: title: Lastseen type: string suppressedAt: - anyOf: - - format: date-time - type: string - - type: 'null' description: When the finding was suppressed. + format: date-time title: Suppressedat + type: string required: - lastSeen - suppressedAt diff --git a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml index 84cd56535..f9814f262 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhereModel.yaml @@ -1,27 +1,21 @@ properties: accountId: - description: The cloud account ID. For AWS this is the account ID. For Azure, - this is the subscription ID. + description: A comma-separated list of cloud account IDs. For AWS this is the + account ID. For Azure, this is the subscription ID. title: Accountid type: string assetId: - anyOf: - - type: string - - type: 'null' description: The asset's ID (a cloud resource). title: Assetid + type: string assetName: - anyOf: - - type: string - - type: 'null' description: The name of the asset ID. title: Assetname + type: string assetType: - anyOf: - - type: string - - type: 'null' - description: The type of cloud resource for the service. + description: A comma-separated list of cloud resource for the service. title: Assettype + type: string findingLocation: description: 'For a misconfiguration: the cloud resource or a subelement of the cloud resource. For a vulnerability: the cloud resource, @@ -29,7 +23,7 @@ properties: title: Findinglocation type: string region: - description: The cloud region. + description: A comma-separated list of cloud regions. title: Region type: string service: diff --git a/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml b/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml index ca91c3c1b..2cf6939f7 100644 --- a/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml +++ b/api/services/security/v1/schemas/MisconfigurationWhoModel.yaml @@ -1,10 +1,8 @@ properties: suppressedBy: - anyOf: - - type: string - - type: 'null' description: The user who suppressed the finding. title: Suppressedby + type: string required: - suppressedBy title: MisconfigurationWhoModel diff --git a/api/services/security/v1/schemas/PaginationModel.yaml b/api/services/security/v1/schemas/PaginationModel.yaml index 5d4d24beb..497a899f3 100644 --- a/api/services/security/v1/schemas/PaginationModel.yaml +++ b/api/services/security/v1/schemas/PaginationModel.yaml @@ -1,22 +1,18 @@ properties: nextKey: - anyOf: - - type: string - - type: 'null' description: Each API call has a unique token. This is the token for the next page of results. title: Nextkey + type: string paginationSize: description: The maximum number of items in the page. The attribute 'item' indicates the actual number of items in the page. title: Paginationsize type: integer previousKey: - anyOf: - - type: string - - type: 'null' description: Each API call has a unique token. This is the token for the previous page of results. title: Previouskey + type: string title: PaginationModel type: object diff --git a/api/services/security/v1/schemas/RequestModel.yaml b/api/services/security/v1/schemas/RequestModel.yaml index 1d22cd848..7f7a8ccb3 100644 --- a/api/services/security/v1/schemas/RequestModel.yaml +++ b/api/services/security/v1/schemas/RequestModel.yaml @@ -1,14 +1,10 @@ properties: body: - anyOf: - - type: object - - type: 'null' title: Body + type: object id: - anyOf: - - type: string - - type: 'null' title: Id + type: string method: title: Method type: string diff --git a/api/services/security/v1/schemas/RulesModel.yaml b/api/services/security/v1/schemas/RulesModel.yaml index 244ce0b09..27abfb757 100644 --- a/api/services/security/v1/schemas/RulesModel.yaml +++ b/api/services/security/v1/schemas/RulesModel.yaml @@ -1,44 +1,37 @@ properties: args: - anyOf: - - items: - type: string - type: array - - type: 'null' description: 'Certain misconfiguration rules have arguments. This field contains the arguments in the form of an comma separated array. Example: ["MongoDB", "TCP", "27017"]' + items: + type: string title: Args + type: array cloud: description: The name of the cloud. title: Cloud type: string complianceName: - anyOf: - - items: - type: string - type: array - - type: 'null' description: The name of the cyber security compliance. + items: + type: string title: Compliancename + type: array controls: - anyOf: - - items: - additionalProperties: - type: string - type: object - type: array - - type: 'null' description: The ID of the control defined in the compliance. + items: + additionalProperties: + type: string + type: object title: Controls + type: array description: description: Description of the rule. title: Description type: string effort: - anyOf: + allOf: - $ref: ./Effort.yaml - - type: 'null' description: The effort required to fix the finding. ruleName: description: The unique name of the rule. @@ -53,9 +46,8 @@ properties: title: Service type: string severity: - anyOf: + allOf: - $ref: ./Severity.yaml - - type: 'null' description: The severity of the rule. required: - ruleName diff --git a/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml b/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml index 326362180..cbeb655bb 100644 --- a/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml +++ b/api/services/security/v1/schemas/SpotResponse_BaseResponse_CountModel__.yaml @@ -1,8 +1,8 @@ properties: error: - anyOf: + allOf: - $ref: ./ErrorModel.yaml - - type: 'null' + title: Error request: $ref: ./RequestModel.yaml response: diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml index 2e841ff26..848a17869 100644 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ComplianceModel__.yaml @@ -1,8 +1,8 @@ properties: error: - anyOf: + allOf: - $ref: ./ErrorModel.yaml - - type: 'null' + title: Error request: $ref: ./RequestModel.yaml response: diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml index d36e17c33..a692ad6d4 100644 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_ControlModel__.yaml @@ -1,8 +1,8 @@ properties: error: - anyOf: + allOf: - $ref: ./ErrorModel.yaml - - type: 'null' + title: Error request: $ref: ./RequestModel.yaml response: diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml index bcdf1a753..a04117480 100644 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_MisconfigurationModel__.yaml @@ -1,8 +1,8 @@ properties: error: - anyOf: + allOf: - $ref: ./ErrorModel.yaml - - type: 'null' + title: Error request: $ref: ./RequestModel.yaml response: diff --git a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml index 38015faac..9f9150299 100644 --- a/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml +++ b/api/services/security/v1/schemas/SpotResponse_PaginatedResponse_RulesModel__.yaml @@ -1,8 +1,8 @@ properties: error: - anyOf: + allOf: - $ref: ./ErrorModel.yaml - - type: 'null' + title: Error request: $ref: ./RequestModel.yaml response: diff --git a/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml b/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml new file mode 100644 index 000000000..187e1baa3 --- /dev/null +++ b/api/services/security/v1/schemas/cloud__constant__base__CloudProvider.yaml @@ -0,0 +1,6 @@ +description: Enumeration of supported cloud providers. +enum: +- aws +- azure +title: CloudProvider +type: string diff --git a/api/services/security/v1/schemas/CloudProvider.yaml b/api/services/security/v1/schemas/databases__constant__CloudProvider.yaml similarity index 100% rename from api/services/security/v1/schemas/CloudProvider.yaml rename to api/services/security/v1/schemas/databases__constant__CloudProvider.yaml From 7d5a88d5ab7b2661d86b934e8575cd261eec9837 Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Fri, 6 Dec 2024 10:50:33 +0530 Subject: [PATCH 8/9] fix --- api/services/security/v1/parameters/paginationKey_query.yaml | 2 ++ api/services/security/v1/parameters/paginationSize_query.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/services/security/v1/parameters/paginationKey_query.yaml b/api/services/security/v1/parameters/paginationKey_query.yaml index badec02ce..6a187a9cd 100644 --- a/api/services/security/v1/parameters/paginationKey_query.yaml +++ b/api/services/security/v1/parameters/paginationKey_query.yaml @@ -1,6 +1,8 @@ +description: Token of the page to return. in: query name: paginationKey required: false schema: + description: Token of the page to return. title: Paginationkey type: string diff --git a/api/services/security/v1/parameters/paginationSize_query.yaml b/api/services/security/v1/parameters/paginationSize_query.yaml index cb226b124..e0f2aa8ca 100644 --- a/api/services/security/v1/parameters/paginationSize_query.yaml +++ b/api/services/security/v1/parameters/paginationSize_query.yaml @@ -1,8 +1,10 @@ +description: Number of items to return per page. in: query name: paginationSize required: false schema: default: 100 + description: Number of items to return per page. maximum: 100 minimum: 1 title: Paginationsize From 93ed263bd41c3d263f1a869d9e436b4f0b36564a Mon Sep 17 00:00:00 2001 From: Avinash Bharti Date: Fri, 6 Dec 2024 13:44:52 +0530 Subject: [PATCH 9/9] added venv to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 34885fda0..94a19870c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ test-results.xml *.log* npm-debug.log package-lock.json +.venv/ \ No newline at end of file