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.
Refinery's news engine allows you to post updates to the news section of your website.
Key features:
Refinery CMS "core" engine version 2.0.0 or later.
Include the latest gem into your Refinery CMS application's Gemfile:
gem "refinerycms-news", '~> 2.1.0'
Then type the following at command line inside your Refinery CMS application's root directory:
bundle install
rails generate refinery:news
rake db:migrate
rake db:seed
Assuming you've already overridden the homepage view:
$ rake refinery:override view=refinery/pages/home
You can render the recent_posts
partial. However, you will need to set the recent News items manually, since this is normally handled in the News::Items controller:
<% @items = Refinery::News::Item.latest(5) %>
<%= render :partial => '/refinery/news/items/recent_posts' %>
To modify the number of items per page for the news items index without
affecting the archive page you must override the method in the controller that
sets @items
for the index: find_published_news_items
.
Currently the method body is:
@items = Item.published.translated.page(params[:page])
The page
convenience method needs to be replaced with paginate
and
per_page
passed as an option. Add a decorator for the items controller with
the following contents:
module Refinery::News
ItemsController.class_eval do
def find_published_news_items
@items = Item.published.translated.paginate :page => params[:page],
:per_page => 8
end
end
end
Type this command at your project root to override the default front end views:
$ rake refinery:override view=refinery/news/items/*
Copied view template file to app/views/refinery/news/items/_recent_posts.html.erb
Copied view template file to app/views/refinery/news/items/index.html.erb
Copied view template file to app/views/refinery/news/items/show.html.erb
etc.
To get RSS for your entire site, insert this into the head section of your layout after installing:
<%= auto_discovery_link_tag(:rss, refinery.news_items_url(:format => 'rss')) %>
FAQs
Unknown package
We found that refinerycms-news demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.