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.
This gem takes a Youtube URL or ID and optional data attributes and returns a hash of metadata about the video.
Add this line to your application's Gemfile:
gem 'yt_meta'
And then execute:
$ bundle
Or install it yourself as:
$ gem install yt_meta
Google requires an API key to use the Youtube API. Follow these instructions to create an app: Generate Key. Use the server key Google generates for you as your API key. Then create an initializer with your API key and an optional default parts array so you don't have to specify the parts you want every time.
YtMeta.configure do |config|
config.api_key = "API_KEY"
config.parts = %w[snippet player] #optional
end
To retrieve all public data about a video (or your default parts),
require "yt_meta"
and then call YtMeta.fetch_data(youtube_id: "some_id")
.
If you wish to fetch only specific parts, call
YtMeta.fetch_data(youtube_id: "some_id", parts: ["snippet", "player"])
,
replacing the parts in the array with the ones you want.
You can find a full list of available parts here:
API Docs.
Be aware that fileDetails
, processingDetails
, and suggestions
require
client OAuth2 login and won't work with this gem.
Fork!
Create your feature branch (git checkout -b my-new-feature
)
Add a configuration file with your API key at spec/support/api_config.rb
.
It's .gitignore
d, so your credentials won't be saved to the repo.
YtMeta.configure do |config|
config.api_key = "TEST_API_KEY"
end
Make your changes!
Make sure all tests pass! If you get SSL certificate verification errors when running the specs, try these fixes
Commit your changes (git commit -am 'Add some feature'
)
Push to the branch (git push origin my-new-feature
)
Create new Pull Request
FAQs
Unknown package
We found that yt_meta 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.