thoughtworks / talisman

Using a pre-commit hook, Talisman validates the outgoing changeset for things that look suspicious — such as tokens, passwords, and private keys.
https://thoughtworks.github.io/talisman/
MIT License
1.89k stars 241 forks source link

Talisman HTML Report doesn't work #398

Closed mahmud92542 closed 1 year ago

mahmud92542 commented 1 year ago

Describe the bug After installing HTML Report, when I scan my folder by generating a folder called talisman_html_report & try to see from the browser, it actually shows sample data, not the real data. If you go to the talisman_html_report folder, you'll see under the sample folder there are some png image that actually shows on the index.html. but if you go to the data folder & open your report.json you'll see the actual scan report of your repo. sometimes HTML page shows nothing.

To Reproduce Steps to reproduce the behavior:

  1. Go to the project folder
  2. Click on the talisman_html_report folder
  3. Scroll down & go to the sample folder
  4. you'll see some png file that actually shows you the report when you try to see your report on the browser

Expected behavior How can I show the actual report on the index.html page, this the expectations?

Screenshots If applicable, add screenshots to help explain your problem. Screenshot 2022-10-06 at 1 38 22 PM Screenshot 2022-10-06 at 1 39 18 PM

Desktop (please complete the following information):

tinamthomas commented 1 year ago

How are you viewing the html report from the browser? You would see empty data if you're only viewing only the html file directly.

Did you try navigating to the talisman_html_report and starting a server with this command?

python -m SimpleHTTPServer

mahmud92542 commented 1 year ago

I see! I run the talisman --scanWithHtml in the project directory. then run the HTTP Server from the same directory. then go to the talisman_html_report from the browser.

but now, I tried what you suggested & can see the report.

Thanks a lot! I didn't try this way.

btw, for python3, the server will run with the below command, python3 -m http.server

tinamthomas commented 1 year ago

Awesome! Glad that was sorted out!