Skip to content

Commit 6245aab

Browse files
Travis CI UserCI bot
authored andcommitted
$MERGE_COMMIT_MESSAGE
2 parents e433459 + 0d093ae commit 6245aab

File tree

4 files changed

+293
-39
lines changed

4 files changed

+293
-39
lines changed

alsdkdefs/apis/remediations/assets_query.v1.yaml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,205 @@ paths:
14271427
$ref: 'responses.yaml#/UnavailableError'
14281428
security:
14291429
- x-aims-auth-token: []
1430+
post:
1431+
summary: Query Exposures
1432+
operationId: query_exposures_post
1433+
description: |-
1434+
Groups vulnerabilities for an account by exposure (by default), remediation, or vulnerable asset.
1435+
In combination with filtering, it's easy to view vulnerabilities across your account in the manner
1436+
most appropriate.
1437+
1438+
*Note*: exposures uses a `threatiness` property which is an internal measurement used for
1439+
relative comparison and is not considered useful for external purposes.
1440+
1441+
Vulnerabilities can be filtered using the `filter` parameter in the query string. The `filter` param
1442+
can be used multiple times. The [remediation filters](#section/Remediation-filters) documented above
1443+
are allowed.
1444+
tags:
1445+
- Exposures and Remediations
1446+
requestBody:
1447+
content:
1448+
application/json:
1449+
schema:
1450+
type: object
1451+
properties:
1452+
concluded:
1453+
$ref: parameters.yaml#/ExposuresConcluded
1454+
details:
1455+
$ref: parameters.yaml#/ExposuresDetails
1456+
disposed:
1457+
$ref: parameters.yaml#/ExposuresDisposed
1458+
filters:
1459+
$ref: parameters.yaml#/ExposuresFilters
1460+
group:
1461+
$ref: parameters.yaml#/ExposuresGroup
1462+
include_exposures:
1463+
$ref: parameters.yaml#/IncludeExposures
1464+
included_filters:
1465+
$ref: parameters.yaml#/IncludeFilters
1466+
included_remediations:
1467+
$ref: parameters.yaml#/IncludeRemediations
1468+
include_remediation_items:
1469+
$ref: parameters.yaml#/IncludeRemediationItems
1470+
limit:
1471+
$ref: parameters.yaml#/ExposuresLimit
1472+
scope:
1473+
$ref: parameters.yaml#/ScopeTrue
1474+
sort:
1475+
$ref: parameters.yaml#/ExposuresSort
1476+
security:
1477+
- x-aims-auth-token: []
1478+
x-codeSamples:
1479+
- lang: Shell
1480+
label: Basic exposures query
1481+
source: |-
1482+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1483+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1484+
{}
1485+
EOF
1486+
- lang: Shell
1487+
label: Exposures with filter by deployment ID
1488+
source: |-
1489+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1490+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1491+
{
1492+
"filters": ["deployment_id:814C2911-09BB-1005-9916-7831C1BAC182"]
1493+
}
1494+
EOF
1495+
- lang: Shell
1496+
label: 'Exposures with filter on deployment ID, subnet, image, and application'
1497+
source: |-
1498+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1499+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1500+
{
1501+
"filters": [
1502+
"deployment_id:814C2911-09BB-1005-9916-7831C1BAC182",
1503+
"subnet:/aws/us-east-1/subnet/subnet-1a-web",
1504+
"image:/aws/us-east-1/image/ami-1",
1505+
"application:Apache"
1506+
],
1507+
}
1508+
EOF
1509+
- lang: Shell
1510+
label: Basic remediations query
1511+
source: |-
1512+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1513+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1514+
{
1515+
"group": "remediation"
1516+
}
1517+
EOF
1518+
- lang: Shell
1519+
label: Remediations with filter by deployment ID
1520+
source: |-
1521+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1522+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1523+
{
1524+
"filters": ["deployment_id:814C2911-09BB-1005-9916-7831C1BAC182"],
1525+
"group": "remediation"
1526+
}
1527+
EOF
1528+
- lang: Shell
1529+
label: 'Remediations with filter on deployment ID, subnet, image, and application'
1530+
source: |-
1531+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1532+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1533+
{
1534+
"filters": [
1535+
"deployment_id:814C2911-09BB-1005-9916-7831C1BAC182",
1536+
"subnet:/aws/us-east-1/subnet/subnet-1a-web",
1537+
"image:/aws/us-east-1/image/ami-1",
1538+
"application:Apache"
1539+
],
1540+
"group": "remediation"
1541+
}
1542+
EOF
1543+
- lang: Shell
1544+
label: Basic vulnerable assets query
1545+
source: |-
1546+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1547+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1548+
{
1549+
"group": "asset"
1550+
}
1551+
EOF
1552+
- lang: Shell
1553+
label: Vulnerable assets with filter by deployment ID
1554+
source: |-
1555+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1556+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1557+
{
1558+
"filters": [
1559+
"deployment_id:814C2911-09BB-1005-9916-7831C1BAC182"
1560+
],
1561+
"group": "asset"
1562+
}
1563+
EOF
1564+
- lang: Shell
1565+
label: 'Vulnerable assets with filter on deployment ID, subnet, image, and application'
1566+
source: |-
1567+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1568+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1569+
{
1570+
"filters": [
1571+
"deployment_id:814C2911-09BB-1005-9916-7831C1BAC182",
1572+
"subnet:/aws/us-east-1/subnet/subnet-1a-web",
1573+
"image:/aws/us-east-1/image/ami-1",
1574+
"application:Apache"
1575+
],
1576+
"group": "asset"
1577+
}
1578+
EOF
1579+
- lang: Shell
1580+
label: Most vulnerable assets by type (host)
1581+
source: |-
1582+
curl "https://api.cloudinsight.alertlogic.com/assets_query/v2/12345678/exposures" \
1583+
-X POST -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
1584+
{
1585+
"filters": [
1586+
"asset_type:host"
1587+
],
1588+
"group": "asset"
1589+
}
1590+
EOF
1591+
responses:
1592+
'200':
1593+
description: OK
1594+
content:
1595+
application/json:
1596+
schema:
1597+
$ref: schemas.yaml#/QueryExposuresResponse
1598+
examples:
1599+
'Exposures (include_filters=false, include_exposures=false)':
1600+
$ref: examples.yaml#/QueryExposuresExample
1601+
'Exposures for whole account (details=true, include_filters=true)':
1602+
$ref: examples.yaml#/QueryExposuresWholeAccountExample
1603+
'Exposures for specific deployment ID (details=false, include_filters=true)':
1604+
$ref: examples.yaml#/QueryExposuresSpecificDeploymentExample
1605+
'Remediations (include_filters=false, include_remediations=false)':
1606+
$ref: examples.yaml#/QueryExposuresRemediationsExample
1607+
'Remediations for whole account (details=true, include_filters=true, include_remediation_items=true)':
1608+
$ref: examples.yaml#/QueryExposuresRemediationsWholeAccountExample
1609+
'Remediations for specific deployment ID (details=false, include_filters=true)':
1610+
$ref: examples.yaml#/QueryExposuresRemediationsSpecificDeploymentExample
1611+
'Vulnerable assets (include_filters=false, include_exposures=false)':
1612+
$ref: examples.yaml#/QueryExposuresVulnerableAssetsExample
1613+
'Vulnerable assets for whole account (details=true, include_filters=true)':
1614+
$ref: examples.yaml#/QueryExposuresVulnerableAssetsWholeAccountExample
1615+
'Vulnerable assets for specific deployment ID (details=false, include_filters=true)':
1616+
$ref: examples.yaml#/QueryExposuresVulnerableAssetsSpecificDeploymentExample
1617+
'Most vulnerable assets by type (group=asset, filter=asset_type:host, limit=2)':
1618+
$ref: examples.yaml#/QueryExposuresMostVulnerableAssetsExample
1619+
'400':
1620+
$ref: responses.yaml#/InvalidValueError
1621+
'401':
1622+
$ref: responses.yaml#/Unauthorized
1623+
'403':
1624+
$ref: responses.yaml#/Forbidden
1625+
'404':
1626+
$ref: responses.yaml#/NotFound
1627+
'503':
1628+
$ref: responses.yaml#/UnavailableError
14301629
/assets_query/v2/{account_id}/remediation-items:
14311630
parameters:
14321631
- $ref: 'parameters.yaml#/UrlParamAccountId'
@@ -2137,6 +2336,7 @@ paths:
21372336
-X PUT -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
21382337
{
21392338
"operation": "dispose_remediations",
2339+
"applies_to_specific_assets": true,
21402340
"comment": "Vulnerable database contains automated test data, not customer records.",
21412341
"filters": [
21422342
"application:Apache",
@@ -2155,6 +2355,7 @@ paths:
21552355
-X PUT -H "x-aims-auth-token: $TOKEN" -H "accept: application/json" -d@- << EOF
21562356
{
21572357
"operation": "conclude_remediations",
2358+
"applies_to_specific_assets": true,
21582359
"filters": [
21592360
"application:Apache",
21602361
"image:/aws/us-east-1/image/ami-1"

alsdkdefs/apis/remediations/examples.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3665,6 +3665,7 @@ DisposeSingleRemediationExample:
36653665
value:
36663666
assets:
36673667
- account_id: '12345678'
3668+
applies_to_specific_assets: false
36683669
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
36693670
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
36703671
comment: Vulnerable database contains automated test data, not customer records.
@@ -3679,6 +3680,7 @@ DisposeSingleRemediationExample:
36793680
state: disposed
36803681
user_id: 00001111-2222-3333-4444-555566667777
36813682
- account_id: '12345678'
3683+
applies_to_specific_assets: false
36823684
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
36833685
deployment_id: FCCA4E48-598A-4946-B2A7-64DBF9E4CCAC
36843686
comment: Vulnerable database contains automated test data, not customer records.
@@ -3697,6 +3699,7 @@ DisposeSingleRemediationFiltersSetExample:
36973699
value:
36983700
assets:
36993701
- account_id: '12345678'
3702+
applies_to_specific_assets: false
37003703
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
37013704
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
37023705
comment: Vulnerable database contains automated test data, not customer records.
@@ -3710,6 +3713,7 @@ DisposeSingleRemediationFiltersSetExample:
37103713
state: disposed
37113714
user_id: 00001111-2222-3333-4444-555566667777
37123715
- account_id: '12345678'
3716+
applies_to_specific_assets: false
37133717
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
37143718
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
37153719
comment: Vulnerable database contains automated test data, not customer records.
@@ -3727,6 +3731,7 @@ DisposeSingleVulnerabilityExample:
37273731
value:
37283732
assets:
37293733
- account_id: '12345678'
3734+
applies_to_specific_assets: false
37303735
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
37313736
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
37323737
comment: Vulnerable database contains automated test data, not customer records.
@@ -3745,6 +3750,7 @@ ConcludeSingleRemediationExample:
37453750
value:
37463751
assets:
37473752
- account_id: '12345678'
3753+
applies_to_specific_assets: false
37483754
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
37493755
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
37503756
expires: 0
@@ -3757,6 +3763,7 @@ ConcludeSingleRemediationExample:
37573763
state: concluded
37583764
user_id: 00001111-2222-3333-4444-555566667777
37593765
- account_id: '12345678'
3766+
applies_to_specific_assets: false
37603767
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
37613768
deployment_id: FCCA4E48-598A-4946-B2A7-64DBF9E4CCAC
37623769
expires: 0
@@ -3773,6 +3780,7 @@ ConcludeSingleRemediationFiltersSetExample:
37733780
value:
37743781
assets:
37753782
- account_id: '12345678'
3783+
applies_to_specific_assets: false
37763784
audit_id: 37CA08E6-9CC7-4575-BA9B-B6F961976E8D
37773785
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
37783786
expires: 0
@@ -3784,6 +3792,7 @@ ConcludeSingleRemediationFiltersSetExample:
37843792
state: concluded
37853793
user_id: 00001111-2222-3333-4444-555566667777
37863794
- account_id: '12345678'
3795+
applies_to_specific_assets: false
37873796
audit_id: 37CA08E6-9CC7-4575-BA9B-B6F961976E8D
37883797
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
37893798
expires: 0
@@ -3799,6 +3808,7 @@ ConcludeSingleVulnerabilityExample:
37993808
value:
38003809
assets:
38013810
- account_id: '12345678'
3811+
applies_to_specific_assets: true
38023812
audit_id: 6BB1B0E8-14FA-4935-9770-2D339AF756F1
38033813
deployment_id: AF044FD4-5A6E-4EAE-B7A1-0B304034CC34
38043814
expires: 0

0 commit comments

Comments
 (0)