Skip to content

Add Ruby and BEAM Rust detectors - #122

Merged
andrew merged 2 commits into
mainfrom
add-ruby-beam-rust-detectors
Jul 31, 2026
Merged

Add Ruby and BEAM Rust detectors#122
andrew merged 2 commits into
mainfrom
add-ruby-beam-rust-detectors

Conversation

@andrew

@andrew andrew commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Adds detection for rb-sys, Magnus, and Rustler using Ruby, Mix, and Cargo dependency signals.

Includes Ruby and Elixir fixtures, keeps the existing mkmf result for rb-sys projects, and guards against plain extconf.rb and Mix projects triggering the new definitions.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-sys and Magnus (Ruby), and Rustler (Elixir).
  • Introduces Ruby and Elixir fixture projects to exercise the new detectors.
  • Extends detect/detect_test.go with 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
andrew force-pushed the add-ruby-beam-rust-detectors branch from f19f9e5 to 8b2d016 Compare July 31, 2026 16:01
@andrew
andrew merged commit c1483ad into main Jul 31, 2026
8 checks passed
@andrew
andrew deleted the add-ruby-beam-rust-detectors branch July 31, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants