Add Ruby and BEAM Rust detectors - #122
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds knowledge-base tool definitions and fixtures/tests to detect Rust integrations used from Ruby and BEAM projects (rb-sys, Magnus, Rustler) based on Ruby/Mix/Cargo dependency signals while avoiding false positives from plain extconf.rb and plain Mix projects.
Changes:
- Adds new knowledge-base tool definitions:
rb-sysandMagnus(Ruby), andRustler(Elixir). - Introduces Ruby and Elixir fixture projects to exercise the new detectors.
- Extends
detect/detect_test.gowith high-confidence detection tests and “near-miss” guard tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/rustler-project/native/rustler_project/src/lib.rs | Adds Rustler fixture Rust source file. |
| testdata/rustler-project/native/rustler_project/Cargo.toml | Adds Rustler fixture Cargo manifest with rustler dependency. |
| testdata/rustler-project/mix.exs | Adds Rustler fixture Mix project referencing :rustler. |
| testdata/ruby-rust-project/src/lib.rs | Adds Ruby/Rust fixture Rust source file. |
| testdata/ruby-rust-project/Gemfile | Adds Ruby/Rust fixture Gemfile with rb_sys gem. |
| testdata/ruby-rust-project/ext/ruby_rust_project/extconf.rb | Adds Ruby/Rust fixture extconf.rb using rb_sys/mkmf. |
| testdata/ruby-rust-project/Cargo.toml | Adds Ruby/Rust fixture Cargo manifest with magnus and rb-sys crates. |
| knowledge/ruby/rb-sys.toml | Adds rb-sys tool definition and detection/config metadata. |
| knowledge/ruby/magnus.toml | Adds Magnus tool definition and Cargo-based detection metadata. |
| knowledge/elixir/rustler.toml | Adds Rustler tool definition and Mix/Cargo-based detection metadata. |
| detect/detect_test.go | Adds tests covering new detectors, confidence levels, and false-positive guards. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
andrew
force-pushed
the
add-ruby-beam-rust-detectors
branch
from
July 31, 2026 16:01
f19f9e5 to
8b2d016
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds detection for
rb-sys, Magnus, and Rustler using Ruby, Mix, and Cargo dependency signals.Includes Ruby and Elixir fixtures, keeps the existing
mkmfresult forrb-sysprojects, and guards against plainextconf.rband Mix projects triggering the new definitions.