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.
Add this line to your application's Gemfile:
gem 'per_page_loader'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install per_page_loader
PerPageLoader lets you attach page specific coffeescript to your rails application using jquery to load the specific coffee class and method that are needed for your controller action.
After including the gem it is as simple as wrapping your application html in the per_page_container
helper method.
%body
= per_page_container do
= yield
Adding this helper to the layouts will give PerPageLoader access to loading in javascript for every page.
The PerPageLoader has a specific format of coffeescript controller that it looks for and we have built generators to help build these files for you.
rails generate per_page_loader:controller User
will generate...
# app/assets/javascripts/application/controllers/users_controller.coffee
class UsersController
window.UsersController = UsersController
Auto generating the actions is as easy as passing in the names of the actions.
rails generate per_page_loader:controller User index show
will generate...
# app/assets/javascripts/application/controllers/users_controller.coffee
class UsersController
indexAction: ->
showAction: ->
window.UsersController = UsersController
If it is necessary to change the location that the file is generated the --dir=dir_name
flag can be used.
rails generate per_page_loader:controller User --dir=admin
will generate...
# app/assets/javascripts/admin/controllers/users_controller.coffee
class UsersController
window.UsersController = UsersController
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that per_page_loader 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
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.