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

feat(output): auto-open HTML file after scan #1412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hogo6002
Copy link
Contributor

Added support to automatically open the HTML file in users' default browser after a scan finishes.

Implementing this by using the right open command for each OS (like xdg-open for Linux, start for Windows, and open for macOS). This way, we don't need to bother with setting up a local server because the HTML file is a self-contained static one.

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 68.96%. Comparing base (5e82cf7) to head (804193b).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/osv-scanner/scan/main.go 0.00% 11 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1412      +/-   ##
==========================================
- Coverage   69.05%   68.96%   -0.10%     
==========================================
  Files         186      186              
  Lines       18237    18274      +37     
==========================================
+ Hits        12593    12602       +9     
- Misses       4965     4988      +23     
- Partials      679      684       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@hogo6002
Copy link
Contributor Author

Hmm, thinking a bit more, if we host it on a localhost port, users could potentially use SSH port forwarding to access the website if they are remotely accessing the server. But I don't know how likely this case would be.
ssh -L local_port:destination_server_ip:remote_port ssh_server_hostname

@oliverchang
Copy link
Collaborator

Hmm, thinking a bit more, if we host it on a localhost port, users could potentially use SSH port forwarding to access the website if they are remotely accessing the server. But I don't know how likely this case would be. ssh -L local_port:destination_server_ip:remote_port ssh_server_hostname

This is the workflow I typically use whenever I need to inspect a web page generated by some tool (e.g. documentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants