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.
This gem's purpose is to allow easy integration between the Commutatus javascript library cm-page-builder and any Rails application that requires storing and editing content through Rails-rendered webpages.
Add the following lines to the gemfile:
gem 'react-rails', '~> 2.6.0'
gem 'cm_page_builder-rails'
And then execute:
$ bundle
Follow all react-rails installation instructions (https://github.com/reactjs/react-rails)
Important: ensure that the hello_world
example successfully works
Install the javascript packages with:
yarn add cm-page-builder@1.3.0 -E
yarn add babel-runtime@^6.26.0
(the emoji-mart package, a dependency of cm-page-builder, sometimes bugs out during the webpack build process without the babel-runtime)
Run rails cm_page_builder_rails:install:migrations
Run rails generate cm_page_builder:rails:install
to install the JSX component. This assumes your webpack folder is inside app/javascripts
In config/routes.rb
, mount the endpoint with the line mount CmPageBuilder::Rails::Engine => "/cm_page_builder"
This package comes with a concern, CmPageBuilder::Rails::HasCmContent
include CmPageBuilder::Rails::HasCmContent
To activate this module, add include CmPageBuilder::Rails::HasCmContent
on top of any model file that should have an associated page builder record.
The page builder record will be accessible from the model as page (@model.page
). The show path is accessible through the route cm_page_builder_rails.page_path(@page)
, and the edit path through the route cm_page_builder_rails.edit_page_path(@page)
To make the fragment read-only in the form, pass the value in status
prop as Read
. Example,
= react_component('cm_content_manager/Content', { input: 'content-editor', components: @page.components, assetBaseUrl: ActiveStorage::Blob.service.bucket.url, status: 'Read'})
By default, the value of the status prop is set to Edit
.
Do this or the direct upload capabilities won't work https://keithpblog.org/post/active-storage-on-amazon-s3/
gem build cm_page_builder-rails.gemspec
gem push cm_page_builder-rails-0.1.x.gem
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that cm_page_builder 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.