Skip to content

Commit

Permalink
Merge pull request #169 from Syslifters/168-exportfindings-order
Browse files Browse the repository at this point in the history
Respect finding order. Fixes #168
  • Loading branch information
aronmolnar authored Apr 3, 2024
2 parents e06a95b + 0138051 commit b07c803
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
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

0 comments on commit b07c803

Please sign in to comment.