Skip to content

Commit 85bcba5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add endpoints for Software Composition Analysis (#2938)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 2f58a35 commit 85bcba5

File tree

41 files changed

+2145
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2145
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 319 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39409,6 +39409,95 @@ components:
3940939409
type: string
3941039410
x-enum-varnames:
3941139411
- RULESET
39412+
ResolveVulnerableSymbolsRequest:
39413+
properties:
39414+
data:
39415+
$ref: '#/components/schemas/ResolveVulnerableSymbolsRequestData'
39416+
type: object
39417+
ResolveVulnerableSymbolsRequestData:
39418+
properties:
39419+
attributes:
39420+
$ref: '#/components/schemas/ResolveVulnerableSymbolsRequestDataAttributes'
39421+
id:
39422+
type: string
39423+
type:
39424+
$ref: '#/components/schemas/ResolveVulnerableSymbolsRequestDataType'
39425+
required:
39426+
- type
39427+
type: object
39428+
ResolveVulnerableSymbolsRequestDataAttributes:
39429+
properties:
39430+
purls:
39431+
items:
39432+
type: string
39433+
type: array
39434+
type: object
39435+
ResolveVulnerableSymbolsRequestDataType:
39436+
default: resolve-vulnerable-symbols-request
39437+
enum:
39438+
- resolve-vulnerable-symbols-request
39439+
example: resolve-vulnerable-symbols-request
39440+
type: string
39441+
x-enum-varnames:
39442+
- RESOLVE_VULNERABLE_SYMBOLS_REQUEST
39443+
ResolveVulnerableSymbolsResponse:
39444+
properties:
39445+
data:
39446+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponseData'
39447+
type: object
39448+
ResolveVulnerableSymbolsResponseData:
39449+
properties:
39450+
attributes:
39451+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponseDataAttributes'
39452+
id:
39453+
type: string
39454+
type:
39455+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponseDataType'
39456+
required:
39457+
- type
39458+
type: object
39459+
ResolveVulnerableSymbolsResponseDataAttributes:
39460+
properties:
39461+
results:
39462+
items:
39463+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponseResults'
39464+
type: array
39465+
type: object
39466+
ResolveVulnerableSymbolsResponseDataType:
39467+
default: resolve-vulnerable-symbols-response
39468+
enum:
39469+
- resolve-vulnerable-symbols-response
39470+
example: resolve-vulnerable-symbols-response
39471+
type: string
39472+
x-enum-varnames:
39473+
- RESOLVE_VULNERABLE_SYMBOLS_RESPONSE
39474+
ResolveVulnerableSymbolsResponseResults:
39475+
properties:
39476+
purl:
39477+
type: string
39478+
vulnerable_symbols:
39479+
items:
39480+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols'
39481+
type: array
39482+
type: object
39483+
ResolveVulnerableSymbolsResponseResultsVulnerableSymbols:
39484+
properties:
39485+
advisory_id:
39486+
type: string
39487+
symbols:
39488+
items:
39489+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols'
39490+
type: array
39491+
type: object
39492+
ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols:
39493+
properties:
39494+
name:
39495+
type: string
39496+
type:
39497+
type: string
39498+
value:
39499+
type: string
39500+
type: object
3941239501
ResourceFilterAttributes:
3941339502
description: Attributes of a resource filter.
3941439503
example:
@@ -41843,6 +41932,184 @@ components:
4184341932
example: report_id
4184441933
type: string
4184541934
type: object
41935+
ScaRequest:
41936+
properties:
41937+
data:
41938+
$ref: '#/components/schemas/ScaRequestData'
41939+
type: object
41940+
ScaRequestData:
41941+
properties:
41942+
attributes:
41943+
$ref: '#/components/schemas/ScaRequestDataAttributes'
41944+
id:
41945+
type: string
41946+
type:
41947+
$ref: '#/components/schemas/ScaRequestDataType'
41948+
required:
41949+
- type
41950+
type: object
41951+
ScaRequestDataAttributes:
41952+
properties:
41953+
commit:
41954+
$ref: '#/components/schemas/ScaRequestDataAttributesCommit'
41955+
dependencies:
41956+
items:
41957+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItems'
41958+
type: array
41959+
env:
41960+
type: string
41961+
files:
41962+
items:
41963+
$ref: '#/components/schemas/ScaRequestDataAttributesFilesItems'
41964+
type: array
41965+
relations:
41966+
items:
41967+
$ref: '#/components/schemas/ScaRequestDataAttributesRelationsItems'
41968+
type: array
41969+
repository:
41970+
$ref: '#/components/schemas/ScaRequestDataAttributesRepository'
41971+
service:
41972+
type: string
41973+
tags:
41974+
additionalProperties:
41975+
type: string
41976+
type: object
41977+
vulnerabilities:
41978+
items:
41979+
$ref: '#/components/schemas/ScaRequestDataAttributesVulnerabilitiesItems'
41980+
type: array
41981+
type: object
41982+
ScaRequestDataAttributesCommit:
41983+
properties:
41984+
author_date:
41985+
type: string
41986+
author_email:
41987+
type: string
41988+
author_name:
41989+
type: string
41990+
branch:
41991+
type: string
41992+
committer_email:
41993+
type: string
41994+
committer_name:
41995+
type: string
41996+
sha:
41997+
type: string
41998+
type: object
41999+
ScaRequestDataAttributesDependenciesItems:
42000+
properties:
42001+
exclusions:
42002+
items:
42003+
type: string
42004+
type: array
42005+
group:
42006+
type: string
42007+
is_dev:
42008+
type: boolean
42009+
is_direct:
42010+
type: boolean
42011+
language:
42012+
type: string
42013+
locations:
42014+
items:
42015+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems'
42016+
type: array
42017+
name:
42018+
type: string
42019+
package_manager:
42020+
type: string
42021+
purl:
42022+
type: string
42023+
reachable_symbol_properties:
42024+
items:
42025+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems'
42026+
type: array
42027+
version:
42028+
type: string
42029+
type: object
42030+
ScaRequestDataAttributesDependenciesItemsLocationsItems:
42031+
properties:
42032+
block:
42033+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition'
42034+
name:
42035+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition'
42036+
namespace:
42037+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition'
42038+
version:
42039+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition'
42040+
type: object
42041+
ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition:
42042+
properties:
42043+
end:
42044+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition'
42045+
file_name:
42046+
type: string
42047+
start:
42048+
$ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition'
42049+
type: object
42050+
ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition:
42051+
properties:
42052+
col:
42053+
format: int32
42054+
maximum: 2147483647
42055+
type: integer
42056+
line:
42057+
format: int32
42058+
maximum: 2147483647
42059+
type: integer
42060+
type: object
42061+
ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems:
42062+
properties:
42063+
name:
42064+
type: string
42065+
value:
42066+
type: string
42067+
type: object
42068+
ScaRequestDataAttributesFilesItems:
42069+
properties:
42070+
name:
42071+
type: string
42072+
purl:
42073+
type: string
42074+
type: object
42075+
ScaRequestDataAttributesRelationsItems:
42076+
properties:
42077+
depends_on:
42078+
items:
42079+
type: string
42080+
type: array
42081+
ref:
42082+
type: string
42083+
type: object
42084+
ScaRequestDataAttributesRepository:
42085+
properties:
42086+
url:
42087+
type: string
42088+
type: object
42089+
ScaRequestDataAttributesVulnerabilitiesItems:
42090+
properties:
42091+
affects:
42092+
items:
42093+
$ref: '#/components/schemas/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems'
42094+
type: array
42095+
bom_ref:
42096+
type: string
42097+
id:
42098+
type: string
42099+
type: object
42100+
ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems:
42101+
properties:
42102+
ref:
42103+
type: string
42104+
type: object
42105+
ScaRequestDataType:
42106+
default: scarequests
42107+
enum:
42108+
- scarequests
42109+
example: scarequests
42110+
type: string
42111+
x-enum-varnames:
42112+
- SCAREQUESTS
4184642113
ScalarColumn:
4184742114
description: A single column in a scalar query response.
4184842115
oneOf:
@@ -76995,6 +77262,56 @@ paths:
7699577262
cursorPath: meta.page.after
7699677263
limitParam: body.data.attributes.page.limit
7699777264
resultsPath: data
77265+
/api/v2/static-analysis-sca/dependencies:
77266+
post:
77267+
operationId: CreateSCAResult
77268+
requestBody:
77269+
content:
77270+
application/json:
77271+
schema:
77272+
$ref: '#/components/schemas/ScaRequest'
77273+
required: true
77274+
responses:
77275+
'200':
77276+
description: OK
77277+
'429':
77278+
$ref: '#/components/responses/TooManyRequestsResponse'
77279+
security:
77280+
- apiKeyAuth: []
77281+
appKeyAuth: []
77282+
- AuthZ:
77283+
- code_analysis_read
77284+
summary: Post dependencies for analysis
77285+
tags:
77286+
- Static Analysis
77287+
x-unstable: '**Note**: This endpoint may be subject to changes.'
77288+
/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols:
77289+
post:
77290+
operationId: CreateSCAResolveVulnerableSymbols
77291+
requestBody:
77292+
content:
77293+
application/json:
77294+
schema:
77295+
$ref: '#/components/schemas/ResolveVulnerableSymbolsRequest'
77296+
required: true
77297+
responses:
77298+
'200':
77299+
content:
77300+
application/json:
77301+
schema:
77302+
$ref: '#/components/schemas/ResolveVulnerableSymbolsResponse'
77303+
description: OK
77304+
'429':
77305+
$ref: '#/components/responses/TooManyRequestsResponse'
77306+
security:
77307+
- apiKeyAuth: []
77308+
appKeyAuth: []
77309+
- AuthZ:
77310+
- code_analysis_read
77311+
summary: POST request to resolve vulnerable symbols
77312+
tags:
77313+
- Static Analysis
77314+
x-unstable: '**Note**: This endpoint may be subject to changes.'
7699877315
/api/v2/synthetics/settings/on_demand_concurrency_cap:
7699977316
get:
7700077317
description: Get the on-demand concurrency cap.
@@ -80526,6 +80843,8 @@ tags:
8052680843
description: Find out more at
8052780844
url: https://docs.datadoghq.com/tracing/metrics/metrics_namespace/
8052880845
name: Spans Metrics
80846+
- description: API for static analysis
80847+
name: Static Analysis
8052980848
- description: "Datadog Synthetics uses simulated user requests and browser rendering
8053080849
to help you ensure uptime,\nidentify regional issues, and track your application
8053180850
performance. Datadog Synthetics tests come in\ntwo different flavors, [API tests](https://docs.datadoghq.com/synthetics/api_tests/)\nand
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@endpoint(static-analysis) @endpoint(static-analysis-v2)
2+
Feature: Static Analysis
3+
API for static analysis
4+
5+
Background:
6+
Given a valid "apiKeyAuth" key in the system
7+
And a valid "appKeyAuth" key in the system
8+
And an instance of "StaticAnalysis" API
9+
10+
@generated @skip @team:DataDog/k9-vm-sca
11+
Scenario: POST request to resolve vulnerable symbols returns "OK" response
12+
Given operation "CreateSCAResolveVulnerableSymbols" enabled
13+
And new "CreateSCAResolveVulnerableSymbols" request
14+
And body with value {"data": {"attributes": {"purls": []}, "type": "resolve-vulnerable-symbols-request"}}
15+
When the request is sent
16+
Then the response status is 200 OK
17+
18+
@generated @skip @team:DataDog/k9-vm-sca
19+
Scenario: Post dependencies for analysis returns "OK" response
20+
Given operation "CreateSCAResult" enabled
21+
And new "CreateSCAResult" request
22+
And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}]}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}}
23+
When the request is sent
24+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3993,6 +3993,18 @@
39933993
"type": "safe"
39943994
}
39953995
},
3996+
"CreateSCAResult": {
3997+
"tag": "Static Analysis",
3998+
"undo": {
3999+
"type": "safe"
4000+
}
4001+
},
4002+
"CreateSCAResolveVulnerableSymbols": {
4003+
"tag": "Static Analysis",
4004+
"undo": {
4005+
"type": "safe"
4006+
}
4007+
},
39964008
"GetOnDemandConcurrencyCap": {
39974009
"tag": "Synthetics",
39984010
"undo": {

packages/datadog-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ apiInstance
433433
| Spa | @datadog/datadog-api-client-spa | [README.md](../../services/spa/README.md) |
434434
| Spans | @datadog/datadog-api-client-spans | [README.md](../../services/spans/README.md) |
435435
| Spans Metrics | @datadog/datadog-api-client-spans-metrics | [README.md](../../services/spans-metrics/README.md) |
436+
| Static Analysis | @datadog/datadog-api-client-static-analysis | [README.md](../../services/static-analysis/README.md) |
436437
| Synthetics | @datadog/datadog-api-client-synthetics | [README.md](../../services/synthetics/README.md) |
437438
| Tags | @datadog/datadog-api-client-tags | [README.md](../../services/tags/README.md) |
438439
| Teams | @datadog/datadog-api-client-teams | [README.md](../../services/teams/README.md) |

0 commit comments

Comments
 (0)