Implement export API to project security dashboard
What does this MR do and why?
Implement the PDF export request for the project security dashboard
Issue: #545959 (closed)
| Payload | Response |
|---|---|
![]() |
![]() |
This is the data format being sent over:
{
export_format: 'pdf',
dashboard_type: 'project',
full_path: 'secure-ex/security-reports',
project_vulnerabilities_history: {
svg: 'data:image ...'
}
}
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Enable feature flag:
vulnerabilities_pdf_export - Clone this project: https://gitlab.com/gitlab-examples/security/security-reports
- Run a successful pipeline
- Go to the project security dashboard
- You will see the export button and on click it will make the request
The email can take awhile, apply this patch to have it sent immediately:
1 file changed, 1 insertion(+), 1 deletion(-)
ee/app/services/vulnerability_exports/create_service.rb | 2 +-
modified ee/app/services/vulnerability_exports/create_service.rb
@@ -27,7 +27,7 @@ def execute
**create_params
)
- ::VulnerabilityExports::ExportWorker.perform_async(vulnerability_export.id)
+ ::VulnerabilityExports::ExportWorker.perform_inline(vulnerability_export.id)
if vulnerability_export.persisted?
ServiceResponse.success(payload: { vulnerability_export: vulnerability_export })
- Open the dev tool and navigate to the "Network tab"
- Click on the export button
- From the response, copy the "download" link and open it to download the file
- Change the extension to "pdf" and when open you should get some thing like this: secure-ex-security-reports_vulnerabilities_2025-06-16T1434.pdf
- Alternatively, access the email here: http://gdk.test:3000/rails/letter_opener/
| PDF pg 1 | PDF pg 2 |
|---|---|
|
|
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #545958 (closed)
Edited by Samantha Ming



