Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
BridgeInteractive is a Ruby gem that provides a unified API client for interacting with both the Bridge Web API and RESO Web API. It allows you to work with datasets, properties, members, offices, and open houses from both systems using a flexible configuration.
Add this line to your application's Gemfile:
gem 'bridge_interactive'
And then execute:
bundle install
Or install it yourself as:
gem install bridge_interactive
Once installed, you can configure the gem with your access token and API type (either :bridge for the Bridge Web API or :reso for the RESO Web API). You can set these configurations globally or override them on a per-use basis.
To configure the gem globally, create an initializer in your Rails app (e.g., config/initializers/bridge_interactive.rb):
BridgeInteractive.configure do |config|
config.api_type = :bridge # or :reso
config.timeout = 30 # Timeout for API requests in seconds
config.logger = Rails.logger # Use the Rails logger, or provide your custom logger
end
You can initialize the API client using your server_token. The api_type can be either :bridge or :reso. If not provided, the default from the configuration will be used:
client = BridgeInteractive::API.new('your_server_token', api_type: :bridge)
For Bridge API:
datasets = client.datasets.all
For RESO API, use lookup to fetch RESO-specific datasets.
To fetch properties or listings:
# For Bridge API (listings)
listings = client.property.all('dataset_id')
# For RESO API (properties)
properties = client.property(api_type: :reso).all('dataset_id')
For Bridge API, agents are used, while for RESO API, members are equivalent.
# For Bridge API (agents)
agents = client.agents.all('dataset_id')
# For RESO API (members)
members = client.members.all('dataset_id')
The OpenHouse resource is available in both APIs:
# For Bridge API
open_houses = client.open_houses.all
# For RESO API
open_houses = client.open_houses(api_type: :reso).all
The gem raises errors when attempting to use the wrong API for certain resources. For example:
begin
lookup_data = client.lookup.all('dataset_id') # Will fail if api_type is :bridge
rescue StandardError => e
puts e.message
end
You can override the global configuration for specific API calls:
# Use RESO API for fetching members, overriding the global setting
members = client.members(api_type: :reso).all('dataset_id')
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/gryphonandrook/bridge_interactive.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that bridge_interactive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.