
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@shutterstock/aws-embedded-metrics-flatten
Advanced tools
Extensions for the aws-embedded-metrics npm module, adding flatcount metrics that emit a total count instead of an array of each individual count, and the ability to disable metrics without removing metrics method calls.
The package is available on npm as @shutterstock/aws-embedded-metrics-flatten
npm i @shutterstock/aws-embedded-metrics-flatten
import { FlatCountMetrics, metricScopeDummy } from '@shutterstock/aws-embedded-metrics-flatten';
[1, 1, 1, 1, 1]
, it emits a single count of [5]
, dramatically reducing the size of the log message when counting thousands of iterations in a Lambda functionCloudWatch embedded metrics (parsed from CloudWatch logs) have a limit of something like 1,000 items in a metrics log statement. Metrics beyond that point will be ignored.
aws-embedded-metrics
will emit metrics with 10,000
calls to .putMetric('MyMetric', 1, metricUnit.Count);
as an array with 10,000 elements all with the value of 1
... and about 9,000
of those will get ignored as a result.
metricScopeDummy
is a replacement for metricScope
that will pass an MetricsLoggerDummy
instance instead of a MetricsLogger
instance to the callback function. MetricsLoggerDummy
implements the same interface as MetricsLogger
but it does not accumulate data and does not emit any logs.
Coupled with a configuration setting / env var it is possible to emit metrics or not emit metrics by changing which function is used to create the metrics
object.
nvm use
npm i
npm run build
npm run lint
npm run test
npm run example:metrics-flatten
MyFlatMetric
will have a single value of 10000
FLATTEN_METRICS=false npm run example:metrics-flatten
MyFlatMetric
will have 10,000 values of 1
across many different linesnpm run example:metrics-optional
EMIT_METRICS=false npm run example:metrics-optional
FAQs
Helpers for aws-embedded-metrics
We found that @shutterstock/aws-embedded-metrics-flatten demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.