
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Introducing a versatile value loader for your Ruby on Rails views, designed to optimize parallel loading of information on a page. This solution is perfect for scenarios where you need to display multiple stats, each taking 1-2 seconds to compute, thus causing a delay in page loading time.
Functioning similarly to lazy Turbo frames, this value loader has no reliance on Turbo and eliminates the need for creating new actions to load data. Make your page loading experience smoother and more efficient with this practical solution.
It's strongly suggested to configure initializer (can be generated with rails g lazy_value initializer
). You can put your credentials/secrets/env variable. It's needed to use the same encryption key between deploys or server instances.
LazyValue.setup do |config|
config.salt = ENV["LAZY_VALUE_SALT"].presence || SecureRandom.random_bytes(ActiveSupport::MessageEncryptor.key_len)
config.key = ENV["LAZY_VALUE_KEY"].presence || SecureRandom.hex(32)
end
And now you can use lazy_value_tag
helper in your views:
<div class="column is-one-quarter">
<div class="box has-text-centered">
<h2 class="subtitle">Number 2</h2>
<%= lazy_value_tag do %>
<p class="title"><%= Project.pending.count %>%</p>
<% end %>
</div>
</div>
<div class="column is-one-quarter">
<div class="box has-text-centered">
<h2 class="subtitle">Number 3</h2>
<p class="title">
<%= lazy_value_tag { User.active.count } %>
</p>
</div>
</div>
It also works with partials:
<div class="box">
<%= lazy_value_tag do %>
<strong>Random 5 users</strong>
<%= render "/home/users", users: User.limit(5).order("random()") %>
<% end %>
</div>
And even compatible with Turbo.
<turbo-frame id="messages" target="_top">
This content is from lazy loaded turbo frame.
<%= lazy_value_tag do %>
<h3 class="title"><%= rand(1000) %></h3>
<% end %>
<%= lazy_value_tag do %>
<%= "I'm lazy loaded from the turbo frame" %>
<% end %>
</turbo-frame>
Add this line to your application's Gemfile:
gem "lazy_value"
And then execute:
$ bundle
And that is it. Start using it.
lazy_value_tag
in the viewcaller_locations.first
), file + line number.ActiveSupport::MessageEncryptor
, creating span with spinner, and JS snippet that will call /lazy_value/show?payload=
bin/rails test:system
.
You are welcome to contribute.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that lazy_value 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 flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.