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

Commit

Permalink
refactor: change Misconfiguration api object
Browse files Browse the repository at this point in the history
Signed-off-by: András Jáky <[email protected]>
  • Loading branch information
akijakya authored and ramizpolic committed Feb 9, 2024
1 parent 3077f53 commit eff77ad
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 21 deletions.
32 changes: 19 additions & 13 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ components:
state:
description: |
Describes the state of Scan.
| State | Description |
| ---------- | ----------------------------------------------------------------------------- |
| Pending | The initial state when the scan is created, and is working to discover assets |
Expand All @@ -1704,7 +1704,7 @@ components:
reason:
description: |
Machine readable reason for state transition.
| State | Reason | Description |
| ---------- | ----------------- | ---------------------------------------------------------- |
| Pending | Created | Scan is pending as it has been newly created |
Expand Down Expand Up @@ -2037,7 +2037,7 @@ components:
description: 'Runtime schedule scan configuration.
If only operationTime is set, it will be a single scan scheduled for the operationTime.
If only cronLine is set, the current time will be the "from time" to start the scheduling according to the cronLine.
If both operationTime and cronLine are set, the first scan will run at operationTime
If both operationTime and cronLine are set, the first scan will run at operationTime
and the operationTime will be the first time that the cronLine will be effective from.'
properties:
cronLine:
Expand Down Expand Up @@ -2252,7 +2252,7 @@ components:
location:
type: string
image:
$ref: '#/components/schemas/ContainerImageInfo'
$ref: '#/components/schemas/ContainerImageInfo'
containerID:
type: string
createdAt:
Expand Down Expand Up @@ -2335,7 +2335,7 @@ components:
state:
description: |
Describes the state of resource cleanup.
| State | Description |
| ------- | ---------------------------------------------------------- |
| Pending | Initial state for cleaning up resources |
Expand Down Expand Up @@ -2535,7 +2535,7 @@ components:
state:
description: |
Describes the state of a scanner on the asset.
| State | Description |
| ----------- | ------------------------------------------------------------------------ |
| Pending | Scanner is pending and waits for state transition to InProgress state |
Expand Down Expand Up @@ -3086,20 +3086,26 @@ components:
properties:
scannerName:
type: string
scannedPath:
type: string
testCategory:
id:
type: string
testID:
description: Check or test ID, if applicable (e.g. Lynis TestID, CIS Docker Benchmark checkpoint code, etc)
location:
type: string
testDescription:
description: Location within the asset where the misconfiguration was recorded (e.g. filesystem path)
category:
type: string
severity:
$ref: '#/components/schemas/MisconfigurationSeverity'
description: Specifies misconfiguration impact category
message:
type: string
description: Short info about the misconfiguration
description:
type: string
description: Additional context such as the potential impact
remediation:
type: string
description: Possible fix for the misconfiguration
severity:
$ref: '#/components/schemas/MisconfigurationSeverity'

Secret:
type: object
Expand Down
22 changes: 14 additions & 8 deletions uibackend/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,26 @@ components:
properties:
scannerName:
type: string
scannedPath:
id:
type: string
testCategory:
type: string
testID:
description: Check or test ID, if applicable (e.g. Lynis TestID, CIS Docker Benchmark checkpoint code, etc)
location:
type: string
testDescription:
description: Location within the asset where the misconfiguration was recorded (e.g. filesystem path)
category:
type: string
severity:
$ref: '#/components/schemas/MisconfigurationSeverity'
description: Specifies misconfiguration impact category
message:
type: string
description: Short info about the misconfiguration
description:
type: string
description: Additional context such as the potential impact
remediation:
type: string
description: Possible fix for the misconfiguration
severity:
$ref: '#/components/schemas/MisconfigurationSeverity'

MisconfigurationSeverity:
type: string
Expand Down Expand Up @@ -381,7 +387,7 @@ components:
properties:
regions:
type: array
description: List of regions with the findings that was found on them.
description: List of regions with the findings that was found on them.
Regions with no findings will not be reported.
items:
$ref: '#/components/schemas/RegionFindings'
Expand Down

0 comments on commit eff77ad

Please sign in to comment.