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.
Use ERB/rhtml to build DOMs in ruby.wasm.
RERB is an unopinionated tool for compiling ERB/rhtml into ruby.wasm DOM operations for building the DOM tree described in the source file. Specifically, it generates code which, when run on a Ruby VM on WASM, generate the desired DOM. RERB is experimental and very young, so there are some usage caveats which you can read about here.
Install the gem and add to the application's Gemfile by executing:
$ bundle add RERB
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install RERB
The CLI is the recommended way to use RERB in development. The simplest way to call rerb would be to just do
rerb your-file.erb
RERB will compile this erb file into a HTML file which internally uses ruby.wasm DOM operations to generate the DOM in the erb file. If you want to save this output to a file, you can simply use the shell >
operator to write the output into a file.
rerb your-file.erb > your-file.html
your-file.html
is a fully valid HTML file, and is ready to be rendered on the browser, assuming the erb code itself contains all the necessary logic.
There are other flags which help you customize some aesthetics of the generated code. For example,
rerb --template nil your-file.erb
will generate just the DOM operations without the HTML boilerplate. This would be useful if you already have a HTML file and are simply looking to extend.
Running the code generated by RERB in a browser does not require RERB. It only needs ruby.wasm
with the JS interop extension. This is easily available via CDN as shown here.
Alternatively, you can use one of the templates which have all of this automatically set up.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
Reading the capabilities (and limitations) is highly recommended. The current limitations of RERB listed in the document would be a great place to start looking for places to possibly contribute. Bug reports and pull requests are welcome on GitHub at https://github.com/forthoney/rerb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the rerb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that rerb 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.