Commit graph

69 commits

Author SHA1 Message Date
elipeter
cdd89dab4a docs: Update badges in README to reflect crates.io links and license information 2025-06-25 03:56:07 +02:00
elipeter
eb5bd2a244 fix: Update author email in Cargo.toml for consistency 2025-06-25 03:50:27 +02:00
Eli Peter
0366f66b42
Fix/updated binary name (#18)
* feat: Add binary configuration for nyx in Cargo.toml

* fix: Set default binary to nyx in Cargo.toml
2025-06-25 03:46:21 +02:00
Eli Peter
423e6bffd1
fix: Clarify changelog entry for Windows zip command issue in release pipeline (#17) 2025-06-25 03:37:39 +02:00
Eli Peter
ef0a6f80bb
Rename CHANGELOG.MD to CHANGELOG.md (#16) 2025-06-25 02:52:06 +02:00
Eli Peter
238ed095a3
Fix/update release pipeline (#15)
* fix: Enhance release packaging for cross-platform compatibility

* fix: Resolve pipeline bug with zip command on Windows

* fix: Clarify changelog entry for Windows zip command issue in release pipeline

* Update CHANGELOG.MD

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-25 02:49:09 +02:00
Eli Peter
e221fdd7d6
ci: Update license generation command to use output flag for consistency (#14) 2025-06-25 02:37:06 +02:00
elipeter
cd8ae3c47e ci: Update license generation command to use output flag for consistency 2025-06-25 02:26:59 +02:00
elipeter
c6c41bf0ce ci: Update license generation command to use handlebars template 2025-06-25 02:17:01 +02:00
Eli Peter
faf70b9eb6
ci: Update license generation format to use handlebars (#13) 2025-06-25 02:13:28 +02:00
Eli Peter
90fa775a48
docs: Add third-party licenses documentation and update build process (#12) 2025-06-25 02:05:15 +02:00
Eli Peter
9c76fd1e9f
Delete THIRDPARTY-LICENSES.html (#11) 2025-06-25 01:54:23 +02:00
Eli Peter
d50684e31b
docs: Add section on advantages of using Nyx in README (#10)
* docs: Add section on advantages of using Nyx in README

* ci: Update branch references from 'main' to 'master' in CI configuration

* docs: Add third-party licenses documentation and update build process

* Update .github/workflows/release-build.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: Add third-party licenses documentation and update build process

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-25 01:42:10 +02:00
elipeter
a614e157b3 ci: Update CI workflow with matrix strategy, security checks, and linting rules adjustments 2025-06-25 00:49:29 +02:00
elipeter
24689be6f7 ci: Add rust-cache action to improve build performance 2025-06-25 00:37:36 +02:00
elipeter
47d4f589af Refactor CI workflow: rename file, update job name, and remove verbose flag from cargo build 2025-06-25 00:33:58 +02:00
elipeter
4872c5acb5 docs: Add initial CHANGELOG with project release history and key updates 2025-06-25 00:31:30 +02:00
elipeter
0efc26d28d chore: Add dual licensing information and contribution guidelines 2025-06-25 00:24:05 +02:00
Eli Peter
72ca7fa45d
test: Add unit tests for index building and scanning functionality (#9) 2025-06-24 23:57:27 +02:00
Eli Peter
46c4732f6e
test: Add unit tests for file handling and configuration merging (#7)
* test: Add unit tests for file handling and configuration merging

* test: Update IO error conversion test to use new error creation method
2025-06-24 23:38:32 +02:00
Eli Peter
8497800b13
test: Add unit tests for config merging and project name sanitization (#6)
* test: Add unit tests for config merging and project name sanitization

* Update src/utils/project.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test: Update assertion for follow_symlinks in scanner configuration

* test: Fix typo in test function name for project info retrieval

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 23:18:01 +02:00
Eli Peter
a0c9d0f9d4
Merge pull request #2 from ecpeter23/bug/fix-max-results
fix: Limit diagnostics output on non indexed scan to a maximum number…
2025-06-24 22:51:30 +02:00
elipeter
a75b6cfabe fix: Remove unnecessary whitespace in diagnostics output handling 2025-06-24 22:51:16 +02:00
elipeter
ebe78b270c fix: Limit diagnostics output on non indexed scan to a maximum number of results based on configuration 2025-06-24 22:44:57 +02:00
elipeter
e309b956c3 Enhance release build workflow with improved binary path resolution and error messaging 2025-06-24 22:28:47 +02:00
elipeter
0876209834 Refactor release build workflow to include OS mapping for targets and improve error handling for binary packaging 2025-06-24 22:26:41 +02:00
elipeter
34e8174003 Add support for aarch64-apple-darwin target and define binary name in release build workflow 2025-06-24 22:22:03 +02:00
elipeter
aecf37163f Add target specification to Rust toolchain setup in release build workflow 2025-06-24 22:14:25 +02:00
elipeter
3d744ae44f Improve release build workflow by adding error handling and dynamic binary path resolution 2025-06-24 22:13:52 +02:00
elipeter
95b934ad39 Add target installation step to release build workflow 2025-06-24 22:05:46 +02:00
elipeter
4bb61aba8b Update default configuration handling and integrate NyxResult into config.rs
- Introduced `DEFAULT_CONFIG_TOML` to simplify default configuration loading.
- Replaced `show_progress` with `quiet` in configuration for improved clarity.
- Refactored `create_example_config` to use `NyxResult` and streamline logic with fallback handling.
- Added `default-nyx.conf` file for default configuration management.
- Enhanced `merge_configs` to include new parameters like `scan_timeout_secs` and `quiet`.
2025-06-24 21:43:26 +02:00
elipeter
14a549ac39 Refactor codebase for consistent indentation and formatting
- Standardized spacing and indentation across multiple modules for improved readability.
- Reorganized `patterns` and `utils` imports for consistency.
- Updated `NyxError` and `NyxResult` related implementations to maintain consistent formatting.
- Enhanced readability in AST patterns for better clarity and maintainability.
2025-06-24 20:27:06 +02:00
elipeter
b3870997d7 Add Ruby AST support using tree-sitter-ruby
- Added `tree-sitter-ruby` dependency to `Cargo.toml` and `Cargo.lock`.
- Introduced `patterns/ruby.rs` with Ruby-specific AST patterns for vulnerability detection.
- Updated `patterns/mod.rs` and `ast.rs` to support Ruby AST parsing and pattern registry initialization.
2025-06-24 18:53:31 +02:00
elipeter
484f4b6d05 Added release-build.yml to automate releases 2025-06-24 18:09:50 +02:00
elipeter
f4544d261e Fixed clippy errors 2025-06-24 18:06:02 +02:00
elipeter
16b469c16f Renamed file.rs to ast.rs to more accurately represent what that code does 2025-06-24 17:56:26 +02:00
elipeter
bd788a8373 Refactor error handling with NyxResult and enhance debugging
- Replaced `Result` with `NyxResult` across the codebase for consistent error management.
- Enhanced `NyxError` with new variants and utility conversions for better flexibility.
- Added detailed `tracing::debug` logs in `file.rs` and `walk.rs` for improved traceability.
- Simplified conditionals and improved path handling in `file.rs`.
- Refined severity filtering logic in `scan.rs`.
2025-06-23 20:59:49 +02:00
elipeter
0a66a0ae2d Add error handling with NyxError and refactor console output formatting
- Introduced `NyxError` and `NyxResult` for unified error handling across modules.
- Refactored `scan.rs`, `index.rs`, and `walk.rs` with improved error management and consistent formatting.
- Replaced existing error handling in `database.rs` with `NyxResult`.
- Improved database maintenance by integrating `vacuum` and `clear` methods into workflows.
- Added `dashmap` for efficient parallel diagnostics result aggregation in `scan_with_index_parallel`.
- Enhanced readability and formatting of console outputs in multiple modules.
2025-06-23 20:27:16 +02:00
elipeter
75a20eaa2a Simplify console output formatting in index.rs by removing redundant characters in success message. 2025-06-23 19:39:38 +02:00
elipeter
17d327a572 Add bytesize and chrono, improve console output formatting
- Added `bytesize` and `chrono` dependencies in `Cargo.toml` and `Cargo.lock` for enhanced size and time formatting.
- Enhanced console output in `list.rs`, `index.rs`, `clean.rs`, and `config.rs` with improved styles for readability.
- Updated file size and modified time formatting across commands using `ByteSize` and `chrono`.
2025-06-23 19:37:19 +02:00
elipeter
47d850843c Format execution time output in seconds instead of milliseconds in main.rs. 2025-06-23 18:27:48 +02:00
elipeter
487ccbba8b Add thiserror and improve console output formatting
- Added `thiserror` dependency in `Cargo.toml` and `Cargo.lock` for enhanced error handling.
- Improved execution time tracking and output formatting in `main.rs`.
- Refactored console output in `scan.rs` for better readability with grouped warnings.
- Simplified error handling in `scan_filesystem`.
2025-06-23 18:25:10 +02:00
elipeter
952e83453a Refactor and simplify code in index.rs, scan.rs, and database.rs
- Removed unnecessary references and improved clarity in `Indexer` method calls.
- Reorganized conditionals and eliminated redundant variable assignments in `scan.rs`.
- Simplified database initialization handling by removing unused commented-out code and improving formatting in `database.rs`.
2025-06-23 17:49:15 +02:00
elipeter
8bc16ac940 Refactor and enhance debugging in walk.rs and scan.rs
- Removed unused commented-out code in `walk.rs` for improved readability.
- Added more `tracing::debug` logs for clearer traceability during file scanning and rule processing.
- Improved condition handling and formatting consistency in `scan.rs`.
- Simplified error management and removed redundant comments in database-related functions.
2025-06-23 17:45:54 +02:00
elipeter
80c0bc9845 Add max_file_size_mb and high_only logic to scanning process:
- Implement `max_file_size_mb` to restrict files for scanning based on size.
- Refactor `high_only` handling to modify `min_severity` in `Config`.
- Update `ScannerConfig` to use `Option<u64>` for optional size limits.
- Remove redundant `high_only` parameter from `scan::handle` function.
- Improve batch processing in `walk` for efficient file scanning.
2025-06-23 16:51:39 +02:00
elipeter
b3e0db449d chore: adjust spacing in GitHub Actions workflow file 2025-06-22 20:26:53 +02:00
elipeter
eedfc5dbe8 Add vacuum method to Indexer for database maintenance
- Added a `vacuum` method in `database.rs` to optimize database file size and performance.
- Integrated `vacuum` calls into `scan.rs` and `index.rs` to ensure regular maintenance during operations.
2025-06-17 21:00:24 +02:00
elipeter
0a62b6f40c Refactor database connection handling with connection pooling and parallel processing
- Introduced `r2d2` connection pooling for SQLite in `database.rs`.
- Updated `Indexer` to use pooled connections for improved concurrency.
- Replaced sequential processing with `rayon` for parallel file scanning.
- Added a `clear` method to `Indexer` for reindexing support.
- Enhanced database initialization with `init` and `from_pool` methods.
- Updated `Cargo.toml` and `Cargo.lock` to include `r2d2`, `r2d2_sqlite`, and new dependencies.
2025-06-17 20:45:33 +02:00
elipeter
1933082b41 Add rayon for parallel file scanning in for no indexingscan.rs
- Integrated `rayon` for concurrent iteration in `scan_filesystem`, enhancing performance.
- Updated `Cargo.toml` and `Cargo.lock` to include `rayon` and its dependencies.
- Adjusted `scan.rs` to utilize `rayon`'s `par_bridge` for parallel file processing with error handling.
2025-06-17 19:54:03 +02:00
elipeter
d7b8833ec6 Switch read_to_string to read in scan.rs and simplify Python patterns
- Updated `scan.rs` to use `std::fs::read` for handling files as bytes instead of strings.
- Simplified Python patterns by removing redundant or low-priority vulnerability checks.
2025-06-17 18:36:46 +02:00