Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ test-results.xml
*.log*
npm-debug.log
package-lock.json
.venv/
10 changes: 10 additions & 0 deletions api/services/security/v1/parameters/accountId_query.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/accountName_query.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/assetId_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: The asset's ID (a cloud resource).
in: query
name: assetId
required: false
schema:
description: The asset's ID (a cloud resource).
title: Assetid
type: string
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/assetType_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: A comma-separated list of cloud resource for the service.
in: query
name: assetType
required: false
schema:
description: A comma-separated list of cloud resource for the service.
title: Assettype
type: string
5 changes: 5 additions & 0 deletions api/services/security/v1/parameters/cloud_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
in: query
name: cloud
required: true
schema:
$ref: "../schemas/cloud__constant__base__CloudProvider.yaml"
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: The name of the cyber security compliance.
example: SOC_2
in: query
name: complianceName
required: false
schema:
description: The name of the cyber security compliance.
title: Compliancename
type: string
9 changes: 9 additions & 0 deletions api/services/security/v1/parameters/controlId_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: The ID of the control defined in the compliance.
example: A1.2
in: query
name: controlId
required: false
schema:
description: The ID of the control defined in the compliance.
title: Controlid
type: string
10 changes: 10 additions & 0 deletions api/services/security/v1/parameters/date_query.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/isAutomated_query.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions api/services/security/v1/parameters/notAccountId_query.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/notAssetType_query.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions api/services/security/v1/parameters/notRegion_query.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/notService_query.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Token of the page to return.
in: query
name: paginationKey
required: false
schema:
Comment thread
abharti1111 marked this conversation as resolved.
description: Token of the page to return.
title: Paginationkey
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the title

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also generated by FastAPI library not in our control

type: string
11 changes: 11 additions & 0 deletions api/services/security/v1/parameters/paginationSize_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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
type: integer
9 changes: 9 additions & 0 deletions api/services/security/v1/parameters/region_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: A comma-separated list of cloud regions.
example: us-east-1
in: query
name: region
required: false
schema:
description: A comma-separated list of cloud regions.
title: Region
type: string
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/ruleName_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: The unique name of the rule.
in: query
name: ruleName
required: false
schema:
description: The unique name of the rule.
title: Rulename
type: string
8 changes: 8 additions & 0 deletions api/services/security/v1/parameters/service_query.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: A comma-separated list of cloud services.
in: query
name: service
required: false
schema:
description: A comma-separated list of cloud services.
title: Service
type: string
33 changes: 33 additions & 0 deletions api/services/security/v1/paths/compliances.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
get:
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 Spot.

A compliance consists of one or more controls.'
operationId: get_compliances_v1_compliances_get
parameters:
- $ref: "../parameters/paginationKey_query.yaml"
- $ref: "../parameters/paginationSize_query.yaml"
responses:
'200':
content:
application/json:
schema:
$ref: "../schemas/SpotResponse_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: []
36 changes: 36 additions & 0 deletions api/services/security/v1/paths/controls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
get:
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 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/paginationKey_query.yaml"
- $ref: "../parameters/paginationSize_query.yaml"
responses:
'200':
content:
application/json:
schema:
$ref: "../schemas/SpotResponse_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: []
28 changes: 28 additions & 0 deletions api/services/security/v1/paths/controls_count.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
get:
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:
application/json:
schema:
$ref: "../schemas/SpotResponse_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: []
20 changes: 20 additions & 0 deletions api/services/security/v1/paths/count.yaml
Original file line number Diff line number Diff line change
@@ -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/SpotResponse_BaseResponse_CountModel__.yaml"
description: Successful Response
'400':
content: {}
description: Bad Request
'404':
description: Not Found
summary: Get Compliance Count
tags:
- Compliance
parameters: []
42 changes: 42 additions & 0 deletions api/services/security/v1/paths/misconfigurations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
get:
description: This API returns the list of assets that have misconfigurations.
operationId: get_misconfigurations_v1_misconfigurations_get
parameters:
- $ref: "../parameters/cloud_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"
responses:
'200':
content:
application/json:
schema:
$ref: "../schemas/SpotResponse_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: []
Loading