Skip to content

bug: Endpoints list and count is not good in target and scan view #1040

@psyray

Description

@psyray

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Endpoints list is not good.

In one of my project, on the dashboard page of a scan, I could see this
image

When I display the endpoints menu in a given scan view, I have a lot of GF hint but when I click on them, list is empty
image

After further investigation, it looks like the query used to get them all for the list is not good

endpoints_obj = EndPoint.objects.filter(target_domain__project__slug=project)

Filter is restrict to project slug, instead of scan id

When I replaced it by scan_id, list is good
image

Also, the same problem is present on the Target page, count is not good.
It should be the overall count of all the scan, but here, only 13 endpoints is here, which is the subdomains count.
image

I have a look in the db and the target_subdomain_id is missing from all the endpoints without the is_default flag set to true
image

So it could be complicated to list all the endpoint in the target tab if the target_domain_id is missing.
I think a scan is not correctly filling this value

I will investigate more to find the issue

Expected Behavior

Endpoints count and list must be good

Steps To Reproduce

  1. Add a target
  2. Scan target
  3. Scan subdomains for endpoints

Environment

- reNgine: 2.0.1
- OS: Debian 12
- Python: 3.10
- Docker Engine: 24.0.7
- Docker Compose: 2.5.0
- Browser: FF 119

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions