Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect finding order. Fixes #168 #169

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.17
* Respect finding order in Project (and exportfindings)

# 0.16
* Remove locking
* Strip bogus API token prefix if http header is provided
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "reptor"
version = "0.16"
version = "0.17"
authors = [
{ name="Richard Schwabe" },
{ name="Aron Molnar", email="[email protected]" }
Expand Down
3 changes: 2 additions & 1 deletion reptor/models/Project.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, data: dict, project_design: ProjectDesign):
for section in data.get("sections", []):
self.sections.append(Section(section, project_design))
# Order findings by their order attribute
self.findings.sort(key=lambda f: f.order, reverse=True)
if self.override_finding_order:
self.findings.sort(key=lambda f: f.order)


class ProjectOverview(ProjectBase):
Expand Down
Loading