mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
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.
This commit is contained in:
parent
484f4b6d05
commit
b3870997d7
5 changed files with 156 additions and 17 deletions
|
|
@ -32,6 +32,7 @@ pub(crate) fn run_rules_on_file(
|
|||
Some("py") => (Language::from(tree_sitter_python::LANGUAGE), "python"),
|
||||
Some("ts") => (Language::from(tree_sitter_typescript::LANGUAGE_TYPESCRIPT), "typescript"),
|
||||
Some("js") => (Language::from(tree_sitter_javascript::LANGUAGE), "javascript"),
|
||||
Some("rb") => (Language::from(tree_sitter_ruby::LANGUAGE), "ruby"),
|
||||
_ => return Ok(vec![]),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue