Skip to content

Conversation

LeoOMaia
Copy link
Contributor

As discussed in #13001

Copy link

DryRun Security

🔴 Risk threshold exceeded.

This pull request contains a sensitive edit to the file "dojo/finding_group/views.py" which requires careful review, though it is not automatically blocking and can be configured in the .dryrunsecurity.yaml file.

🔴 Configured Codepaths Edit in dojo/finding_group/views.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.

We've notified @mtesauro.


All finding details can be found in the DryRun Security Dashboard.

@valentijnscholten
Copy link
Member

What does this PR do? I think it fixes the ordering of findings in finding groups if a non-default ordering is selected?

@valentijnscholten valentijnscholten added this to the 2.51.0 milestone Sep 1, 2025
@LeoOMaia
Copy link
Contributor Author

LeoOMaia commented Sep 6, 2025

The warning error that was being generated in the GroupFindings view basically occurs because I didn’t define a default ordering for the view when no specific ordering is selected. I’m just setting a default to avoid the warning.

@valentijnscholten
Copy link
Member

Is it similar to #13119 or are both PRs needed?

@LeoOMaia
Copy link
Contributor Author

LeoOMaia commented Sep 6, 2025

I reviewed it and the idea seems similar to setting a default ordering, but the way the person is doing it looks wrong. If someone selects to order by a field, for example name, in the end the paginate_queryset will overwrite it by ordering with id i think.

@valentijnscholten
Copy link
Member

Can you rebase your PR and remove their change so we can merge your fix?

@LeoOMaia
Copy link
Contributor Author

LeoOMaia commented Sep 6, 2025

I created a new PR to the bug branch. This current PR is targeting dev, so we can close this branch, is that okay?

@valentijnscholten
Copy link
Member

Yes

@LeoOMaia LeoOMaia closed this Sep 6, 2025
@LeoOMaia LeoOMaia deleted the default-order branch September 6, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants