Note : This endpoint may be subject to changes.
POST https://api.ap1.datadoghq.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.ap2.datadoghq.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.datadoghq.eu/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.ddog-gov.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.us2.ddog-gov.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.datadoghq.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.us3.datadoghq.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols https://api.us5.datadoghq.com/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols
Overview
OAuth apps require the code_analysis_read authorization scope to access this endpoint.
Request Body Data (required)
Expand All
The data object in a request to resolve vulnerable symbols, containing the package PURLs and request type.
The attributes of a request to resolve vulnerable symbols, containing the list of package PURLs to check.
The list of Package URLs (PURLs) for which to resolve vulnerable symbols.
An optional identifier for this request data object.
The type identifier for requests to resolve vulnerable symbols.
Allowed enum values: resolve-vulnerable-symbols-request
default: resolve-vulnerable-symbols-request
{
"data" : {
"attributes" : {
"purls" : []
},
"id" : "string" ,
"type" : "resolve-vulnerable-symbols-request"
}
} Response OK
The top-level response object returned when resolving vulnerable symbols for a set of packages.
Expand All
The data object in a response for resolving vulnerable symbols, containing the result attributes and response type.
The attributes of a response containing resolved vulnerable symbols, organized by package.
The list of resolved vulnerable symbol results, one entry per queried package.
The Package URL (PURL) uniquely identifying the package for which vulnerable symbols are resolved.
The list of vulnerable symbol groups found in this package, organized by advisory.
The identifier of the security advisory that describes the vulnerability.
The list of symbols that are vulnerable according to this advisory.
The name of the vulnerable symbol.
The type classification of the vulnerable symbol (e.g., function, class, variable).
The value or identifier associated with the vulnerable symbol.
The unique identifier for this response data object.
The type identifier for responses containing resolved vulnerable symbols.
Allowed enum values: resolve-vulnerable-symbols-response
default: resolve-vulnerable-symbols-response
{
"data" : {
"attributes" : {
"results" : [
{
"purl" : "string" ,
"vulnerable_symbols" : [
{
"advisory_id" : "string" ,
"symbols" : [
{
"name" : "string" ,
"type" : "string" ,
"value" : "string"
}
]
}
]
}
]
},
"id" : "string" ,
"type" : "resolve-vulnerable-symbols-response"
}
} Too many requests
{
"errors" : [
"Bad Request"
]
} Code Example Copy
## default
#
# Curl command curl -X POST "https://api.ap1.datadoghq.com "https://api.ap2.datadoghq.com "https://api.datadoghq.eu "https://api.ddog-gov.com "https://api.us2.ddog-gov.com "https://api.datadoghq.com "https://api.us3.datadoghq.com "https://api.us5.datadoghq.com /api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols " \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY} " \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY} " \
-d @- << EOF
{
"data": {
"type": "resolve-vulnerable-symbols-request"
}
}
EOF
"""
POST request to resolve vulnerable symbols returns "OK" response
"""
from datadog_api_client import ApiClient , Configuration
from datadog_api_client.v2.api.static_analysis_api import StaticAnalysisApi
from datadog_api_client.v2.model.resolve_vulnerable_symbols_request import ResolveVulnerableSymbolsRequest
from datadog_api_client.v2.model.resolve_vulnerable_symbols_request_data import ResolveVulnerableSymbolsRequestData
from datadog_api_client.v2.model.resolve_vulnerable_symbols_request_data_attributes import (
ResolveVulnerableSymbolsRequestDataAttributes ,
)
from datadog_api_client.v2.model.resolve_vulnerable_symbols_request_data_type import (
ResolveVulnerableSymbolsRequestDataType ,
)
body = ResolveVulnerableSymbolsRequest (
data = ResolveVulnerableSymbolsRequestData (
attributes = ResolveVulnerableSymbolsRequestDataAttributes (
purls = [],
),
type = ResolveVulnerableSymbolsRequestDataType . RESOLVE_VULNERABLE_SYMBOLS_REQUEST ,
),
)
configuration = Configuration ()
configuration . unstable_operations [ "create_sca_resolve_vulnerable_symbols" ] = True
with ApiClient ( configuration ) as api_client :
api_instance = StaticAnalysisApi ( api_client )
response = api_instance . create_sca_resolve_vulnerable_symbols ( body = body )
print ( response )
Instructions First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" python3 "example.py"
# POST request to resolve vulnerable symbols returns "OK" response
require "datadog_api_client"
DatadogAPIClient . configure do | config |
config . unstable_operations [ "v2.create_sca_resolve_vulnerable_symbols" . to_sym ] = true
end
api_instance = DatadogAPIClient :: V2 :: StaticAnalysisAPI . new
body = DatadogAPIClient :: V2 :: ResolveVulnerableSymbolsRequest . new ({
data : DatadogAPIClient :: V2 :: ResolveVulnerableSymbolsRequestData . new ({
attributes : DatadogAPIClient :: V2 :: ResolveVulnerableSymbolsRequestDataAttributes . new ({
purls : [] ,
}),
type : DatadogAPIClient :: V2 :: ResolveVulnerableSymbolsRequestDataType :: RESOLVE_VULNERABLE_SYMBOLS_REQUEST ,
}),
})
p api_instance . create_sca_resolve_vulnerable_symbols ( body )
Instructions First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" rb "example.rb"
// POST request to resolve vulnerable symbols returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main () {
body := datadogV2 . ResolveVulnerableSymbolsRequest {
Data : & datadogV2 . ResolveVulnerableSymbolsRequestData {
Attributes : & datadogV2 . ResolveVulnerableSymbolsRequestDataAttributes {
Purls : [] string {},
},
Type : datadogV2 . RESOLVEVULNERABLESYMBOLSREQUESTDATATYPE_RESOLVE_VULNERABLE_SYMBOLS_REQUEST ,
},
}
ctx := datadog . NewDefaultContext ( context . Background ())
configuration := datadog . NewConfiguration ()
configuration . SetUnstableOperationEnabled ( "v2.CreateSCAResolveVulnerableSymbols" , true )
apiClient := datadog . NewAPIClient ( configuration )
api := datadogV2 . NewStaticAnalysisApi ( apiClient )
resp , r , err := api . CreateSCAResolveVulnerableSymbols ( ctx , body )
if err != nil {
fmt . Fprintf ( os . Stderr , "Error when calling `StaticAnalysisApi.CreateSCAResolveVulnerableSymbols`: %v\n" , err )
fmt . Fprintf ( os . Stderr , "Full HTTP response: %v\n" , r )
}
responseContent , _ := json . MarshalIndent ( resp , "" , " " )
fmt . Fprintf ( os . Stdout , "Response from `StaticAnalysisApi.CreateSCAResolveVulnerableSymbols`:\n%s\n" , responseContent )
}
Instructions First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" go run "main.go"
// POST request to resolve vulnerable symbols returns "OK" response
import com.datadog.api.client.ApiClient ;
import com.datadog.api.client.ApiException ;
import com.datadog.api.client.v2.api.StaticAnalysisApi ;
import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsRequest ;
import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsRequestData ;
import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsRequestDataAttributes ;
import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsRequestDataType ;
import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsResponse ;
public class Example {
public static void main ( String [] args ) {
ApiClient defaultClient = ApiClient . getDefaultApiClient ();
defaultClient . setUnstableOperationEnabled ( "v2.createSCAResolveVulnerableSymbols" , true );
StaticAnalysisApi apiInstance = new StaticAnalysisApi ( defaultClient );
ResolveVulnerableSymbolsRequest body =
new ResolveVulnerableSymbolsRequest ()
. data (
new ResolveVulnerableSymbolsRequestData ()
. attributes ( new ResolveVulnerableSymbolsRequestDataAttributes ())
. type (
ResolveVulnerableSymbolsRequestDataType
. RESOLVE_VULNERABLE_SYMBOLS_REQUEST ));
try {
ResolveVulnerableSymbolsResponse result = apiInstance . createSCAResolveVulnerableSymbols ( body );
System . out . println ( result );
} catch ( ApiException e ) {
System . err . println (
"Exception when calling StaticAnalysisApi#createSCAResolveVulnerableSymbols" );
System . err . println ( "Status code: " + e . getCode ());
System . err . println ( "Reason: " + e . getResponseBody ());
System . err . println ( "Response headers: " + e . getResponseHeaders ());
e . printStackTrace ();
}
}
}
Instructions First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" java "Example.java"
// POST request to resolve vulnerable symbols returns "OK" response
use datadog_api_client ::datadog ;
use datadog_api_client ::datadogV2 ::api_static_analysis ::StaticAnalysisAPI ;
use datadog_api_client ::datadogV2 ::model ::ResolveVulnerableSymbolsRequest ;
use datadog_api_client ::datadogV2 ::model ::ResolveVulnerableSymbolsRequestData ;
use datadog_api_client ::datadogV2 ::model ::ResolveVulnerableSymbolsRequestDataAttributes ;
use datadog_api_client ::datadogV2 ::model ::ResolveVulnerableSymbolsRequestDataType ;
#[tokio::main]
async fn main () {
let body = ResolveVulnerableSymbolsRequest ::new (). data (
ResolveVulnerableSymbolsRequestData ::new (
ResolveVulnerableSymbolsRequestDataType ::RESOLVE_VULNERABLE_SYMBOLS_REQUEST ,
)
. attributes ( ResolveVulnerableSymbolsRequestDataAttributes ::new (). purls ( vec! [])),
);
let mut configuration = datadog ::Configuration ::new ();
configuration . set_unstable_operation_enabled ( "v2.CreateSCAResolveVulnerableSymbols" , true );
let api = StaticAnalysisAPI ::with_config ( configuration );
let resp = api . create_sca_resolve_vulnerable_symbols ( body ). await ;
if let Ok ( value ) = resp {
println! ( " {:#?} " , value );
} else {
println! ( " {:#?} " , resp . unwrap_err ());
}
}
Instructions First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" cargo run
/**
* POST request to resolve vulnerable symbols returns "OK" response
*/
import { client , v2 } from "@datadog/datadog-api-client" ;
const configuration = client . createConfiguration ();
configuration . unstableOperations [ "v2.createSCAResolveVulnerableSymbols" ] = true ;
const apiInstance = new v2 . StaticAnalysisApi ( configuration );
const params : v2.StaticAnalysisApiCreateSCAResolveVulnerableSymbolsRequest = {
body : {
data : {
attributes : {
purls : [],
},
type : "resolve-vulnerable-symbols-request" ,
},
},
};
apiInstance
. createSCAResolveVulnerableSymbols ( params )
. then (( data : v2.ResolveVulnerableSymbolsResponse ) => {
console . log (
"API called successfully. Returned data: " + JSON . stringify ( data )
);
})
. catch (( error : any ) => console . error ( error ));
Instructions First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<DD_API_KEY>" DD_APP_KEY = "<DD_APP_KEY>" tsc "example.ts"