Commit graph

25 commits

Author SHA1 Message Date
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
elipeter
a2fc38f2c4 Add debugging logs to walk.rs and file scanning in scan.rs
- Added `#[derive(Debug)]` to `Batcher` for easier debugging.
- Included `tracing::debug` logging for file scanning in `walk.rs`.
- Moved `Indexer` initialization in `scan.rs` to align with indexing logic.
- Improved traceability by logging file paths during scanning in `scan.rs`.
2025-06-17 17:52:22 +02:00
elipeter
6b230617df Add log file for nano-scanner debugging 2025-06-17 17:52:00 +02:00
elipeter
ead64c0bd3 Refactor project and index handling
- Standardized formatting across key functions in `project.rs`.
- Updated `index::handle` and `build_index` to incorporate the `config` parameter.
- Improved index-building logic to include project details and enhanced issue tracking.
- Replaced variable names like `files` with `paths` for clarity in `scan.rs`.
2025-06-17 17:42:41 +02:00
elipeter
0eecf886f2 Refactor database schema and scanning process:
- Introduced `issues` table for detailed vulnerability storage.
- Enhanced `files` table with project scoping and unique constraints.
- Replaced `OutputFormat` enum with `String` for flexibility.
- Added support for formatted console output of scan results.
- Integrated file and issue updating logic for incremental scans.
- Optimized scanning by leveraging database-stored issues.
2025-06-17 16:46:45 +02:00
elipeter
9ef591c7b1 Refined logging levels across walk and scan modules for better debugging and severity-based message handling. 2025-06-17 11:35:23 +02:00
elipeter
6126cfef36 Expand README with detailed project description, features, usage examples, configuration guide, and license section. Add new TypeScript vulnerability patterns to improve scanning capabilities. 2025-06-17 11:20:19 +02:00
elipeter
a96bcd5982 Renamed project from "Nano" to "Nyx" across codebase and configuration files. 2025-06-17 10:56:00 +02:00
elipeter
0b465bdacb Renamed project from "Nano" to "Nyx" across codebase and configuration files. 2025-06-17 10:55:50 +02:00
elipeter
7bfce3ad7f Update dependencies and enhance pattern handling
- Added `tracing-appender` and `log` dependencies to improve error logging.
- Enhanced `walk.rs` to add error handling with warning logs for ignore patterns.
- Expanded Rust and JavaScript patterns with additional security vulnerability checks.
- Simplified and updated pattern queries for improved accuracy and consistency.
- Removed unused print statement in `index.rs`.
2025-06-17 02:22:14 +02:00
elipeter
22369cc404 Add multi-language AST-pattern scanning support
- Introduced `patterns` module with language-specific vulnerability patterns.
- Added `query_cache` utility for caching compiled queries.
- Expanded `scan.rs` to support scanning multiple languages dynamically.
- Updated `Cargo.toml` with additional tree-sitter dependencies.
- Added severity filtering to `ScannerConfig` for better configuration.
2025-06-17 01:17:48 +02:00
elipeter
0831b9fb48 Add unit tests for Indexer and update dependencies
- Introduced comprehensive tests for `Indexer` to validate file scan behavior.
- Added `tempfile` and `filetime` as dependencies for testing.
- Removed unused dependencies (`anyhow`, `nix`, `regex`).
2025-06-17 00:03:48 +02:00
elipeter
15920328d7 Add unit tests for Indexer and update dependencies
- Introduced comprehensive tests for `Indexer` to validate file scan behavior.
- Added `tempfile` and `filetime` as dependencies for testing.
- Removed unused dependencies (`anyhow`, `nix`, `regex`).
2025-06-17 00:02:32 +02:00
elipeter
aef0aea973 - Rename index.rs to database.rs for clarity in purpose
- Update references in `scan.rs` to the renamed module
- Add `cargo clippy` step to CI for linting
2025-06-16 23:54:18 +02:00
elipeter
33c819bd3a Add .idea to .gitignore to ignore IDE-specific files 2025-06-16 23:52:39 +02:00
elipeter
0b97f70bde Add .idea to .gitignore to ignore IDE-specific files 2025-06-16 23:51:36 +02:00
elipeter
8543b62216 Remove credit section from README.md as it is no longer applicable 2025-06-16 23:48:58 +02:00
elipeter
ada7835efa - Remove unused filetypes.rs and walk.rs modules
- Introduce `index.rs` for file indexing using SQLite
- Expand configuration options in `config.rs`, including `excluded_files`
- Update dependencies in `Cargo.toml` to include SQLite, hashing, and regex libraries
2025-06-16 23:48:04 +02:00
Eli Peter
646293ed72
Create rust.yml 2025-06-16 17:43:12 +02:00
elipeter
ab5558f537 Added foundational modules for core functionalities:
- Introduced `walk.rs` as a parallel directory walker for search operations.
- Implemented basic index handling in `commands/index.rs`.
- Created `utils/config.rs` for configuration management with placeholders for future enhancements.
2025-06-16 16:46:22 +02:00