
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).
lambda_map_reduce
gemA MapReduce implementation for use with lambdas.
Run gem install lambda_map_reduce
on the command line or add gem 'lambda_map_reduce'
to your project's
Gemfile
.
LambdaMapReduce.map_reduce
takes an Enumerable
, a mapper
lambda, and a
reducer
lambda.
The mapper
lambda is called once for every item in the Enumerable
. It
should take a single item and return an Array
of [key, value]
pairs.
The algorithm will shuffle all value
items with the same key
together, and
pass the resulting [key, Array of values] Arrays
to the reducer
, which
should return a single item.
The mapper
and reducer
may return nil
. The result of the algorithm is
the Array
of items produced from each reducer
call.
An example from the team_api
gem's CrossReferencer
class:
require 'lambda_map_reduce'
module TeamApi
class CrossReferencer
def self.create_tag_xrefs(site, items, category, xref_data)
items_to_tags = lambda do |item|
item_xref = xref_data.item_to_xref item
item[category].map { |tag| [tag, item_xref] } unless item[category].nil?
end
create_tag_xrefs = lambda do |tag, item_xrefs|
[tag, tag_xref(site, category, tag, item_xrefs)]
end
LambdaMapReduce.map_reduce(items, items_to_tags, create_tag_xrefs).to_h
end
end
end
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
FAQs
Unknown package
We found that lambda_map_reduce 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.
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.