Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Add new provider for Azure #360

Merged
1 commit merged into from
Jun 16, 2023
Merged
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
89 changes: 88 additions & 1 deletion api/models/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 62 additions & 1 deletion api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ components:
type: string
enum:
- AWS
- Azure

Scans:
type: object
Expand Down Expand Up @@ -1369,10 +1370,53 @@ components:
type: object
anyOf:
- $ref: '#/components/schemas/AwsScanScope'
- $ref: '#/components/schemas/AzureScanScope'
discriminator:
propertyName: objectType
mapping:
AwsScanScope: '#/components/schemas/AwsScanScope'
AzureScanScope: '#/components/schemas/AzureScanScope'

AzureScanScope:
type: object
description: The scope of a configured scan within a subscription.
properties:
objectType:
type: string
allResourceGroups:
description: Scan all resource groups in the subscription, if set will override anything set in resourceGroups.
type: boolean
resourceGroups:
type: array
items:
$ref: '#/components/schemas/AzureResourceGroup'
nullable: true
instanceTagSelector:
type: array
description: VM instances will be scanned if they contain all of these tags. If empty, not taken into account.
items:
$ref: '#/components/schemas/Tag'
nullable: true
instanceTagExclusion:
type: array
description: VM instances will not be scanned if they contain all of these tags (even if they match instanceTagSelector). If empty, not taken into account.
items:
$ref: '#/components/schemas/Tag'
nullable: true
required:
- objectType
additionalProperties: false

AzureResourceGroup:
type: object
description: Azure Resource Group
properties:
name:
type: string
minLength: 1
required:
- name
additionalProperties: false

AwsScanScope:
type: object
Expand Down Expand Up @@ -1410,10 +1454,28 @@ components:
type: object
anyOf:
- $ref: '#/components/schemas/AwsAccountScope'
- $ref: '#/components/schemas/AzureSubscriptionScope'
discriminator:
propertyName: objectType
mapping:
AwsAccountScope: '#/components/schemas/AwsAccountScope'
AzureSubscriptionScope: '#/components/schemas/AzureSubscriptionScope'

AzureSubscriptionScope:
type: object
description: Azure subscription scope
properties:
objectType:
type: string
subscriptionID:
type: string
resourceGroups:
type: array
items:
$ref: '#/components/schemas/AzureResourceGroup'
nullable: true
required:
- objectType

AwsAccountScope:
type: object
Expand Down Expand Up @@ -1461,7 +1523,6 @@ components:
- id
additionalProperties: false


SecurityGroup:
type: object
description: general cloud security group
Expand Down
Loading