Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Unofficial wrapper for the Sightengine API which provides image moderation including nudity detection, scammer detection, face attributes, and more.
Official API docs can be found here: https://sightengine.com/docs/reference
Add this line to your application's Gemfile:
gem 'sightengine'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sightengine
require 'sightengine'
client = Sightengine::Client.new(
api_user: 'your api user',
api_secret: 'your api secret'
)
response = client.nudity("https://sightengine.com/assets/img/examples/example2.jpg")
response.raw_nudity? # false
response.partial_nudity? # false
response.safe? # true
response = client.face_attributes("https://sightengine.com/assets/img/examples/example7.jpg")
response.get_faces.length # 1
face = response.get_faces.first
face.female? # true
face.male? # true
face.minor? # false
face.coordinates # [x1, y1, x2, y2] = [0.5156, 0.1936, 0.6922, 0.6207]
response = client.scam("https://d3m9459r9kwism.cloudfront.net/img/examples/example-scam1-1000.jpg")
response.scam? # true
response = client.celebrities("https://sightengine.com/assets/img/examples/example-craig-300.jpg")
response.celebrity? # true
response.celebrities # [{"name"=>"Daniel Craig", "prob"=>0.99}, {"name"=>"Graham Fellows", "prob"=>0.08}, ...]
response = client.wad("https://sightengine.com/assets/img/examples/example2.jpg")
response.weapon?
response.drugs?
response.alcohol?
# Detect nudity, scammers and celebrities in picture
response = client.check("https://d3m9459r9kwism.cloudfront.net/img/examples/example-scam1-1000.jpg", [
Sightengine::NUDITY,
Sightengine::SCAM,
Sightengine::CELEBRITIES
])
response.raw_nudity? # false
response.scam? # true
response.celebrity? # false
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. 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 tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/leoht/sightengine.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that sightengine 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.