How to create a CSV file to pass to a JIRA issue

Part of my workflow is to find all the assets affected by a given vulnerability and then create a JIRA issue with the vulnerability as the subject and the list of assets in the description of the JIRA issue. This is working good if it is less than 10-15 assets.
What I would like to do is create a file (csv file) that has these assets and attache this to the JIRA issue during the creation phase