Executing IVM query and return json

Good afternoon, I need to pass into a R7 Solution step a list of vuln ids to execute a IVM query. I added the step and it completes successfully, however it creats a csv. I looked at the templates and there doesn’t seem to be one that returns json.

I thought this was the way to run a IVM query. Is there a better way to do this? is there a way for it to return json? return the results in some other format?

You will need to add the CSV plugin and action To JSON if you want to parse through the data in the workflow and not send a file via another method.

i haven’t forgotten to get back to this. i am tweaking the remediation hub Jira ticket process.

Thinking a head, which step type do i need to call a jira api call to see if a jira ticket exists so i know to update or create a new one?

Find Issues

Just realized the out from the previous step was base64 and a saved file. I passed the .content(base64 value) and it worked. @Eric-Wilson disregard this question . . .

working with csv to json. the set up is asking for a base64 filename. The filename coming from the previous set is adhoc_sql_report.csv. Looks like it is always that name. I base64 that name but get an error on the action step of reading the csv

rapid7/CSV:2.0.5. Step name: to_json
Header: [‘adhoc_sql_report.csv’], Length: 1
An error occurred during plugin execution! CSV string seems to be invalid - cannot extract first value row. Please provide a valid CSV input.
Traceback (most recent call last):
File “/layers/paketo-buildpacks_pip-install/packages/lib/python3.12/site-packages/komand_csv/util/utils.py”, line 130, in csv_to_dict
first_row = [csv_list[1]]
~~~~~~~~^^^
IndexError: list index out of range

1 Like