Skip to content

[carbon_black_cloud] pagination broken for httpjson input in asset_vulnerability_summary data stream #16559

Description

@brijesh-elastic

Summary

For the asset_vulnerability_summary data stream, we're collecting data from the REST API using CEL and HTTPJSON input. However, the pagination logic for the HTTPJSON input appears to be incorrect.

request.transforms:
- set:
target: header.X-Auth-Token
value: {{custom_api_secret_key}}/{{custom_api_id}}
- set:
target: body.start
value: '0'
value_type: int
- set:
target: body.rows
value: '10000'
value_type: int
response.pagination:
- set:
target: body.start
value: '[[if (eq (len .last_response.body.results) 0)]][[.last_response.terminate_pagination]][[end]]'
value_type: int
fail_on_template_error: true

In response.pagination, we're evaluating body.start, but we're not properly updating the start parameter to collect subsequent rows of events.

Additionally, we're using an incorrect value for body.rows. According to the documentation, the maximum value should be 1000.

This issue needs to be addressed to ensure proper data collection from the Carbon Black Cloud Vulnerability Assessment API.

Metadata

Metadata

Labels

Integration:carbon_black_cloudVMware Carbon Black CloudTeam:SDE-CrestCrest developers on the Security Integrations team [elastic/sit-crest-contractors]Team:Security-Service IntegrationsSecurity Service Integrations team [elastic/security-service-integrations]bugSomething isn't working, use only for issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions