Skip to content

Commit

Permalink
Definitions Update remediations
Browse files Browse the repository at this point in the history
  • Loading branch information
CI bot committed Feb 16, 2024
2 parents 0fd0838 + 6e25e16 commit 128e500
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 9 deletions.
60 changes: 59 additions & 1 deletion alsdkdefs/apis/remediations/assets_query.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,7 @@ paths:
- $ref: 'parameters.yaml#/ParamIncludeFilters'
- $ref: 'parameters.yaml#/ParamIncludeRemediations'
- $ref: 'parameters.yaml#/ParamIncludeRemediationItems'
- $ref: 'parameters.yaml#/ParamIncludeSummary'
- $ref: 'parameters.yaml#/ParamLimit'
- $ref: 'parameters.yaml#/ParamScopeTrue'
- $ref: 'parameters.yaml#/ParamSort'
Expand Down Expand Up @@ -1792,6 +1793,8 @@ paths:
$ref: parameters.yaml#/IncludeRemediations
include_remediation_items:
$ref: parameters.yaml#/IncludeRemediationItems
include_summary:
$ref: parameters.yaml#/IncludeSummary
limit:
$ref: parameters.yaml#/ExposuresLimit
scope:
Expand Down Expand Up @@ -1921,7 +1924,7 @@ paths:
schema:
$ref: schemas.yaml#/QueryExposuresResponse
examples:
'Exposures (include_filters=false, include_exposures=false)':
'Exposures (include_filters=false, include_exposures=false, include_summary=false)':
$ref: examples.yaml#/QueryExposuresExample
'Exposures for whole account (details=true, include_filters=true)':
$ref: examples.yaml#/QueryExposuresWholeAccountExample
Expand Down Expand Up @@ -1951,6 +1954,61 @@ paths:
$ref: responses.yaml#/NotFound
'503':
$ref: responses.yaml#/UnavailableError

/assets_query/v2/{account_id}/exposure-filters:
parameters:
- $ref: 'parameters.yaml#/UrlParamAccountId'
get:
operationId: query_exposure_filters
summary: Query Exposure Filters
description: |-
Groups vulnerabilities for an account by exposure or remediation, then returns filters.
Only returns five filter properties if available: `deployment_id`, `deployment_name`, `key`, `name` and `type`.
Exposure Filters can be reduced using the `filter` parameter in the query string. The `filter` param
can be used multiple times and filters supplied will limit the returned filters to those related to vulnerabilities
that match all supplied filters. The [remediation filters](#section/Remediation-filters) documented in the Usage
section are allowed.
tags:
- Exposures and Remediations
parameters:
- $ref: 'parameters.yaml#/ParamQueryExposuresFilter'
x-codeSamples:
- lang: Shell
label: Basic exposure-filters query
source: |-
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposure-filters" \
-H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
- lang: Shell
label: Exposure Filters with include_filter false
source: |-
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposure-filters?include_filters=false" \
-H "x-aims-auth-token: $TOKEN" -H "accept: application/json"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: 'schemas.yaml#/QueryExposureFiltersResponse'
examples:
Exposure filters:
$ref: 'examples.yaml#/QueryExposureFiltersExample'
Exposures for whole account (include_filters=false):
$ref: 'examples.yaml#/QueryExposureFiltersExample'
"400":
$ref: 'responses.yaml#/InvalidValueError'
"401":
$ref: 'responses.yaml#/Unauthorized'
"403":
$ref: 'responses.yaml#/Forbidden'
"404":
$ref: 'responses.yaml#/NotFound'
"503":
$ref: 'responses.yaml#/UnavailableError'
security:
- x-aims-auth-token: [ ]

/assets_query/v2/{account_id}/remediation-items:
parameters:
- $ref: 'parameters.yaml#/UrlParamAccountId'
Expand Down
24 changes: 16 additions & 8 deletions alsdkdefs/apis/remediations/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2652,15 +2652,9 @@ QueryExposuresExample:
filters: []
exposures:
assets: []
rows: 1
rows: 0
exposures_count: 0
summary:
severities:
all: 1
high: 1
info: 0
low: 0
medium: 0
summary: {}
QueryExposuresWholeAccountExample:
value:
filters:
Expand Down Expand Up @@ -3365,6 +3359,20 @@ QueryExposuresMostVulnerableAssetsExample:
info: 0
low: 0
medium: 0
QueryExposureFiltersExample:
value:
filters:
- key: security
type: category
- deployment_id: 814C2911-09BB-1005-9916-7831C1BAC182
deployment_name: Test Deployment 1
key: 814C2911-09BB-1005-9916-7831C1BAC182
name: Test Deployment 1
type: deployment_id
- key: aws
type: deployment_type
- key: high
type: severity
QueryTopologyExample:
value:
topology:
Expand Down
9 changes: 9 additions & 0 deletions alsdkdefs/apis/remediations/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,15 @@ IncludeRemediationItems:
type: boolean
default: false
description: Controls whether `remediation_items` are returned in the response body.
ParamIncludeSummary:
schema:
$ref: '#/IncludeSummary'
in: query
name: include_summary
IncludeSummary:
type: boolean
default: true
description: Controls whether `summary` is returned in the response body.
ParamIncludeExposures:
schema:
$ref: '#/IncludeExposures'
Expand Down
9 changes: 9 additions & 0 deletions alsdkdefs/apis/remediations/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,15 @@ QueryExposuresResponse:
type: integer
medium:
type: integer
QueryExposureFiltersResponse:
title: Query exposure filters response
type: object
properties:
filters:
type: array
items:
type: object
description: Filter item.
QueryRemediationItemsResponse:
title: Query remediation-items response
type: object
Expand Down

0 comments on commit 128e500

Please sign in to comment.