
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
SystemNavigation is a Ruby library that provides additional introspection capabilities for Ruby programs. The library defines a number of useful methods that allow querying:
For the complete list of features please read the documentation or read the
tests. All interaction with the library is done via the SystemNavigation
class and its class methods. The description of the methods can be found in
these places:
Retrieve all methods that access instance variables in the given class/module including its ancestors and children.
module M
def increment
@num + 1
end
end
class A
include M
attr_reader :num
def initialize(num)
@num = num
end
end
sn = SystemNavigation.default
sn.all_accesses(to: :@num, from: A)
#=> [#<UnboundMethod: A#num>, #<UnboundMethod: A(M)#increment>, #<UnboundMethod: A#initialize>]
Find all classes and modules that implement the given message.
sn = SystemNavigation.default
sn.all_implementors_of(:puts)
#=> [ARGF.class, IO, Kernel, ..., YARD::Logger]
Find all methods in Bundler that invoke the 1
literal.
require 'bundler'
sn = SystemNavigation.default
sn.all_calls(on: 1, gem: 'bundler')
#=> [#<UnboundMethod: #<Class:Bundler>#with_clean_env>, #<UnboundMethod: #<Class:Bundler>#eval_gemspec>]
Retrieve all objects defined in the system.
sn = SystemNavigation.default
sn.all_objects.map(&:class).uniq.count #=> 158
And many more...
All you need is to install the gem.
gem install system_navigation
Supports only CRuby.
The project uses Zlib License. See LICENCE.txt file for more information.
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.