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

AF: traditional-pdf report template generates a "cut-off" PDF report #7885

Open
1 task
UgniusV opened this issue May 31, 2023 · 14 comments
Open
1 task

AF: traditional-pdf report template generates a "cut-off" PDF report #7885

UgniusV opened this issue May 31, 2023 · 14 comments
Labels
add-on bug in:reports Issues pertaining to Report Generation add-on.

Comments

@UgniusV
Copy link

UgniusV commented May 31, 2023

Describe the bug

When using traditional-pdf report template with Automation Framework, the generated PDF has sections that are "cut-off". One such example is the description section. Please see the screenshot below:
Screenshot 2023-05-31 at 13 51 26

The description is not formatted correctly, and half of it is not visible, resulting in "hard-to-read" reports.

Steps to reproduce the behavior

When using Automation Framework, try to generate the report with traditional-pdf template:

  - parameters:
      template: "traditional-pdf"
      reportDir: "/tmp"
      reportFile: "ZAP-Report-[[site]]"
    name: "report"
    type: "report"

The resulting report will have sections that are "cut-off", just like in the screenshot above.

Expected behavior

All sections of the PDF report should be visible and properly formatted.

Software versions

Tested on latest "fixed version" Docker image: owasp/zap2docker-stable:2.12.0

Screenshots

Screenshot 2023-05-31 at 13 51 26

Errors from the zap.log file

No response

Additional context

No response

Would you like to help fix this issue?

  • Yes
@UgniusV UgniusV added the bug label May 31, 2023
@thc202 thc202 added add-on in:reports Issues pertaining to Report Generation add-on. labels May 31, 2023
@kingthorin
Copy link
Member

Could you check if this happens with traditional-html?

@thc202
Copy link
Member

thc202 commented Jun 1, 2023

That one does not have any problem. I'm not able to reproduce the reported issue with the local system (did not try with Docker image yet).

@kingthorin
Copy link
Member

Thanks. I thought the pdf was basically a conversion of the html, so I thought maybe it was just missing a wrap tag or something ☹️

@UgniusV
Copy link
Author

UgniusV commented Jun 2, 2023

@thc202 were you able to reproduce the issue with owasp/zap2docker-stable:2.12.0 image?

@thc202
Copy link
Member

thc202 commented Jun 7, 2023

No, I don't see that behaviour when using the stable image. Did you try with different PDF viewers?

If the problem is not with the PDF viewer run the attached plan (ReportPdf.txt) and share the resulting PDF, e.g.:

docker run --rm -v "$(pwd)":/zap/wrk/:rw -it owasp/zap2docker-stable zap.sh -cmd -autorun /zap/wrk/ReportPdf.txt

@thc202
Copy link
Member

thc202 commented Jun 17, 2023

@UgniusV could you try the above?

@bennos1911
Copy link

Same "cut-off" issue with Traditional PDF Report also exists in 2.14.0 and Traditional HTML Report does not suffer from the same issue.

I acknowledge the #7885 bug report was raised relating to the Automation Framework, and the issue I'm experiencing whilst identical, is through the app. Happy to raise a separate bug report if preferred...

@kingthorin
Copy link
Member

No need, it's bound to be the same underlying issue.

@kingthorin
Copy link
Member

@UgniusV & @bennos1911 could you provide your ZAP info from ZAPs menu Help > Support Info, or from the CLI using the -suppinfo switch?

@bennos1911
Copy link

Zap-Support-Info

@thc202
Copy link
Member

thc202 commented Dec 13, 2023

It would be great if you could try this: #7885 (comment)

@bennos1911
Copy link

Here you go... doesn't look to suffer from this issue :-/
2023-12-13-ZAP-Report-example.com.pdf

@thc202
Copy link
Member

thc202 commented Dec 13, 2023

Does the report that's truncated have long lines somewhere?

@bennos1911
Copy link

bennos1911 commented Dec 15, 2023

Yes. Example below.
truncated_example

Same example with highlighted text overflow
truncated_example_highlight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-on bug in:reports Issues pertaining to Report Generation add-on.
Development

No branches or pull requests

4 participants