Skip to content

feat: Implement open htlm report in browser by defaul#11

Merged
hasip-timurtas merged 3 commits into
mainfrom
feat/9-add-report-command-to-scan-generate-json-and-html-reports
Jun 23, 2025
Merged

feat: Implement open htlm report in browser by defaul#11
hasip-timurtas merged 3 commits into
mainfrom
feat/9-add-report-command-to-scan-generate-json-and-html-reports

Conversation

@hasip-timurtas
Copy link
Copy Markdown
Owner

This pull request introduces a new feature to control browser opening behavior for HTML reports, refactors the CLI configuration for better maintainability, and updates documentation to reflect these changes. The most significant updates include adding a --no-open flag, restructuring the ScanConfig to centralize configuration management, and enhancing the user experience with clearer documentation and examples.

New Feature: Browser Opening Control

  • Added a --no-open flag to prevent automatic opening of HTML reports in the browser. This flag is useful for CI environments and automation workflows. (src/cli.rs, README.md) [1] [2] [3] [4] [5] [6] [7]

Refactoring: Centralized Configuration

  • Introduced a ScanConfig struct to encapsulate all scan-related configurations, simplifying the handle_scan_command function and improving maintainability. (src/cli.rs, src/main.rs) [1] [2] [3]

Documentation Updates

  • Updated the README.md to reflect the new --no-open flag, clarify browser opening behavior, and improve examples for better user understanding. (README.md) [1] [2] [3] [4] [5]

Dependency Addition

  • Added the opener crate to handle cross-platform browser opening for HTML reports. (Cargo.toml)

Minor Enhancements

  • Added PartialEq to the ReportFormat enum to support comparisons, which is used in determining browser opening conditions. (src/report.rs)

- Added new dependencies including `bstr`, `dbus`, `libdbus-sys`, `normpath`, and `opener` to Cargo.toml and Cargo.lock for improved functionality.
- Updated the solsec scan command to include a `--no-open` flag, allowing users to prevent automatic opening of HTML reports in CI environments.
- Enhanced README.md to document the new `--no-open` option and clarify the behavior of automatic browser opening based on the environment.

These changes improve the tool's usability and ensure it meets the needs of both interactive and automated workflows.
…mand

- Revised the README.md to enhance clarity in the usage instructions for the `solsec scan` command, including adjustments to the descriptions of output formats and browser opening behavior.
- Removed redundant phrases and ensured consistent language throughout the documentation.

These changes improve user understanding and streamline the documentation for the solsec tool.
@github-actions
Copy link
Copy Markdown

🛡️ Security Scan Results

  • Total Issues: 68
  • Critical: 0
  • High: 0

View full report

@hasip-timurtas hasip-timurtas merged commit 9090ae1 into main Jun 23, 2025
5 checks passed
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.

1 participant