Change email report subject and csv name?

Hello!

Early some wonderful forum members helped me with a SQL report to send a list of asset in sites to their owners for verification.

This has been a great help.

In trying to make the process less confusing for my users I would love to be able to specify the email subject header and the report name, is this possible, I do not see a way in the gui to accomplish this and need more submerging in SQL to get there.

I am currently creating a SQL report with the following - thank you @troy_newcomb !

select name, target from dim_site_target
join dim_site using (site_id)
where included = true and name in(ā€˜site1ā€™,ā€˜site2ā€™)

Then Advanced > distribution and filling in owner emails ā€¦

The email comes through with the subject of

InsightVM Report: ā€˜report nameā€™ No Vulnerabilities found

and the attachment is named report.csv

I would love to be able to define the email subject and report name if possible

But at a minimum at least remove the ā€˜No Vulnerabilities foundā€™ part of the subject.

thanks!

Did you find a solution to this yet?

SO this certainly isnā€™t something you can change within the tool currently but definitely sounds like a great addition that would provide more context. I suggest creating a support ticket and labeling it as an IDEA or RFE with the details listed here. This will get it into the Devā€™s pipeline and hopefully implemented in the tool soon!

Was this ever requested?

This was actually suggested back in 2019 but the idea at the time was that we would opt out of fixing it on the console because of the effort required and instead set it right when the reports moved to the platform. However, it does look like things have changed so this should be re-opened on our end.

I suggest creating a ticket for this through your support portal which will link you to the issue. When you create it, you can reference NEX-51411 which is the old Jira issue for this.

Hello Brandon,

That ticket reference is an old ticket but a newer Jira did actually implement this feature.

It however needs to be turned on manually with the following steps:

Navigate to Administration > Troubleshooting > Run

Run the following command to set the property:

set custom property com.rapid7.nexpose.nsc.report.filename.custom=1

Once this property has been set all reports generated after setting it should be stored as reportname-date.filetype

Kind Regards,
Brian

2 Likes

Well I guess I could polish up on my jira searching skills. Good deal, Iā€™m glad you were able to get to the bottom of this. Iā€™ll have to save this in the olā€™ noggin.

Is there a command to check the property? Is this the only option?

Thanks!

As this is a custom property there is no way to check the property before setting it as it does not exist yet as far as I understand.

however to check the current value you can do get property com.rapid7.nexpose.nsc.report.filename.custom

which will return the property and its current value

Great! Thanks. So, if I need to undo the change, just enter 0 or leave it blank when setting?

to undo it you should set it to 0

1 Like

I enabled it in my lab box and went through the procedure as well and it worked like a charm

So, this changed the filename, which is great. Was there any way to take the ā€œNo Vulnerabilities foundā€ from the email?

Thanks,

The email parameters would be completely separate code. I do not believe thereā€™s been an ask to have that turned off.

Ok thanks.

Hey Brandon! do you know if itā€™s possible to only be called reportname.filetype instead of reportname-date.filetype?

Not that I know, but I do not know other variables that can be set.
I like the date, because otherwise I get a whole bunch of (1), (2), (3) filenames and it is a good way to see progress with dated reports, so i have not looked into changing it.

Hi Brandon, yes, i like the date as well, and tbh i only found out it was possible to change de report(1)(2)(3) name thanks to your post. So thank you!
Found a way around the date part for my specific need.

I also reached out to support, and they said ā€œUnfortunately, as part of the change that introduced this capability, it was hard-coded to have the date included in the naming convention therefore it is not possible to change the formatā€, they submit an enhancement request, would be good to have other options.

Was there any way to take the ā€œNo Vulnerabilities foundā€ from the email?

If you edit the oem.xml file and make a custom subject it will remove the ā€˜no vulnerabilities foundā€™ from the subject.
This is how I set mine. It keeps it the same as default, just removes the vulnerabilities part of it.
<reportSubject>Nexpose Report: ${report-name}</reportSubject>

oem.xml docs