CrowdStrike / crimson-falcon

A Shiny Ruby SDK of our Falcon API
https://rubygems.org/gems/crimson-falcon
MIT License
4 stars 1 forks source link

Array based option "facet" not being transposed correctly for Crowdstrike API #27

Closed sjames-au closed 4 months ago

sjames-au commented 7 months ago

I was poking at using crimson-falcon for a small problem I need to solve and seem to have bumped into a bug when the options are an array. As per the facet option for combined_query_vulnerabilities https://github.com/CrowdStrike/crimson-falcon/blob/main/docs/VulnerabilitiesApi.md#combined_query_vulnerabilities

Once debugging was enabled, I can see the fieldname facet is being transposed to facet%5B0%5D (so facet[]), which isn't supported by the Crowdstrike API:

GET /spotlight/combined/vulnerabilities/v1?filter=AFILTER&facet%5B0%5D=remediation&facet%5B1%5D=host_info

At the time my options were opts = { facet:['remediation','host_info'] }

carlosmmatos commented 4 months ago

@sjames-au First, thank you for opening up this issue! Secondly, let me apologize for the very late response. Things got put on the back burner and so this project unfortunately got neglected for some time after Fal.Con.

Either way, this issue should be fixed by #31 since there was another issue very similar. Also, the new updates for the API's have been added from swagger and there have been a lot of changes wrt API endpoint names. So you might see doc changes or things missing from the last time. Just an FYI.