Skip to content

500 Internal server error on trivy import scans v2 API #14628

@poctest875

Description

@poctest875

Bug description
Error 500 upon import of Trivy scan results via V2 API

i.e:
uwsgi [30/Mar/2026 19:32:20] ERROR [django.request:253] Internal Server Error: /api/v2/import-scan/
uwsgi [30/Mar/2026 19:32:28] ERROR [django.request:253] Internal Server Error: /api/v2/tests/{Test-ID}/

  • The error doesn't occur on every upload for the same instance
  • Deleting the test and rerunning /api/v2/import-scan/ for the same scan upload increases the success rate
  • 500 error occurs when the test phase only completes at 50%

Steps to reproduce
Steps to reproduce the behavior:

1- Import trivy scans recursively from several host over API
2- Some API import result in 500 internal server error
3- See error

Expected behavior
Upload and parsing of trivy scan results consistently completing at 100%

Deployment method (select with an X)

  • Docker Compose
  • Kubernetes
  • GoDojo

Environment information

  • Operating System: Ubuntu
  • DefectDojo version: 2.55.4

Logs

uwsgi [30/Mar/2026 19:32:20] ERROR [django.request:253] Internal Server Error: /api/v2/import-scan/
uwsgi [30/Mar/2026 19:32:28] ERROR [django.request:253] Internal Server Error: /api/v2/tests/{Test-ID}/

Sample scan files
The failed import can happen on any trivy.json uploaded file

Additional context (optional)
The last time these trivy import scans we're successfully uploading and parsed in defectdojo, with all recursive imports from the batch uploading at 100%, was on February 11, 2026 .

At the time the version was on 2.49.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions