analyze produces a broken output html report
See original GitHub issueDescribe the bug
When I use analyze to create an output.html
report a non-functional HTML file is created.
The same result happens with the command line on macOS and Ubuntu 20.04 LTS. I used the .NET SDK and attempted to create the report from a directory that wasn’t inside of the deployed application folder by using the dotnet tool.
To Reproduce Steps to reproduce the behavior:
$ dotnet --list-sdks
3.1.401 [/usr/share/dotnet/sdk]
$ dotnet tool install --global Microsoft.CST.ApplicationInspector.CLI
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
You can invoke the tool using the following command: appinspector
Tool 'microsoft.cst.applicationinspector.cli' (version '1.2.58') was successfully installed.
$ appinspector
ApplicationInspector.CLI 1.2.58+6e9480b37c
© Microsoft Corporation. All rights reserved.
ERROR(S):
No verb selected.
analyze Inspect source directory/file/compressed file (.tgz|zip) against defined characteristics
tagdiff Compares unique tag values between two source paths
tagtest Test (T/F) for presence of custom rule set in source
exporttags Export unique rule tags to view what code features may be detected
verifyrules Verify custom rules syntax is valid
packrules Combine multiple rule files into one file for ease in distribution
help Display more information on a specific command.
version Display version information.
$ pwd
/home/rbackley/Documents/ms_application_inspector/output
$ appinspector analyze -s ../code/cyclonedx-python/
The output file does not have an html or htm extension and may not open properly in your browser
Analyze command running
100% source files processed
Unable to launch output.html automatically. Set the BROWSER environment variable to your desired browser and try again or launch your browser and navigate to the file to view the report file manually.
Analyze command completed
Additional details may be found in log file at /home/rbackley/.dotnet/tools/.store/microsoft.cst.applicationinspector.cli/1.2.58/microsoft.cst.applicationinspector.cli/1.2.58/tools/netcoreapp3.1/any/appinspector.log.txt
$ ls -l
total 172
-rw-rw-r-- 1 rbackley rbackley 152694 Sep 2 08:21 output.html
-rw-rw-r-- 1 rbackley rbackley 16532 Sep 2 08:21 output.json
$ python3 -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [02/Sep/2020 08:23:48] "GET /output.html HTTP/1.1" 200 -
127.0.0.1 - - [02/Sep/2020 08:23:48] code 404, message File not found
127.0.0.1 - - [02/Sep/2020 08:23:48] "GET /favicon.ico HTTP/1.1" 404 -
After performing the above steps I opened the HTML in Chromium via Open File and via browsing to the local HTTP server created by the python line at the very end of the steps pasted above.
Expected behavior I’d like a report in a single HTML file that functions like v1.2.53.
Screenshots Please see attached.
Open File
Local HTTP server
Desktop (please complete the following information):
- OS:
- Ubuntu 20.04 LTS
- macOS 10.15.6
- Browser
- Chromium 85.0.4183.83
- Version
- ApplicationInspector.CLI 1.2.58+6e9480b37c
Additional context This is a follow-up to the question I raised on #273. It looks like I will need to go more in depth and I will open a new issue to track my specific issue.
I’ll attach the actual output files in a zip, incase it helps. This is a scan of an open source tool and is safe to disclose. Archive.zip
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top GitHub Comments
Great report. I can repro this on Mac OS.
Windows specific file path for those missing files. Testing fix now.