blacklanternsecurity / writehat

A pentest reporting tool written in Python. Free yourself from Microsoft Word.
GNU General Public License v3.0
1.28k stars 225 forks source link

Dread Table fixes #108

Closed TMDeal closed 1 year ago

TMDeal commented 1 year ago

Summary

This pull request fixes two issues with DREAD finding tables. The first issue is DREAD finding tables not being listed properly in the table of contents, always stating that they start on page 0. The second issue is the DREAD finding score sometimes would get pushed into the body of the finding content, as seen here.

oof

Changes

A title element is properly inserted before DREAD finding tables in the report, allowing them to be indexed in the table of contents properly. This was done previously for proactive findings in fc4c2fa, but was not also done for DREAD findings.

finding-content-header elements in the DOM will be removed if they are empty. This fixes the issue with DREAD finding score header not always playing nice, and ensures that any empty elements that still exist after paged.js renders the page are removed.