-
Notifications
You must be signed in to change notification settings - Fork 178
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
Generate DOCX report broken for existing findings with empty affected entities #437
Comments
Hey @smcgu, as I mentioned in your other issue, it's best to use the code in main or the latest archive of the latest release. The v4.2 development branch is not ready for production use right now. How did you load these findings into the database? If opening the finding and saving it without making any changes resolves the problem, that suggests the database entry is in a bad state with fields set to null that should never be null. When you save the finding, Ghostwriter fixes the bad fields by setting them to blank (not null). I can only reproduce this issue if I manually edit the database to null a field. |
These findings were added to the findings library, added to the report, and edited in the Ghostwriter web UI. They were added to the report weeks ago and edited within Ghostwriter. There was no manual manipulation of the report findings through scripted API calls and no direct access of the database. As mentioned, the findings and report generation work fine with The only possible thing that I can think of is that a few days ago I performed a bulk export and import of the findings library. However, report generation still works fine on |
This issue has been labeled as |
This issue is closed because it has been inactive for 14 days since being labeled |
Describe the bug
Generating DOCX reports is broken for findings with empty affected entities. After upgrading from
v4.1.0
tov4.2.0
, generating a DOCX report is broken when findings have empty affected entities. The error is "Error at the affected entities section of finding REDACTED: Invalid template operation: expected string or bytes-like object".Opening the affected findings and saving them (with no changes) resolves the errors. So, there is something broken or changed from
v4.1.0
tov4.2.0
.To Reproduce
Steps to reproduce the error:
v4.1.0
tov4.2.0
Steps to clear error:
Expected Behavior
Findings with empty affected entities should not require them to be saved, again, after upgrade.
v4.1.0
tov4.2.0
Screenshots
Available if needed.
Server Specs:
Additional context
Reverting to
v4.1.0
(and restoring backup postgres) resolves the issue.The text was updated successfully, but these errors were encountered: