
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
= sinatra-mongo
Extends Sinatra with an extension method for dealing with monogodb using the ruby driver.
Install it with gem:
$ gem install sinatra-mongo
Now we can use it an example application.
require 'sinatra'
require 'sinatra/mongo'
# Specify the database to use. Defaults to mongo://localhost:27017/default,
# so you will almost definitely want to change this.
#
# Alternatively, you can specify the MONGO_URL as an environment variable
set :mongo, 'mongo://localhost:27017/sinatra-mongo-example'
# At this point, you can access the Mongo::Database object using the 'mongo' helper:
puts mongo["testCollection"].insert {"name" => "MongoDB", "type" => "database", "count" => 1, "info" => {"x" => 203, "y" => '102'}}
get '/' do
mongo["testCollection"].find_one
end
If you need to use authentication, you can specify this in the mongo uri:
set :mongo, 'mongo://myuser:mypass@localhost:27017/sinatra-mongo-example'
== Mongo Reference
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 Joshua Nichols. See LICENSE for details.
FAQs
Unknown package
We found that sinatra-mongo demonstrated a not healthy version release cadence and project activity because the last version was released 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.