Commit graph

10 commits

Author SHA1 Message Date
elipeter
a614e157b3 ci: Update CI workflow with matrix strategy, security checks, and linting rules adjustments 2025-06-25 00:49:29 +02:00
Eli Peter
72ca7fa45d
test: Add unit tests for index building and scanning functionality (#9) 2025-06-24 23:57:27 +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
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
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
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
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
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