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.
ucb_site_announcements
Advanced tools
The ucb_site_announcements Rails engine provides administrator management and site display for timed announcements.
To add the engine to a Rails application:
gem "ucb_site_announcements"
Run bundle install
Install and run migrations
bin/rails ucb_site_announcements:install:migrations
bin/rails db:migrate
config/routes.rb
:mount UcbSiteAnnouncements::Engine => "/announcements" # set whatever URL you'd like to use here
config/initializers/ucb_site_announcements.rb
- auth_callback
is required.# config/initializers/ucb_site_announcements.rb
UcbSiteAnnouncements.configure do |config|
config.auth_callback = ->(controller) {
# This will be called in the admin controller to determine if the current user can make changes
# to the announcements
#
# "controller" is the current controller instance so it will have access to anything defined in your
# ApplicationController
#
# Return true if the current user can view/edit announcements; false otherwise
#
# Example:
# controller.current_user.admin?
}
config.time_zone = "Pacific Time (US & Canada)"
end
time_zone
is optional, but will default to Pacific Time (US & Canada)
[!CAUTION] If you don't provide a setting for
auth_callback
all users will be able to access the admin section for announcements, which is probably not what you want.
rake ucb_site_announcements:install:migrations
rake db:migrate
Access the admin inteface at, e.g. /announcements/admin
(assuming you set the mount point at announcements
in step 3)
To display active announcements in application views:
<%= active_site_announcements %>
This will render Bootstrap alert components for each active announcement.
FAQs
Unknown package
We found that ucb_site_announcements demonstrated a healthy version release cadence and project activity because the last version was released less than 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.